Implement search, show_basic, show_detail and add_to_fav for theses

This commit is contained in:
2020-05-25 16:14:41 +02:00
parent 311e3d9dcb
commit d84297bde7
13 changed files with 175 additions and 3 deletions
@@ -0,0 +1,20 @@
<h1>Results for "<%= params[:search_term] %>"</h1>
<ul class="theses-list">
<% @theses.each_with_index do |thesis| %>
<li class="thesis">
<%= link_to crawlers_theses_crawler_show_detail_url(:id => thesis['id'], :title => thesis['title']) do %>
<span class="list-link">
<span class="thesis-title">
<%= thesis['title'] %>
</span>
</span>
<% end %>
<span class="add-to-fav">
<%= link_to crawlers_theses_crawler_add_to_fav_url(:id => thesis['id'], :title => thesis['title']) do %>
<%= show_svg('favorite-24px.svg') %>
<% end %>
</span>
</li>
<% end %>
</ul>
@@ -0,0 +1,5 @@
<% if @thesis != nil %>
<h2><%= @thesis['title']['de'] %></h2>
<h5><%= @thesis['thesisType'] %>, <%= @thesis['instituteCode'] %> <%= @thesis['instituteName']['de'] %></h5>
<%= button_to 'Add to favorites', action: :add_to_fav, id: @id, title: @thesis['title']['de'] %>
<% end %>