summaryrefslogtreecommitdiff
path: root/app/views/layouts/application.html.erb
blob: fb5c1c50f6278b85ae9ba61aefa88939ca013574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
  <title>Leaguer</title>
  <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
  <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>
  <%= yield :head %>
</head>
<body>
<script>
		window.onload = function() {
			BetterDragSort.makeListSortable(document.getElementById("boxes"));
		};
</script>
<header>
	<nav>
	<%# This is the logo %>
	<div class="navbar-brand"><%= link_to('Leaguer', root_path) %></div>

	<%# This is the search bar  #%>
	<div>
		<%= form_tag("/search", method: "get", :class => "search") do %>
			<%= text_field_tag(:query, nil, :placeholder => "Search") %>
			<%= submit_tag("Go", :name=>nil) %>
		<% end %>
	</div>

	<%# these are the log in buttons #%>
	<div id="log-buttons">
		<% if signed_in? %>
			<%= link_to current_user.user_name, current_user, :class => "user" %>
			<%= link_to "Sign out", session_path("current"), method: "delete", :class => "signout" %>
			<% if current_user.can? :edit_server %>
				<%= link_to "Server settings", edit_server_path, :class => "server" %>
			<% end %>
		<% else %>
			<%= link_to "Log in", new_session_path, :class => "signin" %>
			<%= link_to "Sign up", new_user_path, :class => "signup" %>
		<% end %>
	</div>
	</nav>
</header>

<% if notice %><div id="notice"><p><%= notice %></p></div><% end %>

<div class="wrapper">
		<%= yield %>
</div>

<footer>
	<p>Leaguer &copy; 2014, Tomer Kimia, Andrew Murrell, Luke Shumaker, Nathaniel Foy, Davis Webb, and Guntas Grewal</p>
	<%= debug(params) if Rails.env.development? %>
</footer>

</body>
</html>