* Delete all things related to banner images and styles (in code) * Add a new test to check that the banner is showing correctly * Update the specs accordingly to match the changes Update dev_seed to set a random background_color and a font_color for banners (and remove everything about image and style) Add a rake task to migrate the banner style to backgroun_color and font_color (so that the banners have the same colors than before)
53 lines
1.8 KiB
Plaintext
53 lines
1.8 KiB
Plaintext
<%= link_to t("admin.banners.index.create"),
|
|
new_admin_banner_path, class: "button success float-right" %>
|
|
|
|
<h2 class="inline-block"><%= t("admin.banners.index.title") %></h2>
|
|
|
|
<%= render 'shared/filter_subnav', i18n_namespace: "admin.banners.index" %>
|
|
|
|
<h3><%= page_entries_info @banners %></h3>
|
|
|
|
<% @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 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="background-color:<%= banner.background_color %>">
|
|
<%= link_to banner.target_url do %>
|
|
<h2 style="color:<%= banner.font_color %>"><%= banner.title %></h2>
|
|
<h3 style="color:<%= banner.font_color %>"><%= banner.description %></h3>
|
|
<% end %>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<% end %>
|
|
|
|
<%= paginate @banners %>
|