diff options
Diffstat (limited to 'app/views/general')
-rw-r--r-- | app/views/general/_frontpage_requests_list.html.erb | 2 | ||||
-rw-r--r-- | app/views/general/_header.html.erb | 37 |
2 files changed, 38 insertions, 1 deletions
diff --git a/app/views/general/_frontpage_requests_list.html.erb b/app/views/general/_frontpage_requests_list.html.erb index fa498dfa7..a628c14ef 100644 --- a/app/views/general/_frontpage_requests_list.html.erb +++ b/app/views/general/_frontpage_requests_list.html.erb @@ -21,7 +21,7 @@ <%=link_to h(event.info_request.title), request_path(event.info_request)%> <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> - <p class="excerpt" onclick="document.location.href='<%=request_path(event.info_request)%>'"><%= excerpt(event.search_text_main(true), "", 200) %></p> + <p class="excerpt" onclick="document.location.href='<%=request_path(event.info_request)%>'"><%= excerpt(event.search_text_main(true), "", :radius => 200) %></p> </li> <% end %> </ul> 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> |