From b4660e162ac8a121f09ab062c84946ce7a7b4955 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 9 Feb 2017 18:38:56 +0100 Subject: [PATCH] improves table layout on admin polls index --- app/assets/stylesheets/admin.scss | 15 +++++++++++++-- app/views/admin/poll/polls/_poll.html.erb | 2 +- app/views/admin/poll/polls/index.html.erb | 4 ++-- config/locales/admin.en.yml | 1 + config/locales/admin.es.yml | 1 + 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss index c46d0fd3d..2067b1f40 100644 --- a/app/assets/stylesheets/admin.scss +++ b/app/assets/stylesheets/admin.scss @@ -94,9 +94,20 @@ body.admin { } } + &.fixed { + table-layout: fixed; + } + input[type="submit"] ~ a, a ~ a { - margin-left: $line-height/2; - margin-right: $line-height/2; + margin-left: 0; + margin-right: 0; + margin-top: $line-height/2; + + @include breakpoint(medium) { + margin-left: $line-height/2; + margin-right: $line-height/2; + margin-top: 0; + } } } diff --git a/app/views/admin/poll/polls/_poll.html.erb b/app/views/admin/poll/polls/_poll.html.erb index 7cbc0a352..b65ce3e71 100644 --- a/app/views/admin/poll/polls/_poll.html.erb +++ b/app/views/admin/poll/polls/_poll.html.erb @@ -7,7 +7,7 @@ <%= l poll.starts_at.to_date %> - <%= l poll.ends_at.to_date %> - + <%= link_to t("admin.actions.edit"), edit_admin_poll_path(poll), class: "button hollow" %> diff --git a/app/views/admin/poll/polls/index.html.erb b/app/views/admin/poll/polls/index.html.erb index 75b52affa..5bd310e54 100644 --- a/app/views/admin/poll/polls/index.html.erb +++ b/app/views/admin/poll/polls/index.html.erb @@ -5,11 +5,11 @@ class: "button success float-right" %> <% if @polls.any? %> - +
- + <%= render @polls %> diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index e7c3d65d3..dce934c6c 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -2,6 +2,7 @@ en: admin: actions: + actions: Actions confirm: Are you sure? confirm_hide: Confirm hide: Hide diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 768ef8d83..89082c643 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -2,6 +2,7 @@ es: admin: actions: + actions: Acciones confirm: "¿Estás seguro?" confirm_hide: Confirmar hide: Ocultar
<%= t("admin.polls.index.name") %> <%= t("admin.polls.index.dates") %> <%= t("admin.actions.actions") %>