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-bottom: $line-height;
} }
.margin-left {
margin-left: $line-height;
}
.margin-right { .margin-right {
margin-right: $line-height; 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), edit_admin_poll_path(@poll),
class: "button hollow float-right" %> class: "button hollow float-right" %>
<h2 class="inline-block"> <h2 class="inline-block">
<%= @poll.name %> <%= @poll.name %>
</h2> </h2>
<br>
<span> <div class="clear"></div>
(<%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %>)
</span> <div class="callout highlight">
<% if @poll.geozone_restricted %> <div class="inline-block">
<span class="bullet">&nbsp;&bull;&nbsp;</span> <strong><%= t("admin.polls.index.dates") %></strong>
<span> <br>
<%= @poll.geozones.pluck(:name).to_sentence %> <%= l @poll.starts_at.to_date %> - <%= l @poll.ends_at.to_date %>
<span> </div>
<% end %>
<% 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>

View File

@@ -552,6 +552,7 @@ en:
create: "Create poll" create: "Create poll"
name: "Name" name: "Name"
dates: "Dates" dates: "Dates"
geozone_restricted: "Restricted to districts"
new: new:
title: "New poll" title: "New poll"
submit_button: "Create poll" submit_button: "Create poll"

View File

@@ -552,6 +552,7 @@ es:
create: "Crear votación" create: "Crear votación"
name: "Nombre" name: "Nombre"
dates: "Fechas" dates: "Fechas"
geozone_restricted: "Restringida a los distritos"
new: new:
title: "Nueva votación" title: "Nueva votación"
submit_button: "Crear votación" submit_button: "Crear votación"