Improves styles for retire proposals

This commit is contained in:
Alberto Garcia Cabeza
2016-04-23 00:40:28 +02:00
committed by Juanjo Bazán
parent 5b4a7b8cf8
commit f079bdac8a
6 changed files with 50 additions and 31 deletions

View File

@@ -545,7 +545,7 @@ footer {
// 04. Tags
// - - - - - - - - - - - - - - - - - - - - - - - - -
.tags a , .tag-cloud a, .categories a, .geozone a {
.tags a , .tag-cloud a, .categories a, .geozone a, .sidebar-links a {
background: #ececec;
border-radius: rem-calc(6);
color: $text;
@@ -1730,9 +1730,12 @@ table {
border: 0;
td {
padding-left: $line-height*1.5;
position: relative;
word-break: break-all;
&:first-child {
padding-left: $line-height*1.5;
width: 80%;
}
&:before {
color: $brand;
@@ -1753,11 +1756,18 @@ table {
top: 14px;
}
&.activity-proposals td:first-child:before {
&.activity-proposals {
td:first-child:before {
content: "h";
top: 18px;
}
.retired {
text-decoration: line-through;
}
}
&.activity-investment-projects td:first-child:before {
content: "\53";
top: 10px;

View File

@@ -343,6 +343,10 @@
word-wrap: break-word;
}
.callout.proposal-retired {
font-size: $base-font-size;
}
.social-share-full .social-share-button {
display:inline;
}

View File

@@ -1,13 +1,13 @@
<div class="sidebar-divider"></div>
<h3 class="sidebar-title"><%= t("proposals.index.retired_proposals") %></h3>
<p>
<% if params[:retired].blank? %>
<%= link_to t("proposals.index.retired_proposals_link"), proposals_path(retired: 'all'), class: "small" %><br>
<p><%= link_to t("proposals.index.retired_proposals_link"), proposals_path(retired: 'all'), class: "small" %></p>
<% else %>
<%= link_to t("proposals.index.retired_links.all"), proposals_path(retired: 'all'), ({class: "small"} unless params[:retired] == 'all') %><br>
<div class="sidebar-links">
<%= link_to t("proposals.index.retired_links.all"), proposals_path(retired: 'all'), ({class: "small"} unless params[:retired] == 'all') %>
<% Proposal::RETIRE_OPTIONS.each do |option| %>
<%= link_to t("proposals.index.retired_links.#{option}"), proposals_path(retired: option), ({class: "small"} unless params[:retired] == option) %><br>
<%= link_to t("proposals.index.retired_links.#{option}"), proposals_path(retired: option), ({class: "small"} unless params[:retired] == option) %>
<% end %>
</div>
<% end %>
</p>

View File

@@ -2,33 +2,34 @@
<div class="small-12 column">
<div class="float-right">
<%= link_to @proposal.title, @proposal %>
</div>
<h1 class="inline-block"><%= t("proposals.retire_form.title") %></h1>
<h1><%= t("proposals.retire_form.title") %></h1>
<h3><%= link_to @proposal.title, @proposal %></h3>
<div data-alert class="callout primary">
<div data-alert class="callout warning">
<%= t("proposals.retire_form.warning") %>
</div>
<%= form_for(@proposal, url: retire_proposal_path(@proposal)) do |f| %>
<%= render 'shared/errors', resource: @proposal %>
<div class="row">
<div class="small-12 medium-6 column">
<div class="small-12 medium-6 large-4 column">
<%= f.label :retired_reason, t("proposals.retire_form.retired_reason_label") %>
<%= f.select :retired_reason, retire_proposals_options, {include_blank: t("proposals.retire_form.retired_reason_blank"), label: false} %>
</div>
</div>
<div class="small-12 column">
<div class="row">
<div class="small-12 medium-9 column">
<%= f.label :retired_explanation, t("proposals.retire_form.retired_explanation_label") %>
<%= f.text_area :retired_explanation, rows: 4, maxlength: 500, label: false,
placeholder: t('proposals.retire_form.retired_explanation_placeholder') %>
</div>
</div>
<div class="actions small-12 column">
<%= f.submit(class: "button", value: t("proposals.retire_form.submit_button")) %>
<div class="row">
<div class="actions small-12 medium-3 column">
<%= f.submit(class: "button expanded", value: t("proposals.retire_form.submit_button")) %>
</div>
</div>
<% end %>

View File

@@ -23,8 +23,11 @@
<h1><%= @proposal.title %></h1>
<% if @proposal.retired? %>
<div data-alert class="callout alert margin-top">
<strong><%= t("proposals.show.retired_warning") %> <%= link_to t("proposals.show.retired_warning_link_to_explanation"), "#retired_explanation" %></strong>
<div data-alert class="callout alert margin-top proposal-retired">
<strong>
<%= t("proposals.show.retired_warning") %><br>
<%= link_to t("proposals.show.retired_warning_link_to_explanation"), "#retired_explanation" %>
</strong>
</div>
<% elsif @proposal.conflictive? %>
<div data-alert class="callout alert margin-top">
@@ -79,9 +82,10 @@
<h4><%= @proposal.question %></h4>
<% if @proposal.retired? %>
<a id="retired_explanation"></a>
<div id="retired_explanation" class="callout">
<h2><%= t('proposals.show.retired') %>: <%= t("proposals.retire_options.#{@proposal.retired_reason}") unless @proposal.retired_reason == 'other' %></h2>
<%= simple_format text_with_links(@proposal.retired_explanation), {}, sanitize: false %>
</div>
<% end %>
<%= render 'shared/tags', taggable: @proposal %>

View File

@@ -2,13 +2,13 @@
<% @proposals.each do |proposal| %>
<tr id="proposal_<%= proposal.id %>">
<td>
<%= link_to proposal.title, proposal, proposal.retired? ? {class: 'delete'} : {} %>
<%= link_to proposal.title, proposal, proposal.retired? ? {class: 'retired'} : {} %>
<br>
<%= proposal.summary %>
</td>
<td>
<td class="text-center">
<% if proposal.retired? %>
<%= t('users.show.retired') %>
<span class="label alert"><%= t('users.show.retired') %></span>
<% else %>
<%= link_to t('users.show.retire'),
retire_form_proposal_path(proposal),