]> git.openstreetmap.org Git - rails.git/blob - app/views/diary_entry/list.html.erb
Lots more work on making RTL layout work
[rails.git] / app / views / diary_entry / list.html.erb
1 <div id="diary_list">
2   <% if @this_user %>
3     <%= user_image @this_user %>
4   <% end %>
5
6   <h2><%= h(@title) %></h2>
7
8   <% if @this_user %>
9     <% if_user(@this_user) do %>
10       <%= link_to image_tag("new.png", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %>
11     <% end %>
12   <% else %>
13     <% if_logged_in do %>
14       <%= link_to image_tag("new.png", :border=>0) + t('diary_entry.list.new'), {:controller => 'diary_entry', :action => 'new'}, {:title => t('diary_entry.list.new_title')} %>
15     <% end %>
16   <% end %>
17
18   <% if @entries.empty? %>
19     <p><%= t 'diary_entry.list.no_entries' %></p>
20   <% else %>
21     <p><%= t 'diary_entry.list.recent_entries' %></p>
22
23     <hr />
24
25     <% if @this_user %>
26       <%= render :partial => 'diary_entry', :collection => @entries %>
27     <% else %>
28       <%= render :partial => 'diary_list_entry', :collection => @entries %>
29     <% end %>
30
31     <%= link_to t('diary_entry.list.older_entries'), { :page => @entry_pages.current.next, :language => params[:language] } if @entry_pages.current.next %>
32     <% if @entry_pages.current.next and @entry_pages.current.previous %>|<% end %>
33     <%= link_to t('diary_entry.list.newer_entries'), { :page => @entry_pages.current.previous, :language => params[:language] } if @entry_pages.current.previous %>
34
35     <br />
36   <% end %>
37
38   <%= rss_link_to :action => 'rss', :language => params[:language] %>
39 </div>
40
41 <% content_for :head do %>
42 <%= auto_discovery_link_tag :atom, :action => 'rss', :language => params[:language] %>
43 <% end %>