style the table
This commit is contained in:
parent
6922f31bc5
commit
b11ef548b6
@ -27,3 +27,24 @@
|
|||||||
.thumb {
|
.thumb {
|
||||||
width: 3em;
|
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 %>
|
<%# end %>
|
||||||
<!--</ul>-->
|
<!--</ul>-->
|
||||||
|
|
||||||
|
<% if !@favorite_people[0].blank? %>
|
||||||
|
<div class="table_wrapper">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Thumb</th>
|
<th></th>
|
||||||
<th><%= sortable "First Name", "first_name" %></th>
|
<th><%= sortable "First Name", "first_name" %></th>
|
||||||
<th><%= sortable "Last Name", "last_name" %></th>
|
<th><%= sortable "Last Name", "last_name" %></th>
|
||||||
<th><%= sortable "Registration Date", "created_at" %></th>
|
<th><%= sortable "Registration Date", "created_at" %></th>
|
||||||
<th>Del</th>
|
<th></th>
|
||||||
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
<% for person in @favorite_people %>
|
<% for person in @favorite_people %>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
<%= link_to crawlers_people_crawler_show_detail_url(:tiss_id => person['tiss_id']) do %>
|
||||||
<span>
|
<span>
|
||||||
<% if person['picture_uri'] != nil %>
|
<% if person['picture_uri'] != nil %>
|
||||||
<%= image_tag @host + person['picture_uri'], class: 'thumb'%>
|
<%= image_tag @host + person['picture_uri'], class: 'thumb'%>
|
||||||
@ -42,6 +46,7 @@
|
|||||||
<%= show_svg('account_circle-black-48dp.svg')%>
|
<%= show_svg('account_circle-black-48dp.svg')%>
|
||||||
<% end %>
|
<% end %>
|
||||||
</span>
|
</span>
|
||||||
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= person['first_name'] %>
|
<%= person['first_name'] %>
|
||||||
@ -53,8 +58,15 @@
|
|||||||
<%= person['created_at'] %>
|
<%= person['created_at'] %>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
<% else %>
|
||||||
|
No favorite people added yet!
|
||||||
|
<% end %>
|
||||||
Loading…
x
Reference in New Issue
Block a user