improves admin poll header

This commit is contained in:
decabeza
2017-10-09 19:42:10 +02:00
parent 07f74cf6e5
commit 80298a2746
4 changed files with 25 additions and 11 deletions

View File

@@ -155,6 +155,10 @@ a {
margin-bottom: $line-height;
}
.margin-left {
margin-left: $line-height;
}
.margin-right {
margin-right: $line-height;
}

View File

@@ -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>
<div class="clear"></div>
<div class="callout highlight">
<div class="inline-block">
<strong><%= t("admin.polls.index.dates") %></strong>
<br>
<span>
(<%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %>)
</span>
<%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %>
</div>
<% if @poll.geozone_restricted %>
<span class="bullet">&nbsp;&bull;&nbsp;</span>
<span>
<div class="inline-block margin-left">
<strong><%= t("admin.polls.index.geozone_restricted") %></strong>
<br>
<%= @poll.geozones.pluck(:name).to_sentence %>
<span>
</div>
<% end %>
</div>

View File

@@ -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"

View File

@@ -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"