From 80279ca638b9edf7ba23d19ee9385806b7f379c7 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Fri, 28 Apr 2017 12:44:38 +0200 Subject: [PATCH] improves admin banners index page --- app/views/admin/banners/index.html.erb | 72 +++++++++++++++----------- config/locales/admin.en.yml | 1 + config/locales/admin.es.yml | 1 + 3 files changed, 44 insertions(+), 30 deletions(-) diff --git a/app/views/admin/banners/index.html.erb b/app/views/admin/banners/index.html.erb index db58c1303..11f2ef6ab 100644 --- a/app/views/admin/banners/index.html.erb +++ b/app/views/admin/banners/index.html.erb @@ -7,36 +7,48 @@

<%= page_entries_info @banners %>

- - <% @banners.each do |banner| %> - - + + + + + + + + +
- - <%= t("admin.banners.banner.post_started_at")%> <%= banner.post_started_at %> -  |  - <%= t("admin.banners.banner.post_ended_at")%> <%= banner.post_ended_at%> - - -
-
- <%= link_to banner.target_url do %> -

<%= banner.title %>

-

<%= banner.description %>

- <% end %> +<% @banners.each do |banner| %> + + + + + + + + + + + + + - - - - <% end %> -
<%= t("admin.banners.banner.post_started_at")%><%= t("admin.banners.banner.post_ended_at")%><%= t("admin.actions.actions")%>
<%= banner.post_started_at %><%= banner.post_ended_at %> +
+ <%= link_to t("admin.banners.index.edit"), edit_admin_banner_path(banner), + class: 'button hollow expanded' %>
- -
- <%= link_to t("admin.banners.index.edit"), edit_admin_banner_path(banner), - class: 'edit-banner button hollow' %> - - <%= link_to t("admin.banners.index.delete"), admin_banner_path(banner), - method: :delete, - class: 'button hollow alert' %> -
+
+ <%= link_to t("admin.banners.index.delete"), admin_banner_path(banner), + method: :delete, + class: 'button hollow alert expanded' %> +
+
<%= t("admin.banners.index.preview") %>
+
+
+ <%= link_to banner.target_url do %> +

<%= banner.title %>

+

<%= banner.description %>

+ <% end %> +
+
+
+<% end %> <%= paginate @banners %> \ No newline at end of file diff --git a/config/locales/admin.en.yml b/config/locales/admin.en.yml index f99ef1780..f6b796b1c 100755 --- a/config/locales/admin.en.yml +++ b/config/locales/admin.en.yml @@ -24,6 +24,7 @@ en: all: All with_active: Active with_inactive: Inactive + preview: Preview banner: title: Title description: Description diff --git a/config/locales/admin.es.yml b/config/locales/admin.es.yml index 817576494..951b34a2b 100644 --- a/config/locales/admin.es.yml +++ b/config/locales/admin.es.yml @@ -24,6 +24,7 @@ es: all: Todos with_active: Activos with_inactive: Inactivos + preview: Vista previa banner: title: Título description: Descripción