From b20cccf07b43700c023fe76251056bcf1b81be35 Mon Sep 17 00:00:00 2001 From: Tobias Eidelpes Date: Mon, 25 May 2020 16:20:27 +0200 Subject: [PATCH] Implement favorite view for theses --- app/views/favorites/theses.html.erb | 35 +++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/app/views/favorites/theses.html.erb b/app/views/favorites/theses.html.erb index dc46c61..d552232 100644 --- a/app/views/favorites/theses.html.erb +++ b/app/views/favorites/theses.html.erb @@ -1,3 +1,34 @@ -<%= render(:partial => "nav")%> +<%= render(:partial => "nav") %> -

Fav Theses

\ No newline at end of file +

Favorite Theses

+ +<% if !@favorite_theses[0].blank? %> +
+ + + + + + + + <% for thesis in @favorite_theses %> + + + + + + + <% end %> +
<%= sortable "Title", "title" %><%= sortable "Registration Date", "created_at" %>
+ <%= thesis['title'] %> + + <%= thesis['created_at'] %> + + <%= button_to 'Details', crawlers_theses_crawler_show_detail_url(:id => thesis['id']) %> + + <%= button_to 'Delete', {:action => "delete_thesis", :id => thesis['id']}, :method => 'delete' %> +
+
+<% else %> + No favorite theses added yet! +<% end %>