Files
nairobi/app/views/admin/banners/index.html.erb
Javi Martín 7d590031f5 Remove redundant words in edit and destroy links
When we see a list of, let's say, banners, and each one has a link to
edit them, the word "banner" in the text "edit banner" is redundant and
adds noise; even for users with cognitive disabilities, it's obvious
that the "edit" link refers to the banner.
2021-06-30 14:33:37 +02:00

36 lines
1.1 KiB
Plaintext

<%= link_to t("admin.banners.index.create"),
new_admin_banner_path, class: "button 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"><%= Banner.human_attribute_name(:post_started_at) %></th>
<th scope="col"><%= Banner.human_attribute_name(:post_ended_at) %></th>
<th scope="col"><%= t("admin.actions.actions") %></th>
</tr>
</thead>
<tbody>
<tr>
<td><%= banner.post_started_at %></td>
<td><%= banner.post_ended_at %></td>
<td><%= render Admin::TableActionsComponent.new(banner) %></td>
</tr>
<tr>
<td colspan="3">
<span class="help-text"><%= t("admin.banners.index.preview") %></span>
<%= render Shared::BannerComponent.new(banner) %>
</td>
</tr>
</tbody>
</table>
<% end %>
<%= paginate @banners %>