style the table
This commit is contained in:
@@ -24,37 +24,49 @@
|
||||
<%# end %>
|
||||
<!--</ul>-->
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Thumb</th>
|
||||
<th><%= sortable "First Name", "first_name" %></th>
|
||||
<th><%= sortable "Last Name", "last_name" %></th>
|
||||
<th><%= sortable "Registration Date", "created_at" %></th>
|
||||
<th>Del</th>
|
||||
</tr>
|
||||
<% for person in @favorite_people %>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<% if person['picture_uri'] != nil %>
|
||||
<%= image_tag @host + person['picture_uri'], class: 'thumb'%>
|
||||
<% else %>
|
||||
<%= show_svg('account_circle-black-48dp.svg')%>
|
||||
<% end %>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<%= person['first_name'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= person['last_name'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= person['created_at'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to "X", {:action => "delete_person", :tiss_id => person['tiss_id']}, :method => 'delete' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
<% if !@favorite_people[0].blank? %>
|
||||
<div class="table_wrapper">
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><%= sortable "First Name", "first_name" %></th>
|
||||
<th><%= sortable "Last Name", "last_name" %></th>
|
||||
<th><%= sortable "Registration Date", "created_at" %></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<% for person in @favorite_people %>
|
||||
<tr>
|
||||
<td>
|
||||
<%= link_to crawlers_people_crawler_show_detail_url(:tiss_id => person['tiss_id']) do %>
|
||||
<span>
|
||||
<% if person['picture_uri'] != nil %>
|
||||
<%= image_tag @host + person['picture_uri'], class: 'thumb'%>
|
||||
<% else %>
|
||||
<%= show_svg('account_circle-black-48dp.svg')%>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= person['first_name'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= person['last_name'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= person['created_at'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= button_to 'Details', crawlers_people_crawler_show_detail_url(:tiss_id => person['tiss_id']) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= button_to "Delete", {:action => "delete_person", :tiss_id => person['tiss_id']}, :method => 'delete' %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
</div>
|
||||
<% else %>
|
||||
No favorite people added yet!
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user