Body header

Body header contains the proposal name, a label with its status and an
action title.
This commit is contained in:
Juan Salvador Pérez García
2018-06-28 07:21:36 +02:00
parent 611a911793
commit 64cf7c1257
12 changed files with 74 additions and 9 deletions

View File

@@ -106,6 +106,26 @@
}
}
.proposal-title {
display: flex;
align-items: flex-start;
.label {
color: #fefefe;
margin-left: 10pt;
}
}
.action-title {
margin-top: 5pt;
margin-bottom: 10pt;
hr {
max-width: 100%;
margin: 0;
}
}
.columns {
padding: 0;
}

View File

@@ -1,6 +1,6 @@
<%= back_link_to %>
<% content_for :action_title, t("admin.polls.edit.title") %>
<h2><%= t("admin.polls.edit.title") %></h2>
<%= back_link_to %>
<div class="polls-form">
<%= render "form" %>

View File

@@ -1,4 +1,4 @@
<h2 class="inline-block"><%= t("admin.polls.index.title") %></h2>
<% content_for :action_title, t("admin.polls.index.title") %>
<%= link_to t("admin.polls.index.create"),
new_proposal_dashboard_poll_path(proposal),

View File

@@ -1,7 +1,6 @@
<% content_for :action_title, t("admin.polls.new.title") %>
<%= back_link_to %>
<h2><%= t("admin.polls.new.title") %></h2>
<div class="polls-form">
<%= render "form" %>
</div>

View File

@@ -1,3 +1,5 @@
<% content_for :action_title, t(".title") %>
<%= render "poll_header" %>
<div id="poll-resources">

View File

@@ -0,0 +1,17 @@
<div class="proposal-title">
<h3 class="proposal-title"><%= proposal.title %></h3>
<% if proposal.retired? %>
<div class="label alert"><%= t('.retired') %></div>
<% elsif proposal.published? %>
<div class="label success"><%= t('.published') %></div>
<% else %>
<div class="label primary"><%= t('.draft') %></div>
<% end %>
</div>
<% if content_for?(:action_title) %>
<div class="action-title">
<h5><%= yield(:action_title) %></h5>
<hr>
</div>
<% end %>

View File

@@ -57,6 +57,7 @@
</div>
<div class="admin-content small-12 medium-9 column" data-equalizer-watch>
<%= render partial: 'layouts/flash' %>
<%= render partial: 'layouts/dashboard/proposal_header' %>
<%= yield %>
</div>
</div>

View File

@@ -1,3 +1,5 @@
<% content_for :action_title, t('.title') %>
<table>
<caption><%= t('proposals_dashboard.menu.actions') %></caption>
<% proposed_actions.each do |action| %>

View File

@@ -1,3 +1,5 @@
<% content_for :action_title, t('.title') %>
<div class="proposals-dashboard-new-request-form row">
<div class="small-12 medium-9 column">

View File

@@ -1,3 +1,5 @@
<% content_for :action_title, t('.title') %>
<div class="small-12 column">
<div class="button-group">
<%= link_to t('.group_by_year'), stats_proposal_dashboard_index_path(proposal, group_by: 'year'), class: 'button' %>

View File

@@ -202,8 +202,11 @@ en:
firefox: Firefox
ie: We have detected that you are browsing with Internet Explorer. For an enhanced experience, we recommend using %{firefox} or %{chrome}.
ie_title: This website is not optimised for your browser
proposals_dashboard:
title: Proposal dashboard
dashboard:
proposal_header:
published: Published
draft: Draft
retired: Retired
footer:
accessibility: Accessibility
conditions: Terms and conditions of use
@@ -509,12 +512,17 @@ en:
create_request:
success: The request for the administrator has been successfully sent.
stats:
title: Graphic
group_by_year: Group by year
group_by_month: Group by month
group_by_week: Group by week
group_by_date: Group by date
progress: Acumulated progress
supports: Supports
index:
title: Edition
new_request:
title: Administrator request
dashboard:
polls:
form:
@@ -524,6 +532,8 @@ en:
add_answer: Add answer
question_answer_fields:
remove_answer: Remove answer
show:
title: Configure poll
polls:
all: "All"
no_dates: "no date assigned"

View File

@@ -202,8 +202,11 @@ es:
firefox: Firefox
ie: Hemos detectado que estás navegando desde Internet Explorer. Para una mejor experiencia te recomendamos utilizar %{firefox} o %{chrome}.
ie_title: Esta web no está optimizada para tu navegador
proposals_dashboard:
title: Dashboard de propuesta
dashboard:
proposal_header:
published: Publicada
draft: Borrador
retired: Retirada
footer:
accessibility: Accesibilidad
conditions: Condiciones de uso
@@ -509,12 +512,17 @@ es:
create_request:
success: La petición ha sido correctamente enviada al administrador.
stats:
title: Gráfico
group_by_year: Agrupar por año
group_by_month: Agrupar por meses
group_by_week: Agrupar por semanas
group_by_date: Agrupar por fechas
progress: Progreso acumulado
supports: Apoyos
index:
title: Edición
new_request:
title: Petición al administrador
dashboard:
polls:
form:
@@ -524,6 +532,8 @@ es:
add_answer: Añadir respuesta
question_answer_fields:
remove_answer: Borrar respuesta
show:
title: Configurar encuesta
polls:
all: "Todas"
no_dates: "sin fecha asignada"