/artist_urls: convert to table builder.
This commit is contained in:
@@ -11,32 +11,27 @@
|
|||||||
<%= f.submit "Search" %>
|
<%= f.submit "Search" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<table class="striped" width="100%">
|
<%= table_for @artist_urls, width: "100%" do |t| %>
|
||||||
<thead>
|
<% t.column :id %>
|
||||||
<tr>
|
<% t.column "Artist Name" do |artist_url| %>
|
||||||
<th>ID</th>
|
<%= link_to(artist_url.artist.name, artist_url.artist) %>
|
||||||
<th>Artist Name</th>
|
<% end %>
|
||||||
<th>URL</th>
|
<% t.column "URL" do |artist_url| %>
|
||||||
<th>Normalized URL</th>
|
<%= external_link_to(artist_url.url.to_s) %>
|
||||||
<th>Active?</th>
|
<% end %>
|
||||||
<th>Created</th>
|
<% t.column "Normalized URL" do |artist_url| %>
|
||||||
<th>Updated</th>
|
<%= external_link_to(artist_url.normalized_url) %>
|
||||||
</tr>
|
<% end %>
|
||||||
</thead>
|
<% t.column "Active?" do |artist_url| %>
|
||||||
<tbody>
|
<%= artist_url.is_active.to_s %>
|
||||||
<% @artist_urls.each do |artist_url| %>
|
<% end %>
|
||||||
<tr>
|
<% t.column "Created" do |artist_url| %>
|
||||||
<%= tag.td artist_url.id %>
|
<%= compact_time(artist_url.created_at) %>
|
||||||
<%= tag.td link_to(artist_url.artist.name, artist_url.artist) %>
|
<% end %>
|
||||||
<%= tag.td external_link_to(artist_url.url.to_s) %>
|
<% t.column "Updated" do |artist_url| %>
|
||||||
<%= tag.td external_link_to(artist_url.normalized_url) %>
|
<%= compact_time(artist_url.updated_at) %>
|
||||||
<%= tag.td artist_url.is_active.to_s %>
|
<% end %>
|
||||||
<%= tag.td compact_time(artist_url.created_at) %>
|
<% end %>
|
||||||
<%= tag.td compact_time(artist_url.updated_at) %>
|
|
||||||
</tr>
|
|
||||||
<% end %>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<%= numbered_paginator(@artist_urls) %>
|
<%= numbered_paginator(@artist_urls) %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user