Just like we do every else (sometimes even on that very same file), we use the method instead of the instance variable. We're doing this change now because we're about to modify one of these files (the poll question answers documents index component).
36 lines
998 B
Plaintext
36 lines
998 B
Plaintext
<%= header %>
|
|
|
|
<%= render SDGManagement::Relations::SearchComponent.new(label: search_label) %>
|
|
<%= render "shared/filter_subnav", i18n_namespace: "sdg_management.relations.index" %>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><%= model_class.human_attribute_name(:title) %></th>
|
|
<th><%= SDG::Goal.model_name.human(count: 2).upcase_first %></th>
|
|
<th><%= SDG::Target.model_name.human(count: 2).upcase_first %></th>
|
|
<th><%= t("admin.actions.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% records.each do |record| %>
|
|
<tr>
|
|
<td><%= record.title %></td>
|
|
<td><%= record.sdg_goal_list %></td>
|
|
<td><%= record.sdg_target_list %></td>
|
|
<td>
|
|
<%= render Admin::TableActionsComponent.new(
|
|
record,
|
|
actions: [:edit],
|
|
edit_text: t("sdg_management.actions.edit"),
|
|
edit_path: edit_path_for(record)
|
|
) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= paginate(@records) %>
|