/
index.html.erb
58 lines (50 loc) · 1.65 KB
/
index.html.erb
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
58
<% content_for :heading do %>
<div <% if @user %> id="userinformation"<% end %>>
<% if @user %>
<%= user_image @user %>
<% end %>
<h1><%= h(@title) %></h1>
<ul class='secondary-actions clearfix'>
<% unless params[:friends] or params[:nearby] -%>
<li><%= rss_link_to :action => "rss", :language => params[:language] %></li>
<% end -%>
<% if @user %>
<% if @user == current_user %>
<div>
<li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
</div>
<% end %>
<% else %>
<% if current_user %>
<div>
<li><%= link_to image_tag("new.png", :class => "small_icon", :border => 0) + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
</div>
<% end %>
<% end %>
</ul>
</div>
<% end %>
<% if @entries.empty? %>
<h4><%= t ".no_entries" %></h4>
<% else %>
<h4><%= t ".recent_entries" %></h4>
<%= render @entries %>
<div class="pagination">
<% if @entries.size < @page_size -%>
<%= t(".older_entries") %>
<% else -%>
<%= link_to t(".older_entries"), @params.merge(:page => @page + 1) %>
<% end -%>
|
<% if @page > 1 -%>
<%= link_to t(".newer_entries"), @params.merge(:page => @page - 1) %>
<% else -%>
<%= t(".newer_entries") %>
<% end -%>
</div>
<% end %>
<% unless params[:friends] or params[:nearby] -%>
<% content_for :auto_discovery_link_tag do -%>
<%= auto_discovery_link_tag :rss, :action => "rss", :language => params[:language] %>
<% end -%>
<% end -%>