]> git.openstreetmap.org Git - rails.git/blob - app/views/diary_entry/list.html.erb
Highlight the history tab correctly
[rails.git] / app / views / diary_entry / list.html.erb
1 <% content_for :heading do %>
2   <div <% if @this_user %> id="userinformation"<% end %> >
3     <% if @this_user %>
4       <%= user_image @this_user %>
5     <% end %>
6     <h2><%= h(@title) %></h2>
7
8     <ul class='secondary-actions clearfix'>
9       <% unless params[:friends] or params[:nearby] -%>
10         <li><%= rss_link_to :action => 'rss', :language => params[:language] %></li>
11       <% end -%>
12
13       <% if @this_user %>
14         <%= if_user(@this_user) do %>
15           <li><%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %></li>
16         <% end %>
17       <% else %>
18         <%= if_logged_in do %>
19           <li><%= link_to image_tag("new.png", :class => "small_icon", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %></li>
20         <% end %>
21       <% end %>
22     </ul>
23   </div>
24 <% end %>
25
26 <% if @entries.empty? %>
27   <h4><%= t 'diary_entry.list.no_entries' %></h4>
28 <% else %>
29   <h4><%= t 'diary_entry.list.recent_entries' %></h4>
30
31 <% if @this_user %>
32   <%= render :partial => 'diary_entry', :collection => @entries %>
33 <% else %>
34   <%= render :partial => 'diary_list_entry', :collection => @entries %>
35 <% end %>
36
37 <%= link_to t('diary_entry.list.older_entries'), { :page => @entry_pages.current.next, :language => params[:language] } if @entry_pages.current.next %>
38 <% if @entry_pages.current.next and @entry_pages.current.previous %>|<% end %>
39 <%= link_to t('diary_entry.list.newer_entries'), { :page => @entry_pages.current.previous, :language => params[:language] } if @entry_pages.current.previous %>
40
41 <% end %>
42
43 <% unless params[:friends] or params[:nearby] -%>
44   <% content_for :head do -%>
45   <%= auto_discovery_link_tag :atom, :action => 'rss', :language => params[:language] %>
46   <% end -%>
47 <% end -%>