a11yist/app/views/elements/index.html.erb

37 lines
No EOL
1.1 KiB
Text

<h1><%= t("scaffold.pagetitle_index", model: Element.model_name.human(count: 2)) %></h1>
<table class="table table-striped">
<thead>
<tr>
<th><%= Element.human_attribute_name(:id) %></th>
<th><%= Element.human_attribute_name(:report_id) %></th>
<th><%= Element.human_attribute_name(:path) %></th>
<th><%= Element.human_attribute_name(:title) %></th>
<th><%= Element.human_attribute_name(:description_html) %></th>
</thead>
<tbody>
<% @elements.each do |element| %>
<tr>
<td><%= link_to(element.id, url_for(element)) %></td>
<td><%= link_to(element.report_id, url_for(element)) %></td>
<td><%= link_to(element.path, url_for(element)) %></td>
<td><%= link_to(element.title, url_for(element)) %></td>
<td><%= link_to(truncate(strip_tags(element.description_html)), url_for(element)) %></td>
</tr>
<% end %>
</tbody>
</table>
<div class="action-row">
<%= link_to t("scaffold.link_new", model: Element.model_name.human), new_element_path %>
</div>