refactoring of "abstract" search controller

This commit is contained in:
Marco Zeisler
2020-04-21 18:58:48 +02:00
parent fbfc12e096
commit a36796960f
13 changed files with 44 additions and 23 deletions
@@ -1,5 +0,0 @@
<%= form_tag('/tiss_crawler/people_show_basic', :method => "get") do %>
<%= label_tag(:search_term, "Search for people @TU Vienna:") %>
<%= text_field_tag(:search_term) %>
<%= submit_tag("Search") %>
<% end %>
@@ -5,6 +5,6 @@ This is the result for your basic people search:
<%= person['first_name'] %>
<%= person['last_name'] %>
<%= button_to 'Details', action: :person_show_detail, tiss_id: person['tiss_id'] %>
<%= button_to 'Add to favs.', action: :person_add_to_fav, tiss_id: person['tiss_id'] %>
<%= button_to 'Add to favorites', action: :person_add_to_fav, tiss_id: person['tiss_id'] %>
</p>
<% end %>
@@ -11,4 +11,5 @@ Chosen person in detail view:
<p>Other mails: <%= @person['other_emails'] %></p>
<p>Main addresses: <%= @person['main_addresses'] %></p>
<!-- <p>Employee: <%#= @person.employee %></p>-->
<%= button_to 'Add to favorites', action: :person_add_to_fav, tiss_id: @person['tiss_id'] %>
<% end %>
+12
View File
@@ -0,0 +1,12 @@
<h1>Search through @TU Vienna Database</h1>
<p>Only People Search is working right now</p>
<%= form_tag('/tiss_crawler/search', :method => "get") do %>
<%= label_tag(:search_term, "Enter your search term") %>
<%= text_field_tag(:search_term) %>
<%= radio_button_tag(:search_context, 'People', true) %> People
<%= radio_button_tag(:search_context, 'Courses', false) %> Courses
<%= radio_button_tag(:search_context, 'Theses', false) %> Theses
<%= radio_button_tag(:search_context, 'Projects', false) %> Projects
<%= submit_tag("Search") %>
<% end %>