style the table
This commit is contained in:
parent
6922f31bc5
commit
b11ef548b6
@ -27,3 +27,24 @@
|
||||
.thumb {
|
||||
width: 3em;
|
||||
}
|
||||
|
||||
.table_wrapper {
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
th, td {
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
th .asc {
|
||||
background-image: url("app/assets/images/up.png");
|
||||
}
|
||||
|
||||
th .desc {
|
||||
background-image: url("app/assets/images/down.png");
|
||||
}
|
||||
}
|
||||
@ -24,17 +24,21 @@
|
||||
<%# end %>
|
||||
<!--</ul>-->
|
||||
|
||||
<table>
|
||||
<% if !@favorite_people[0].blank? %>
|
||||
<div class="table_wrapper">
|
||||
<table>
|
||||
<tr>
|
||||
<th>Thumb</th>
|
||||
<th></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>
|
||||
<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'%>
|
||||
@ -42,6 +46,7 @@
|
||||
<%= show_svg('account_circle-black-48dp.svg')%>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= person['first_name'] %>
|
||||
@ -53,8 +58,15 @@
|
||||
<%= person['created_at'] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to "X", {:action => "delete_person", :tiss_id => person['tiss_id']}, :method => 'delete' %>
|
||||
<%= 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>
|
||||
</table>
|
||||
</div>
|
||||
<% else %>
|
||||
No favorite people added yet!
|
||||
<% end %>
|
||||
Loading…
x
Reference in New Issue
Block a user