Links, mainly...
This commit is contained in:
parent
fd42a3f173
commit
21ab02d647
69 changed files with 2258 additions and 155 deletions
30
app/views/links/index.html.erb
Normal file
30
app/views/links/index.html.erb
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<h1><%= t("scaffold.pagetitle_index", model: Link.model_name.human(count: 2)) %></h1>
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= LinkCategory.model_name.human %></th>
|
||||
<th><%= Link.human_attribute_name(:url) %></th>
|
||||
<th><%= Link.human_attribute_name(:text) %></th>
|
||||
<th><%= Link.human_attribute_name(:description) %></th>
|
||||
<th><%= Link.human_attribute_name(:last_check_at) %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @links.each do |link| %>
|
||||
<tr>
|
||||
<td><%= link_to(tag.i(class: link.ok? ? "bi bi-check" : "bi bi-x-lg"), url_for(link)) %></td>
|
||||
<td><%= link_to(link.link_category.name, url_for(link)) %></td>
|
||||
<td><%= link_to(truncate(link.url), link.url, target: "_blank", rel: "nofollow") %></td>
|
||||
<td><%= link_to(link.text, url_for(link)) %></td>
|
||||
<td><%= link_to(truncate(link.description_html.to_plain_text), url_for(link)) %></td>
|
||||
<td><%= link.last_check_at && l(link.last_check_at, format: :short) %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="action-row">
|
||||
<%= link_to t("scaffold.link_new", model: Link.model_name.human), new_link_path %>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue