improves admin banners index page
This commit is contained in:
@@ -7,36 +7,48 @@
|
||||
|
||||
<h3><%= page_entries_info @banners %></h3>
|
||||
|
||||
<table>
|
||||
<% @banners.each do |banner| %>
|
||||
<tr id="<%= dom_id(banner) %>">
|
||||
<td class="small-12 medium-9">
|
||||
<small>
|
||||
<%= t("admin.banners.banner.post_started_at")%> <strong><%= banner.post_started_at %></strong>
|
||||
|
|
||||
<%= t("admin.banners.banner.post_ended_at")%> <strong><%= banner.post_ended_at%></strong>
|
||||
</small>
|
||||
|
||||
<div class="<%= banner.style %>">
|
||||
<div class="<%= banner.image %>">
|
||||
<%= link_to banner.target_url do %>
|
||||
<h2><%= banner.title %></h2>
|
||||
<h3><%= banner.description %></h3>
|
||||
<% end %>
|
||||
<% @banners.each do |banner| %>
|
||||
<table>
|
||||
<thead>
|
||||
<tr id="<%= dom_id(banner) %>">
|
||||
<th scope="col"><%= t("admin.banners.banner.post_started_at")%></th>
|
||||
<th scope="col"><%= t("admin.banners.banner.post_ended_at")%></th>
|
||||
<th scope="col" class="text-center"><%= t("admin.actions.actions")%></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><%= banner.post_started_at %></td>
|
||||
<td><%= banner.post_ended_at %></td>
|
||||
<td class="text-right">
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= link_to t("admin.banners.index.edit"), edit_admin_banner_path(banner),
|
||||
class: 'button hollow expanded' %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
<%= 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' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<div class="small-12 medium-6 column">
|
||||
<%= link_to t("admin.banners.index.delete"), admin_banner_path(banner),
|
||||
method: :delete,
|
||||
class: 'button hollow alert expanded' %>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="3" scope="col" class="text-center"><%= t("admin.banners.index.preview") %></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<div class="<%= banner.style %>">
|
||||
<div class="<%= banner.image %>">
|
||||
<%= link_to banner.target_url do %>
|
||||
<h2><%= banner.title %></h2>
|
||||
<h3><%= banner.description %></h3>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<% end %>
|
||||
|
||||
<%= paginate @banners %>
|
||||
@@ -24,6 +24,7 @@ en:
|
||||
all: All
|
||||
with_active: Active
|
||||
with_inactive: Inactive
|
||||
preview: Preview
|
||||
banner:
|
||||
title: Title
|
||||
description: Description
|
||||
|
||||
@@ -24,6 +24,7 @@ es:
|
||||
all: Todos
|
||||
with_active: Activos
|
||||
with_inactive: Inactivos
|
||||
preview: Vista previa
|
||||
banner:
|
||||
title: Título
|
||||
description: Descripción
|
||||
|
||||
Reference in New Issue
Block a user