Implement favorite view for theses

This commit is contained in:
Tobias Eidelpes 2020-05-25 16:20:27 +02:00
parent d84297bde7
commit b20cccf07b

View File

@ -1,3 +1,34 @@
<%= render(:partial => "nav")%>
<%= render(:partial => "nav") %>
<p>Fav Theses</p>
<h1>Favorite Theses</h1>
<% if !@favorite_theses[0].blank? %>
<div class="table_wrapper">
<table>
<tr>
<th><%= sortable "Title", "title" %></th>
<th><%= sortable "Registration Date", "created_at" %></th>
<th></th>
<th></th>
</tr>
<% for thesis in @favorite_theses %>
<tr>
<td>
<%= thesis['title'] %>
</td>
<td>
<%= thesis['created_at'] %>
</td>
<td>
<%= button_to 'Details', crawlers_theses_crawler_show_detail_url(:id => thesis['id']) %>
</td>
<td>
<%= button_to 'Delete', {:action => "delete_thesis", :id => thesis['id']}, :method => 'delete' %>
</td>
</tr>
<% end %>
</table>
</div>
<% else %>
No favorite theses added yet!
<% end %>