Merge pull request #2026 from consul/polls-admin-polish
Polls admin polish
This commit is contained in:
@@ -155,6 +155,10 @@ a {
|
||||
margin-bottom: $line-height;
|
||||
}
|
||||
|
||||
.margin-left {
|
||||
margin-left: $line-height;
|
||||
}
|
||||
|
||||
.margin-right {
|
||||
margin-right: $line-height;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<td>
|
||||
<%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %>
|
||||
</td>
|
||||
<td>
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.edit"),
|
||||
edit_admin_poll_path(poll),
|
||||
class: "button hollow" %>
|
||||
@@ -15,4 +15,4 @@
|
||||
admin_poll_path(poll),
|
||||
class: "button hollow" %>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
<%= link_to t("admin.actions.edit"),
|
||||
<%= link_to t("admin.polls.edit.title"),
|
||||
edit_admin_poll_path(@poll),
|
||||
class: "button hollow float-right" %>
|
||||
|
||||
<h2 class="inline-block">
|
||||
<%= @poll.name %>
|
||||
</h2>
|
||||
<br>
|
||||
<span>
|
||||
(<%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %>)
|
||||
</span>
|
||||
<% if @poll.geozone_restricted %>
|
||||
<span class="bullet"> • </span>
|
||||
<span>
|
||||
<%= @poll.geozones.pluck(:name).to_sentence %>
|
||||
<span>
|
||||
<% end %>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="callout highlight">
|
||||
<div class="inline-block">
|
||||
<strong><%= t("admin.polls.index.dates") %></strong>
|
||||
<br>
|
||||
<%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %>
|
||||
</div>
|
||||
|
||||
<% if @poll.geozone_restricted %>
|
||||
<div class="inline-block margin-left">
|
||||
<strong><%= t("admin.polls.index.geozone_restricted") %></strong>
|
||||
<br>
|
||||
<%= @poll.geozones.pluck(:name).to_sentence %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
class: "button success float-right" %>
|
||||
|
||||
<% if @polls.any? %>
|
||||
<table class="fixed">
|
||||
<table>
|
||||
<thead>
|
||||
<th><%= t("admin.polls.index.name") %></th>
|
||||
<th><%= t("admin.polls.index.dates") %></th>
|
||||
<th><%= t("admin.actions.actions") %></th>
|
||||
<th class="text-right"><%= t("admin.actions.actions") %></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<%= render @polls %>
|
||||
@@ -19,4 +19,4 @@
|
||||
<div class="callout primary">
|
||||
<%= t("admin.polls.index.no_polls") %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%= back_link_to %>
|
||||
|
||||
<%= link_to t('shared.edit'), edit_admin_answer_path(@answer),
|
||||
<%= link_to t("admin.answers.show.edit"), edit_admin_answer_path(@answer),
|
||||
class: "button hollow float-right" %>
|
||||
|
||||
<ul class="breadcrumbs margin-top">
|
||||
@@ -10,23 +10,22 @@
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="small-12 medium-6">
|
||||
<div class="callout highlight">
|
||||
<p>
|
||||
<strong><%= t("admin.answers.show.title") %></strong>
|
||||
<br>
|
||||
<%= @answer.title %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong><%= t("admin.answers.show.description") %></strong>
|
||||
<%= @answer.description %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong><%= t("admin.answers.show.images") %></strong>
|
||||
<br>
|
||||
<%= link_to t("admin.answers.show.images_list"), admin_answer_images_path(@answer) %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col"><%= t("admin.answers.show.title") %></th>
|
||||
<th scope="col"><%= t("admin.answers.show.description") %></th>
|
||||
<th scope="col" class="text-center"><%= t("admin.answers.show.images") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= @answer.title %></td>
|
||||
<td><%= @answer.description %></td>
|
||||
<td class="text-center">
|
||||
(<%= @answer.images.count %>)<br>
|
||||
<%= link_to t("admin.answers.show.images_list"), admin_answer_images_path(@answer) %>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%= back_link_to %>
|
||||
|
||||
<%= link_to t('shared.edit'), edit_admin_question_path(@question),
|
||||
<%= link_to t('admin.questions.show.edit_question'), edit_admin_question_path(@question),
|
||||
class: "button hollow float-right" %>
|
||||
|
||||
<div class="clear"></div>
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="small-12 medium-6">
|
||||
<div class="callout highlight">
|
||||
<p>
|
||||
<strong><%= t("admin.questions.show.title") %></strong>
|
||||
<strong><%= t("admin.questions.show.question") %></strong>
|
||||
<br>
|
||||
<%= @question.title %>
|
||||
</p>
|
||||
@@ -35,7 +35,7 @@
|
||||
<%= t('admin.questions.show.valid_answers') %>
|
||||
<%= link_to t("admin.questions.show.add_answer"),
|
||||
new_admin_question_answer_path(@question),
|
||||
class: "button hollow float-right" %>
|
||||
class: "button float-right" %>
|
||||
</th>
|
||||
</tr>
|
||||
|
||||
@@ -50,21 +50,21 @@
|
||||
<tbody class="sortable" data-js-url="<%= admin_question_answers_order_answers_path(@question.id) %>">
|
||||
<% @question.question_answers.each do |answer| %>
|
||||
<tr id="<%= dom_id(answer) %>" class="poll_question_answer" data-answer-id="<%= answer.id %>">
|
||||
<td><%= link_to answer.title, admin_answer_path(answer) %></td>
|
||||
<td><%= answer.description %></td>
|
||||
<td class="text-center">
|
||||
<td class="align-top"><%= link_to answer.title, admin_answer_path(answer) %></td>
|
||||
<td class="align-top break"><%= answer.description %></td>
|
||||
<td class="align-top text-center">
|
||||
(<%= answer.images.count %>)
|
||||
<br>
|
||||
<%= link_to t("admin.questions.show.answers.images_list"),
|
||||
admin_answer_images_path(answer) %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td class="align-top text-center">
|
||||
(<%= answer.documents.count rescue 0 %>)
|
||||
<br>
|
||||
<%= link_to t("admin.questions.show.answers.documents_list"),
|
||||
admin_answer_documents_path(answer) %>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td class="align-top text-center">
|
||||
(<%= answer.videos.count %>)
|
||||
<br>
|
||||
<%= link_to t("admin.questions.show.answers.video_list"),
|
||||
|
||||
@@ -552,6 +552,7 @@ en:
|
||||
create: "Create poll"
|
||||
name: "Name"
|
||||
dates: "Dates"
|
||||
geozone_restricted: "Restricted to districts"
|
||||
new:
|
||||
title: "New poll"
|
||||
submit_button: "Create poll"
|
||||
@@ -594,7 +595,8 @@ en:
|
||||
show:
|
||||
proposal: Original proposal
|
||||
author: Author
|
||||
title: Title
|
||||
question: Question
|
||||
edit_question: Edit question
|
||||
valid_answers: Valid answers
|
||||
add_answer: Add answer
|
||||
video_url: External video
|
||||
@@ -617,6 +619,7 @@ en:
|
||||
description: Description
|
||||
images: Images
|
||||
images_list: Images list
|
||||
edit: Edit answer
|
||||
edit:
|
||||
title: Edit answer
|
||||
videos:
|
||||
|
||||
@@ -552,6 +552,7 @@ es:
|
||||
create: "Crear votación"
|
||||
name: "Nombre"
|
||||
dates: "Fechas"
|
||||
geozone_restricted: "Restringida a los distritos"
|
||||
new:
|
||||
title: "Nueva votación"
|
||||
submit_button: "Crear votación"
|
||||
@@ -594,7 +595,8 @@ es:
|
||||
show:
|
||||
proposal: Propuesta ciudadana original
|
||||
author: Autor
|
||||
title: Título
|
||||
question: Pregunta
|
||||
edit_question: Editar pregunta
|
||||
valid_answers: Respuestas válidas
|
||||
add_answer: Añadir respuesta
|
||||
video_url: Video externo
|
||||
@@ -619,6 +621,7 @@ es:
|
||||
description: Descripción
|
||||
images: Imágenes
|
||||
images_list: Lista de imágenes
|
||||
edit: Editar respuesta
|
||||
edit:
|
||||
title: Editar respuesta
|
||||
videos:
|
||||
|
||||
@@ -73,7 +73,7 @@ feature 'Admin polls' do
|
||||
create(:image, imageable: poll)
|
||||
|
||||
visit admin_poll_path(poll)
|
||||
click_link "Edit"
|
||||
click_link "Edit poll"
|
||||
|
||||
end_date = 1.year.from_now
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ feature 'Answers' do
|
||||
|
||||
visit admin_answer_path(answer)
|
||||
|
||||
click_link 'Edit'
|
||||
click_link 'Edit answer'
|
||||
|
||||
old_title = answer.title
|
||||
new_title = 'Ex Machina'
|
||||
|
||||
Reference in New Issue
Block a user