tiss2go/app/views/favorites/theses.html.erb

52 lines
1.5 KiB
Plaintext

<%= render(:partial => "nav") %>
<div class="header-button-container">
<div class="header">
<h2>Favorite Theses</h2>
</div>
<div class="button">
<span>Annotations</span>
<label class="switch">
<input type="checkbox" id="toggleAnnotations">
<span class="slider round"></span>
</label>
</div>
</div>
<% if !@favorite_theses[0].blank? %>
<div class="table_wrapper">
<table>
<tr>
<%= render :partial => "favorites/th", :locals => {:display => "Title", :column => "title"} %>
<%= render :partial => "favorites/th", :locals => {:display => "Registration Date", :column => "created_at"} %>
</tr>
<% for thesis in @favorite_theses %>
<tr>
<td>
<%= thesis['title'] %>
</td>
<td>
<%= thesis['created_at'] %>
</td>
</tr>
<tr>
<td>
<% if thesis['personal_annotation'] != nil %>
<div id="annotation"><strong>Annotation:</strong> <%= thesis['personal_annotation'] %></div>
<% end %>
</td>
<td>
<div class="table_buttons">
<%= button_to 'Details', crawlers_theses_crawler_show_detail_url(:id => thesis['id']) %>
<%= button_to 'Delete', {:action => "delete_thesis", :id => thesis['id']}, :method => 'delete' %>
</div>
</td>
</tr>
<% end %>
</table>
</div>
<% else %>
No favorite theses added yet!
<% end %>