Commit 28b264c71e7617d0668ce813259a57583f229e01
1 parent
56995e9d
Exists in
master
and in
28 other branches
ActionItem934: delete button in the right
Showing
1 changed file
with
7 additions
and
7 deletions
Show diff stats
app/views/content_viewer/_comment.rhtml
1 | 1 | <%= content_tag('a', '', :name => comment.anchor) %> |
2 | 2 | <div class="article-comment<%= ' comment-from-owner' if ( comment.author && (@page.profile.name == comment.author.name) ) %> comment-logged-<%= comment.author ? 'in' : 'out' %>"> |
3 | - | |
3 | + | |
4 | + <% if logged_in? && (user == @page.profile || user == comment.author || user.has_permission?(:moderate_comments, @page.profile)) %> | |
5 | + <% button_bar(:style => 'float: right; margin-top: 0px;') do %> | |
6 | + <%= icon_button(:delete, _('Remove this comment'), { :profile => params[:profile], :remove_comment => comment.id }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %> | |
7 | + <% end %> | |
8 | + <% end %> | |
9 | + | |
4 | 10 | <% if comment.author %> |
5 | 11 | <%= link_to content_tag( 'span', comment.author.name() ), comment.author.url, |
6 | 12 | :class => 'comment-picture', |
... | ... | @@ -14,12 +20,6 @@ |
14 | 20 | %> |
15 | 21 | <% end %> |
16 | 22 | |
17 | - <% if logged_in? && (user == @page.profile || user == comment.author || user.has_permission?(:moderate_comments, @page.profile)) %> | |
18 | - <% button_bar(:style => 'float: right; margin-top: 0;') do %> | |
19 | - <%= icon_button(:delete, _('Remove'), { :profile => params[:profile], :remove_comment => comment.id }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %> | |
20 | - <% end %> | |
21 | - <% end %> | |
22 | - | |
23 | 23 | <h4><%= comment.title %></h4> |
24 | 24 | <div class="comment-info"> |
25 | 25 | <%= _('By %{author} on %{date}') % { | ... | ... |