aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-09-25 16:52:45 +0100
committerMark Longair <mhl@pobox.com>2013-09-30 10:34:25 +0100
commit5b3f408bea1262d451b69b85186ec100f0737b36 (patch)
tree69e9568c072a2d5f00df1cb0dc5d39e59b0034aa
parent7b8d0fc0e9fd3883b4a961d733115b031bd30d51 (diff)
Move header to partial to make it easier to customize.
-rw-r--r--app/views/general/_header.html.erb37
-rw-r--r--app/views/layouts/default.html.erb38
2 files changed, 38 insertions, 37 deletions
diff --git a/app/views/general/_header.html.erb b/app/views/general/_header.html.erb
new file mode 100644
index 000000000..55bf719e2
--- /dev/null
+++ b/app/views/general/_header.html.erb
@@ -0,0 +1,37 @@
+<div id="banner">
+ <div id="banner_inner">
+ <div class="lang"><%= render :partial => 'general/locale_switcher' %></div>
+
+ <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
+ <div id="logged_in_bar">
+ <% if @user %>
+ <%= _('Hello, {{username}}!', :username => h(@user.name))%>
+
+ <% if @user %>
+ <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %>
+ <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %>
+ <%=link_to _("My wall"), show_user_wall_path(:url_name => @user.url_name) %>
+ <% end %>
+
+
+ <%= link_to _("Sign out"), signout_path(:r => request.fullpath) %>
+ <% else %>
+ <%= link_to _("Sign in or sign up"), signin_path(:r => request.fullpath) %>
+ <% end %>
+ </div>
+ <% end %>
+
+ <div id="navigation_search">
+ <form id="navigation_search_form" method="post" action="<%= search_redirect_path %>">
+ <p>
+ <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query", :title => "type your search term here" } %>
+ <input id="navigation_search_button" type="submit" value="search">
+ </p>
+ </form>
+ </div>
+
+ <%= render :partial => 'general/orglink' %>
+
+ <%= render :partial => 'general/topnav' %>
+ </div>
+</div>
diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb
index 5895becf7..1648e6af3 100644
--- a/app/views/layouts/default.html.erb
+++ b/app/views/layouts/default.html.erb
@@ -77,43 +77,7 @@
<% end %>
<div class="entirebody">
- <div id="banner">
- <div id="banner_inner">
- <div class="lang"><%= render :partial => 'general/locale_switcher' %></div>
-
- <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %>
- <div id="logged_in_bar">
- <% if @user %>
- <%= _('Hello, {{username}}!', :username => h(@user.name))%>
-
- <% if @user %>
- <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %>
- <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %>
- <%=link_to _("My wall"), show_user_wall_path(:url_name => @user.url_name) %>
- <% end %>
-
-
- <%= link_to _("Sign out"), signout_path(:r => request.fullpath) %>
- <% else %>
- <%= link_to _("Sign in or sign up"), signin_path(:r => request.fullpath) %>
- <% end %>
- </div>
- <% end %>
-
- <div id="navigation_search">
- <form id="navigation_search_form" method="post" action="<%= search_redirect_path %>">
- <p>
- <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query", :title => "type your search term here" } %>
- <input id="navigation_search_button" type="submit" value="search">
- </p>
- </form>
- </div>
-
- <%= render :partial => 'general/orglink' %>
-
- <%= render :partial => 'general/topnav' %>
- </div>
- </div>
+ <%= render :partial => 'general/header' %>
<div id="wrapper">
<div id="content">
<% if flash[:notice] %>