]> git.openstreetmap.org Git - rails.git/blob - app/views/diary_entries/index.html.erb
Add noindex meta tag to diary index pages
[rails.git] / app / views / diary_entries / index.html.erb
1 <% content_for :head, tag(:meta, :name => :robots, :content => :noindex) %>
2 <% content_for :heading do %>
3   <div <% if @user %> id="userinformation"<% end %>>
4     <% if @user %>
5       <%= user_image @user %>
6     <% end %>
7     <h1><%= @title %></h1>
8
9     <ul class='secondary-actions clearfix'>
10       <% unless params[:friends] or params[:nearby] -%>
11         <li><%= rss_link_to :action => "rss", :language => params[:language] %></li>
12       <% end -%>
13
14       <% if @user && @user == current_user || !@user && current_user %>
15         <li><%= link_to image_tag("new.png", :class => "small_icon") + t(".new"), new_diary_entry_path, :title => t(".new_title") %></li>
16       <% end %>
17
18       <% if !@user && current_user %>
19         <li><%= link_to t(".my_diary"), :controller => "diary_entries", :action => "index", :display_name => current_user.display_name %></li>
20       <% end %>
21     </ul>
22   </div>
23 <% end %>
24
25 <% if @entries.empty? %>
26   <h4><%= t ".no_entries" %></h4>
27 <% else %>
28   <h4><%= t ".recent_entries" %></h4>
29
30   <%= render @entries %>
31
32   <div class="pagination">
33     <% if @entries.size < @page_size -%>
34       <%= t(".older_entries") %>
35     <% else -%>
36       <%= link_to t(".older_entries"), @params.merge(:page => @page + 1) %>
37     <% end -%>
38
39     |
40
41     <% if @page > 1 -%>
42       <%= link_to t(".newer_entries"), @params.merge(:page => @page - 1) %>
43     <% else -%>
44       <%= t(".newer_entries") %>
45     <% end -%>
46   </div>
47 <% end %>
48
49 <% unless params[:friends] or params[:nearby] -%>
50   <% content_for :auto_discovery_link_tag do -%>
51   <%= auto_discovery_link_tag :rss, :action => "rss", :language => params[:language] %>
52   <% end -%>
53 <% end -%>