]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/diary_entry/_diary_entry.html.erb
Added report icon + changes to admin UI + changes to report form + few other minor...
[rails.git] / app / views / diary_entry / _diary_entry.html.erb
index a88e8adbc114f28c5873b668626644a912d29259..9af5586d3414882c31d72b716f0d416980df9eee 100644 (file)
@@ -5,8 +5,22 @@
     <% end %>
 
     <h2><%= link_to h(diary_entry.title), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></h2>
+
+    <% if @user and diary_entry.user.id != @user.id %>
+      <div class="report-button">
+          <%= link_to new_issue_url(reportable_id: diary_entry.id, reportable_type: diary_entry.class.name, reported_user_id: diary_entry.user.id), :title => t('diary_entry.diary_entry.report') do %>
+            <%= image_tag('notice.png', size: '10x10') %>
+          <% end %>
+      </div>
+    <% end %>
+
+    <small class='deemphasize'>
+      <%= raw(t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %>
+    </small>
+
   </div>
-  <div xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">
+
+  <div class="richtext" xml:lang="<%= diary_entry.language_code %>" lang="<%= diary_entry.language_code %>">
     <%= diary_entry.body.to_html %>
   </div>
 
     <%= render :partial => "location", :object => diary_entry %>
   <% end %>
 
-  <small class='deemphasize'>
-    <%= raw(t 'diary_entry.diary_entry.posted_by', :link_user => (link_to h(diary_entry.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_entry.user.display_name), :created => l(diary_entry.created_at, :format => :friendly), :language_link => (link_to h(diary_entry.language.name), :controller => 'diary_entry', :action => 'list', :display_name => nil, :language => diary_entry.language_code)) %>
-  </small>
-
   <ul class='secondary-actions clearfix'>
     <% if params[:action] == 'list' %>
       <li><%= link_to t('diary_entry.diary_entry.comment_link'), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %></li>
       <li><%= link_to t('diary_entry.diary_entry.comment_count', :count => diary_entry.visible_comments.count), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %></li>
     <% end %>
 
-    <%= if_user(diary_entry.user, :span) do %>
-      <li><%= link_to t('diary_entry.diary_entry.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %></li>
+    <%= if_user(diary_entry.user, :li) do %>
+      <%= link_to t('diary_entry.diary_entry.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
     <% end %>
 
-    <%= if_administrator(:span) do %>
-      <li><%= link_to t('diary_entry.diary_entry.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('diary_entry.diary_entry.confirm') } %></li>
+
+    <%= if_administrator(:li) do %>
+      <%= link_to t('diary_entry.diary_entry.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('diary_entry.diary_entry.confirm') } %>
     <% end %>
   </ul>
 </div>