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.
41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
<% if phases.present? %>
|
|
<table class="budget-phases-table table-for-mobile">
|
|
<caption><%= t("admin.budgets.edit.phases_caption") %></caption>
|
|
<thead>
|
|
<tr>
|
|
<th><%= t("admin.budgets.edit.phase") %></th>
|
|
<th><%= t("admin.budgets.edit.duration") %></th>
|
|
<th class="text-center"><%= t("admin.budgets.edit.enabled") %></th>
|
|
<th><%= t("admin.budgets.edit.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<% phases.each do |phase| %>
|
|
<tr id="<%= dom_id(phase) %>" class="phase">
|
|
<td>
|
|
<%= phase.name %>
|
|
<% if phase.current? %>
|
|
<span class="label success"><strong><%= t("admin.budgets.edit.active") %></strong></span>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<% if phase.starts_at.present? || phase.ends_at.present? %>
|
|
<%= dates(phase) %>
|
|
<% else %>
|
|
<em><%= t("admin.budgets.edit.blank_dates") %></em>
|
|
<% end %>
|
|
</td>
|
|
<td class="text-center">
|
|
<%= enabled_cell(phase) %>
|
|
</td>
|
|
<td>
|
|
<%= render Admin::TableActionsComponent.new(phase,
|
|
actions: [:edit],
|
|
edit_path: edit_path(phase)
|
|
) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
<% end %>
|