adds hiding users by moderators

This commit is contained in:
Juanjo Bazán
2015-08-20 13:04:31 +02:00
parent 259aa29de7
commit b340d7741a
13 changed files with 101 additions and 12 deletions

View File

@@ -1,2 +1,8 @@
<%= link_to t("admin.actions.hide").capitalize, hide_moderation_debate_path(debate),
method: :put, remote: true, data: { confirm: t('admin.actions.confirm') } %>
<% unless debate.author.hidden? %>
&nbsp;|&nbsp;
<%= link_to t("admin.actions.hide_author").capitalize, hide_moderation_user_path(debate.author_id),
method: :put, data: { confirm: t('admin.actions.confirm') } %>
<% end %>

View File

@@ -14,12 +14,12 @@
<div class="debate-info">
<%= avatar_image(@debate.author, size: 32, class: 'author-photo') %>
<!-- if @debate.author.hidden? %>
<% if @debate.author.hidden? %>
<i class="icon-deleted author-deleted"></i>
<span class="author">
<%= t("debates.show.author_deleted") %>
</span>
else -->
<% else %>
<span class="author">
<%= @debate.author.name %>
</span>
@@ -29,7 +29,7 @@
<%= @debate.author.official_position %>
</span>
<% end %>
<!-- end -->
<% end %>
<% if @debate.author.verified_organization? %>
&nbsp;&bullet;&nbsp;
<span class="label round is-association">