From eec05219ccd0bfbf9b6022adf9645728f8ff89b6 Mon Sep 17 00:00:00 2001 From: decabeza Date: Wed, 18 Oct 2017 18:54:43 +0200 Subject: [PATCH] improves html markup on activity tables --- app/assets/stylesheets/layout.scss | 51 +------------------- app/views/users/_budget_investment.html.erb | 4 +- app/views/users/_budget_investments.html.erb | 14 ++++-- app/views/users/_comments.html.erb | 25 ++++++---- app/views/users/_debates.html.erb | 21 +++++--- app/views/users/_proposal.html.erb | 4 +- app/views/users/_proposals.html.erb | 14 ++++-- config/locales/en/general.yml | 5 ++ config/locales/es/general.yml | 5 ++ 9 files changed, 64 insertions(+), 79 deletions(-) diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index 06fdfd396..55ab2159f 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -2033,7 +2033,6 @@ table { // ------------ .activity { - margin-bottom: $line-height * 2; .accordion li { margin-bottom: $line-height / 2; @@ -2065,54 +2064,8 @@ table { } } - table { - border: 0; - margin-bottom: 0; - } - - td { - position: relative; - - &:first-child { - padding-left: $line-height * 1.5; - width: 75%; - } - - &::before { - color: $brand; - font-family: "icons" !important; - font-size: rem-calc(24); - left: 4px; - position: absolute; - } - } - - .activity-comments td:first-child::before { - content: 'e'; - top: 18px; - } - - .activity-debates td:first-child::before { - content: 'i'; - top: 14px; - } - - .activity-proposals { - - td:first-child::before { - content: 'h'; - top: 18px; - } - - .retired { - text-decoration: line-through; - } - } - - .activity-investment-projects td:first-child::before, - .activity-ballot td:first-child::before { - content: '\53'; - top: 10px; + .retired { + text-decoration: line-through; } } diff --git a/app/views/users/_budget_investment.html.erb b/app/views/users/_budget_investment.html.erb index 774fae777..00a1eab20 100644 --- a/app/views/users/_budget_investment.html.erb +++ b/app/views/users/_budget_investment.html.erb @@ -2,10 +2,10 @@ <%= link_to budget_investment.title, budget_investment_path(budget_investment.budget, budget_investment) %> - + <% if can? :destroy, budget_investment %> <%= link_to t('shared.delete'), budget_investment_path(budget_investment.budget, budget_investment), - method: :delete, class: "button hollow alert" %> + method: :delete, class: "button hollow alert expanded" %> <% end %> diff --git a/app/views/users/_budget_investments.html.erb b/app/views/users/_budget_investments.html.erb index fb782f97c..091861d06 100644 --- a/app/views/users/_budget_investments.html.erb +++ b/app/views/users/_budget_investments.html.erb @@ -1,7 +1,13 @@ - - <% @budget_investments.each do |budget_investment| %> - <%= render "budget_investment", budget_investment: budget_investment %> - <% end %> +
+ + + + + + <% @budget_investments.each do |budget_investment| %> + <%= render "budget_investment", budget_investment: budget_investment %> + <% end %> +
<%= t("users.show.budget_investments") %><%= t("users.show.actions") %>
<%= paginate @budget_investments %> diff --git a/app/views/users/_comments.html.erb b/app/views/users/_comments.html.erb index 25bd1fd5b..82efa8570 100644 --- a/app/views/users/_comments.html.erb +++ b/app/views/users/_comments.html.erb @@ -1,13 +1,18 @@ - - <% @comments.each do |comment| %> - - - - <% end %> +
- <%= comment_commentable_title(comment) %> -
- <%= comment.body %> -
+ + + + + <% @comments.each do |comment| %> + + + + <% end %> +
<%= t("users.show.comments") %>
+ <%= comment_commentable_title(comment) %> +
+ <%= comment.body %> +
<%= paginate @comments %> diff --git a/app/views/users/_debates.html.erb b/app/views/users/_debates.html.erb index 53fc0d58e..1c19d894e 100644 --- a/app/views/users/_debates.html.erb +++ b/app/views/users/_debates.html.erb @@ -1,11 +1,16 @@ - - <% @debates.each do |debate| %> - - - - <% end %> +
- <%= link_to debate.title, debate %> -
+ + + + + <% @debates.each do |debate| %> + + + + <% end %> +
<%= t("users.show.debates") %>
+ <%= link_to debate.title, debate %> +
<%= paginate @debates %> \ No newline at end of file diff --git a/app/views/users/_proposal.html.erb b/app/views/users/_proposal.html.erb index 1addf5511..4ab434a4e 100644 --- a/app/views/users/_proposal.html.erb +++ b/app/views/users/_proposal.html.erb @@ -1,6 +1,6 @@ - - <%= link_to proposal.title, proposal, proposal.retired? ? { class: 'retired' } : {} %> + + <%= link_to proposal.title, proposal, proposal.retired? ? { class: 'retired' } : {} %>
<%= proposal.summary %> diff --git a/app/views/users/_proposals.html.erb b/app/views/users/_proposals.html.erb index 87cc6ee2f..a27a73af4 100644 --- a/app/views/users/_proposals.html.erb +++ b/app/views/users/_proposals.html.erb @@ -1,7 +1,13 @@ - - <% @proposals.each do |proposal| %> - <%= render "proposal", proposal: proposal %> - <% end %> +
+ + + + + + <% @proposals.each do |proposal| %> + <%= render "proposal", proposal: proposal %> + <% end %> +
<%= t("users.show.proposals") %><%= t("users.show.actions") %>
<%= paginate @proposals %> diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 5bc7fe956..d42a24ac9 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -708,6 +708,11 @@ en: deleted_debate: This debate has been deleted deleted_proposal: This proposal has been deleted deleted_budget_investment: This investment has been deleted + proposals: Proposals + debates: Debates + budget_investments: Budget investments + comments: Comments + actions: Actions filters: comments: one: 1 Comment diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index 1c45fe54e..05c810a76 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -708,6 +708,11 @@ es: deleted_debate: Este debate ha sido eliminado deleted_proposal: Esta propuesta ha sido eliminada deleted_budget_investment: Esta propuesta de inversión ha sido eliminada + proposals: Propuestas + debates: Debates + budget_investments: Proyectos de presupuestos participativos + comments: Comentarios + actions: Acciones filters: comments: one: 1 Comentario