1 <article class='diary_post border-top border-secondary-subtle py-3<%= " text-muted px-3 bg-danger bg-opacity-10" unless diary_entry.visible %> user_<%= diary_entry.user.id %>'>
2 <%= render :partial => "diary_entry_heading", :object => diary_entry, :as => "diary_entry" %>
4 <div class="richtext text-break" xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">
5 <%= diary_entry.body.to_html %>
8 <% if diary_entry.latitude and diary_entry.longitude %>
9 <%= render :partial => "location", :object => diary_entry %>
12 <nav class='secondary-actions'>
14 <% if params[:action] == 'index' %>
15 <li><%= link_to t(".comment_link"), diary_entry_path(diary_entry.user, diary_entry, :anchor => "newcomment") %></li>
16 <li><%= link_to t(".reply_link"), new_message_path(diary_entry.user, :message => { :title => "Re: #{diary_entry.title}" }) %></li>
18 <% if diary_entry.visible_comments.count > 0 %>
19 <%= link_to t(".comment_count", :count => diary_entry.visible_comments.count), diary_entry_path(diary_entry.user, diary_entry, :anchor => "comments") %>
21 <%= link_to t(".no_comments"), diary_entry_path(diary_entry.user, diary_entry, :anchor => "comments") %>
26 <% if current_user && current_user == diary_entry.user %>
27 <li><%= link_to t(".edit_link"), edit_diary_entry_path(diary_entry.user, diary_entry) %></li>
30 <% if current_user and diary_entry.user != current_user %>
32 <%= report_link(t(".report"), diary_entry) %>
36 <% if can? :hide, DiaryEntry %>
38 <% if diary_entry.visible %>
39 <%= link_to t(".hide_link"), hide_diary_entry_path(diary_entry.user, diary_entry), :method => :post, :data => { :confirm => t(".confirm") } %>
41 <%= link_to t(".unhide_link"), unhide_diary_entry_path(diary_entry.user, diary_entry), :method => :post, :data => { :confirm => t(".confirm") } %>