improves layout and unifies design of admin moderated content

This commit is contained in:
decabeza
2017-10-13 20:57:19 +02:00
parent ae74e1ba07
commit d91388b2b3
6 changed files with 182 additions and 116 deletions

View File

@@ -2,9 +2,15 @@
<%= 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>
<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>
@@ -15,21 +21,27 @@
<%= link_to comment.commentable.title, comment.commentable %>
<% end %>
</td>
<td class="text-right">
<td>
<%= 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" %>
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 hollow warning on-hover-block" %>
class: "button" %>
<% end %>
</td>
</tr>
<% end %>
</table>
</tbody>
</table>
<%= paginate @comments %>
<%= paginate @comments %>
<% else %>
<div class="callout primary margin">
<%= t("admin.comments.index.no_hidden_comments") %>
</div>
<% end %>

View File

@@ -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>
<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>
<td class="align-top">
<strong><%= debate.title %></strong>
<br>
</td>
<td>
<div class="moderation-description">
<%= debate.description %>
</div>
</td>
<td class="text-right">
<td class="align-top">
<%= 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" %>
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 hollow warning on-hover" %>
class: "button" %>
<% end %>
</td>
</tr>
<% end %>
</table>
</tbody>
</table>
<%= paginate @debates %>
<%= paginate @debates %>
<% else %>
<div class="callout primary margin">
<%= t("admin.debates.index.no_hidden_debates") %>
</div>
<% end %>

View File

@@ -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| %>
<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">
<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 on-hover" %>
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 hollow warning on-hover" %>
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 %>

View File

@@ -2,16 +2,24 @@
<%= 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>
<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>
<td class="align-top">
<strong><%= proposal.title %></strong>
<br>
</td>
<td>
<div class="moderation-description">
<p><%= proposal.summary %></p>
<p><small><%= proposal.summary %></small></p>
<%= proposal.description %>
<% if proposal.external_url.present? %>
<p><%= text_with_links proposal.external_url %></p>
@@ -22,21 +30,27 @@
<p><%= proposal.question %></p>
</div>
</td>
<td class="text-right">
<td class="align-top">
<%= 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" %>
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 hollow warning on-hover-block" %>
class: "button" %>
<% end %>
</td>
</tr>
<% end %>
</table>
</tbody>
</table>
<%= paginate @proposals %>
<%= paginate @proposals %>
<% else %>
<div class="callout primary margin">
<%= t("admin.proposals.index.no_hidden_proposals") %>
</div>
<% end %>

View File

@@ -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

View File

@@ -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