Merge pull request #547 from AyuntamientoMadrid/admin-descriptions
refactors /admin listings to include descriptions
This commit is contained in:
@@ -47,6 +47,10 @@ body.admin {
|
||||
.is-featured {
|
||||
margin-top: rem-calc(36);
|
||||
}
|
||||
|
||||
.select-order {
|
||||
min-width: rem-calc(160);
|
||||
}
|
||||
}
|
||||
|
||||
// 02. Sidebar
|
||||
@@ -201,12 +205,16 @@ body.admin {
|
||||
|
||||
.button.tiny.success {
|
||||
margin-left: rem-calc(12);
|
||||
|
||||
&.no-margin {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.moderation-description {
|
||||
max-height: rem-calc(65);
|
||||
overflow: hidden;
|
||||
max-width: rem-calc(750);
|
||||
max-width: rem-calc(590);
|
||||
|
||||
&:hover {
|
||||
cursor: text;
|
||||
|
||||
@@ -4,25 +4,33 @@
|
||||
|
||||
<h3><%= page_entries_info @debates %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<% @debates.each do |debate| %>
|
||||
<li id="<%= dom_id(debate) %>">
|
||||
<%= link_to debate.title, debate_path(debate) %>
|
||||
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius tiny success right" %>
|
||||
|
||||
<% unless debate.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_debate_path(debate, request.query_parameters),
|
||||
<tr id="<%= dom_id(debate) %>">
|
||||
<td>
|
||||
<strong><%= debate.title %></strong>
|
||||
<br>
|
||||
<div class="moderation-description">
|
||||
<%= debate.description %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button radius tiny warning right" %>
|
||||
<% end %>
|
||||
</li>
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius tiny success no-margin" %>
|
||||
</td>
|
||||
<td>
|
||||
<% unless debate.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button radius tiny warning right" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<%= paginate @debates %>
|
||||
|
||||
@@ -4,25 +4,33 @@
|
||||
|
||||
<h3><%= page_entries_info @proposals %></h3>
|
||||
|
||||
<ul class="admin-list">
|
||||
<table>
|
||||
<% @proposals.each do |proposal| %>
|
||||
<li id="<%= dom_id(proposal) %>">
|
||||
<%= link_to proposal.title, proposal_path(proposal) %>
|
||||
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_proposal_path(proposal, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius tiny success right" %>
|
||||
|
||||
<% unless proposal.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_proposal_path(proposal, request.query_parameters),
|
||||
<tr id="<%= dom_id(proposal) %>">
|
||||
<td>
|
||||
<strong><%= proposal.title %></strong>
|
||||
<br>
|
||||
<div class="moderation-description">
|
||||
<%= proposal.description %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_proposal_path(proposal, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button radius tiny warning right" %>
|
||||
<% end %>
|
||||
</li>
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button radius tiny success no-margin" %>
|
||||
</td>
|
||||
<td>
|
||||
<% unless proposal.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_proposal_path(proposal, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button radius tiny warning right" %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</ul>
|
||||
</table>
|
||||
|
||||
<%= paginate @proposals %>
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
</div>
|
||||
|
||||
<%= form_tag moderate_moderation_debates_path(request.query_parameters), method: :put do %>
|
||||
<p class="right js-check">
|
||||
<p class="left js-check">
|
||||
<%= t('shared.check') %>:
|
||||
<%= link_to t('shared.check_all'), '#', data: {check_all: "debate_ids[]"} %>
|
||||
|
|
||||
<%= link_to t('shared.check_none'), '#', data: {check_none: "debate_ids[]"} %>
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<table class="clear">
|
||||
<tr>
|
||||
<th>
|
||||
<%= t("moderation.debates.index.headers.debate") %>
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
</div>
|
||||
|
||||
<%= form_tag moderate_moderation_proposals_path(request.query_parameters), method: :put do %>
|
||||
<p class="right js-check">
|
||||
<p class="left js-check">
|
||||
<%= t('shared.check') %>:
|
||||
<%= link_to t('shared.check_all'), '#', data: {check_all: "proposal_ids[]"} %>
|
||||
|
|
||||
<%= link_to t('shared.check_none'), '#', data: {check_none: "proposal_ids[]"} %>
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<table class="clear">
|
||||
<tr>
|
||||
<th>
|
||||
<%= t("moderation.proposals.index.headers.proposal") %>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
%>
|
||||
|
||||
<form class="inline-block">
|
||||
<select class="js-location-changer js-order-selector" data-order="<%= @current_order %>" name="order-selector">
|
||||
<select class="js-location-changer js-order-selector select-order" data-order="<%= @current_order %>" name="order-selector">
|
||||
<% @valid_orders.each do |order| %>
|
||||
<option <%= 'selected' if order == @current_order %>
|
||||
value='<%= current_path_with_query_params(order: order, page: 1) %>'>
|
||||
|
||||
Reference in New Issue
Block a user