first attempt of people crawler incl. detail view

This commit is contained in:
Marco Zeisler
2020-04-21 16:07:54 +02:00
parent e0a21f180f
commit c32819d819
11 changed files with 42 additions and 45 deletions
@@ -1,8 +1,8 @@
<%= form_tag('/tiss_crawler/search', :method => "get") do %>
<%= form_tag('/tiss_crawler/people_show_basic', :method => "get") do %>
<%= hidden_field_tag(:context, 'People') %>
<%= hidden_field_tag(:api, '/api/person/v22/psuche') %>
<%= hidden_field_tag(:search_parameter, 'q') %>
<%= label_tag(:search_term, "Search for:") %>
<%= label_tag(:search_term, "Search for people @TU Vienna:") %>
<%= text_field_tag(:search_term) %>
<%= submit_tag("Search") %>
<% end %>
@@ -1,8 +1,9 @@
This is the result for your basic people search:
<% @people.each do |person| %>
<% @people.each_with_index do |person, index| %>
<p>
<%= person.first_name %>
<%= person.last_name %>
<%= button_to 'Details', action: :people_show_detail, index: index %>
</p>
<% end %>
@@ -0,0 +1,14 @@
Chosen person in detail view:
<% if @person != nil %>
<% if @person.picture_uri != nil %>
<%= image_tag @person.base_uri + @person.picture_uri %>
<% end %>
<p><%= @person.preceding_titles %> <%= @person.first_name %> <%= @person.last_name %>,
<%= @person.gender %> <%= @person.postpositioned_titles %></p>
<p>Phone: <%= @person.main_phone_number %></p>
<p>Mail: <%= @person.main_email %></p>
<p>Other mails: <%= @person.other_emails %></p>
<p>Main addresses: <%= @person.main_addresses %></p>
<!-- <p>Employee: <%#= @person.employee %></p>-->
<% end %>