]> git.openstreetmap.org Git - rails.git/blob - app/views/diary_entries/show.html.erb
Merge remote-tracking branch 'upstream/pull/2381'
[rails.git] / app / views / diary_entries / show.html.erb
1 <% content_for :heading do %>
2   <div id="userinformation">
3     <%= user_image @entry.user %>
4     <h2><%= link_to t(".user_title", :user => @entry.user.display_name), :action => :index %></h2>
5     <p><%= rss_link_to :action => :rss, :display_name => @entry.user.display_name %></p>
6   </div>
7 <% end %>
8
9 <%= render @entry %>
10
11 <a id="comments"></a>
12 <div class='comments'>
13 <%= render :partial => "diary_comment", :collection => @comments %>
14 </div>
15
16 <div>
17   <% if current_user %>
18     <h3 id="newcomment"><%= t ".leave_a_comment" %></h3>
19
20     <%= error_messages_for "diary_comment" %>
21
22     <%= form_for @entry.comments.new, :url => { :action => "comment" } do |f| %>
23       <%= richtext_area :diary_comment, :body, :cols => 80, :rows => 15 %>
24       <%= f.submit %>
25     <% end %>
26     <% if @entry.subscribers.exists?(current_user.id) %>
27       <div class="diary-subscribe-buttons"><%= link_to t("javascripts.changesets.show.unsubscribe"), diary_entry_unsubscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div>
28     <% else %>
29       <div class="diary-subscribe-buttons"><%= link_to t("javascripts.changesets.show.subscribe"), diary_entry_subscribe_path(:display_name => @entry.user.display_name, :id => @entry.id), :method => :post, :class => :button %></div>
30     <% end %>
31   <% else %>
32     <h3 id="newcomment"><%= t(".login_to_leave_a_comment_html", :login_link => link_to(t(".login"), :controller => "users", :action => "login", :referer => request.fullpath)) %></h3>
33   <% end %>
34 </div>
35
36 <% content_for :auto_discovery_link_tag do -%>
37 <%= auto_discovery_link_tag :rss, :action => :rss, :display_name => @entry.user.display_name %>
38 <% end -%>