improves layout and unifies design of admin moderated content
This commit is contained in:
@@ -2,34 +2,46 @@
|
||||
|
||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.comments.index" %>
|
||||
|
||||
<h3><%= page_entries_info @comments %></h3>
|
||||
<% if @comments.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @comments %></h3>
|
||||
|
||||
<table>
|
||||
<% @comments.each do |comment| %>
|
||||
<tr id="<%= dom_id(comment) %>">
|
||||
<td>
|
||||
<%= text_with_links comment.body %><br>
|
||||
<% if comment.commentable.hidden? %>
|
||||
(<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
|
||||
<% else %>
|
||||
<%= link_to comment.commentable.title, comment.commentable %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_comment_path(comment, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow on-hover-block" %>
|
||||
<% unless comment.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_comment_path(comment, request.query_parameters),
|
||||
<table>
|
||||
<thead>
|
||||
<th scope="col" class="small-9"><%= t("admin.shared.description") %></th>
|
||||
<th scope="col"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @comments.each do |comment| %>
|
||||
<tr id="<%= dom_id(comment) %>">
|
||||
<td>
|
||||
<%= text_with_links comment.body %><br>
|
||||
<% if comment.commentable.hidden? %>
|
||||
(<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
|
||||
<% else %>
|
||||
<%= link_to comment.commentable.title, comment.commentable %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_comment_path(comment, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button hollow warning on-hover-block" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow warning" %>
|
||||
<% unless comment.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_comment_path(comment, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @comments %>
|
||||
<%= paginate @comments %>
|
||||
<% else %>
|
||||
<div class="callout primary margin">
|
||||
<%= t("admin.comments.index.no_hidden_comments") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -2,33 +2,47 @@
|
||||
|
||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.debates.index" %>
|
||||
|
||||
<h3><%= page_entries_info @debates %></h3>
|
||||
<% if @debates.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @debates %></h3>
|
||||
|
||||
<table>
|
||||
<% @debates.each do |debate| %>
|
||||
<tr id="<%= dom_id(debate) %>">
|
||||
<td>
|
||||
<strong><%= debate.title %></strong>
|
||||
<br>
|
||||
<div class="moderation-description">
|
||||
<%= debate.description %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow on-hover" %>
|
||||
<% unless debate.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_debate_path(debate, request.query_parameters),
|
||||
<table>
|
||||
<thead>
|
||||
<th scope="col"><%= t("admin.shared.title") %></th>
|
||||
<th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
|
||||
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @debates.each do |debate| %>
|
||||
<tr id="<%= dom_id(debate) %>">
|
||||
<td class="align-top">
|
||||
<strong><%= debate.title %></strong>
|
||||
</td>
|
||||
<td>
|
||||
<div class="moderation-description">
|
||||
<%= debate.description %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button hollow warning on-hover" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow warning" %>
|
||||
<% unless debate.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @debates %>
|
||||
<%= paginate @debates %>
|
||||
<% else %>
|
||||
<div class="callout primary margin">
|
||||
<%= t("admin.debates.index.no_hidden_debates") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -2,32 +2,42 @@
|
||||
|
||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.hidden_users.index" %>
|
||||
|
||||
<h3><%= page_entries_info @users %></h3>
|
||||
<% if @users.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @users %></h3>
|
||||
|
||||
<table>
|
||||
<% @users.each do |user| %>
|
||||
<tr id="<%= dom_id(user) %>">
|
||||
<td>
|
||||
<p><%= link_to user.name, admin_hidden_user_path(user) %></p>
|
||||
</td>
|
||||
<table>
|
||||
<thead>
|
||||
<th scope="col" class="small-9"><%= t("admin.hidden_users.index.user") %></th>
|
||||
<th scope="col"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @users.each do |user| %>
|
||||
<tr id="<%= dom_id(user) %>">
|
||||
<td>
|
||||
<p><%= link_to user.name, admin_hidden_user_path(user) %></p>
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_hidden_user_path(user, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow on-hover" %>
|
||||
<% unless user.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_hidden_user_path(user, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button hollow warning on-hover" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<td>
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_hidden_user_path(user, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow warning" %>
|
||||
<% unless user.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_hidden_user_path(user, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @users %>
|
||||
<% else %>
|
||||
<div class="callout primary margin">
|
||||
<%= t("admin.hidden_users.index.no_hidden_users") %>
|
||||
</div>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @users %>
|
||||
|
||||
|
||||
|
||||
@@ -2,41 +2,55 @@
|
||||
|
||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.proposals.index" %>
|
||||
|
||||
<h3><%= page_entries_info @proposals %></h3>
|
||||
<% if @proposals.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @proposals %></h3>
|
||||
|
||||
<table>
|
||||
<% @proposals.each do |proposal| %>
|
||||
<tr id="<%= dom_id(proposal) %>">
|
||||
<td>
|
||||
<strong><%= proposal.title %></strong>
|
||||
<br>
|
||||
<div class="moderation-description">
|
||||
<p><%= proposal.summary %></p>
|
||||
<%= proposal.description %>
|
||||
<% if proposal.external_url.present? %>
|
||||
<p><%= text_with_links proposal.external_url %></p>
|
||||
<% end %>
|
||||
<% if proposal.video_url.present? %>
|
||||
<p><%= text_with_links proposal.video_url %></p>
|
||||
<% end %>
|
||||
<p><%= proposal.question %></p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_proposal_path(proposal, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow on-hover-block" %>
|
||||
<% unless proposal.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_proposal_path(proposal, request.query_parameters),
|
||||
<table>
|
||||
<thead>
|
||||
<th scope="col"><%= t("admin.shared.title") %></th>
|
||||
<th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
|
||||
<th scope="col" class="small-3"><%= t("admin.shared.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @proposals.each do |proposal| %>
|
||||
<tr id="<%= dom_id(proposal) %>">
|
||||
<td class="align-top">
|
||||
<strong><%= proposal.title %></strong>
|
||||
</td>
|
||||
<td>
|
||||
<div class="moderation-description">
|
||||
<p><small><%= proposal.summary %></small></p>
|
||||
<%= proposal.description %>
|
||||
<% if proposal.external_url.present? %>
|
||||
<p><%= text_with_links proposal.external_url %></p>
|
||||
<% end %>
|
||||
<% if proposal.video_url.present? %>
|
||||
<p><%= text_with_links proposal.video_url %></p>
|
||||
<% end %>
|
||||
<p><%= proposal.question %></p>
|
||||
</div>
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_proposal_path(proposal, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button hollow warning on-hover-block" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow warning" %>
|
||||
<% unless proposal.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_proposal_path(proposal, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= paginate @proposals %>
|
||||
<%= paginate @proposals %>
|
||||
<% else %>
|
||||
<div class="callout primary margin">
|
||||
<%= t("admin.proposals.index.no_hidden_proposals") %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
@@ -213,6 +213,7 @@ en:
|
||||
hidden_debate: Hidden debate
|
||||
hidden_proposal: Hidden proposal
|
||||
title: Hidden comments
|
||||
no_hidden_comments: There is no hidden comments.
|
||||
dashboard:
|
||||
index:
|
||||
back: Go back to %{org}
|
||||
@@ -226,6 +227,7 @@ en:
|
||||
with_confirmed_hide: Confirmed
|
||||
without_confirmed_hide: Pending
|
||||
title: Hidden debates
|
||||
no_hidden_debates: There is no hidden debates.
|
||||
hidden_users:
|
||||
index:
|
||||
filter: Filter
|
||||
@@ -234,6 +236,8 @@ en:
|
||||
with_confirmed_hide: Confirmed
|
||||
without_confirmed_hide: Pending
|
||||
title: Hidden users
|
||||
user: User
|
||||
no_hidden_users: There is no hidden users.
|
||||
show:
|
||||
email: 'Email:'
|
||||
hidden_at: 'Hidden at:'
|
||||
@@ -715,6 +719,7 @@ en:
|
||||
with_confirmed_hide: Confirmed
|
||||
without_confirmed_hide: Pending
|
||||
title: Hidden proposals
|
||||
no_hidden_proposals: There is no hidden proposals.
|
||||
settings:
|
||||
flash:
|
||||
updated: Value updated
|
||||
@@ -757,6 +762,9 @@ en:
|
||||
placeholder: Search user by name or email
|
||||
search_results: "Search results"
|
||||
no_search_results: "No results found."
|
||||
actions: Actions
|
||||
title: Title
|
||||
description: Description
|
||||
spending_proposals:
|
||||
index:
|
||||
geozone_filter_all: All zones
|
||||
|
||||
@@ -213,6 +213,7 @@ es:
|
||||
hidden_debate: Debate oculto
|
||||
hidden_proposal: Propuesta oculta
|
||||
title: Comentarios ocultos
|
||||
no_hidden_comments: No hay comentarios ocultos.
|
||||
dashboard:
|
||||
index:
|
||||
back: Volver a %{org}
|
||||
@@ -226,6 +227,7 @@ es:
|
||||
with_confirmed_hide: Confirmados
|
||||
without_confirmed_hide: Pendientes
|
||||
title: Debates ocultos
|
||||
no_hidden_debates: No hay debates ocultos.
|
||||
hidden_users:
|
||||
index:
|
||||
filter: Filtro
|
||||
@@ -234,6 +236,8 @@ es:
|
||||
with_confirmed_hide: Confirmados
|
||||
without_confirmed_hide: Pendientes
|
||||
title: Usuarios bloqueados
|
||||
user: Usuario
|
||||
no_hidden_users: No hay uusarios bloqueados.
|
||||
show:
|
||||
email: 'Email:'
|
||||
hidden_at: 'Bloqueado:'
|
||||
@@ -717,6 +721,7 @@ es:
|
||||
with_confirmed_hide: Confirmadas
|
||||
without_confirmed_hide: Pendientes
|
||||
title: Propuestas ocultas
|
||||
no_hidden_proposals: No hay propuestas ocultas.
|
||||
settings:
|
||||
flash:
|
||||
updated: Valor actualizado
|
||||
@@ -759,6 +764,9 @@ es:
|
||||
placeholder: Buscar usuario por nombre o email
|
||||
search_results: "Resultados de la búsqueda"
|
||||
no_search_results: "No se han encontrado resultados."
|
||||
actions: Acciones
|
||||
title: "Título"
|
||||
description: "Descripción"
|
||||
spending_proposals:
|
||||
index:
|
||||
geozone_filter_all: Todos los ámbitos de actuación
|
||||
|
||||
Reference in New Issue
Block a user