refactored crawler controllers and bundled them in crawlers namespace
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<h1>Results for "<%= params[:search_term] %>"</h1>
|
||||
|
||||
<ul class="people-list">
|
||||
<% @people.each_with_index do |person| %>
|
||||
<li class="person">
|
||||
<%= link_to crawlers_people_crawler_show_detail_url(:tiss_id => person['tiss_id']) do %>
|
||||
<span class="list-link">
|
||||
<span class="person-icon">
|
||||
<% if person['picture_uri'] != nil %>
|
||||
<%= image_tag @host + person['picture_uri'] %>
|
||||
<% else %>
|
||||
<%= show_svg('account_circle-black-48dp.svg') %>
|
||||
<% end %>
|
||||
</span>
|
||||
<span class="person-name">
|
||||
<%= person['first_name'] %>
|
||||
<%= person['last_name'] %>
|
||||
</span>
|
||||
</span>
|
||||
<% end %>
|
||||
<span class="add-to-fav">
|
||||
<%= link_to crawlers_people_crawler_add_to_fav_url(:tiss_id => person['tiss_id']) do %>
|
||||
<%= show_svg('favorite-24px.svg') %>
|
||||
<% end %>
|
||||
</span>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
@@ -0,0 +1,21 @@
|
||||
<% if @person != nil %>
|
||||
<h2><%= @person['first_name'] %> <%= @person['last_name'] %></h2>
|
||||
<div class="profile-picture">
|
||||
<% if @person['picture_uri'] != nil %>
|
||||
<%= image_tag @host + @person['picture_uri'] %>
|
||||
<% end %>
|
||||
</div>
|
||||
<h5><%= @person['preceding_titles'] %> <%= @person['postpositioned_titles'] %></h5>
|
||||
<% if @person['main_phone_number'] != nil %>
|
||||
<p>Phone: <%= @person['main_phone_number'] %></p>
|
||||
<% end %>
|
||||
<p>E-Mail: <%= @person['main_email'] %></p>
|
||||
<% if @person['other_emails'] != [] %>
|
||||
<p>Other E-Mails: <%= @person['other_emails'] %></p>
|
||||
<% end %>
|
||||
<% if @person['main_addresses'] != nil %>
|
||||
<p>Address: <%= @person['main_addresses'][0]['street'] %>, <%= @person['main_addresses'][0]['zip_code'] %> <%= @person['main_addresses'][0]['city'] %></p>
|
||||
<% end %>
|
||||
<!-- <p>Employee: <%#= @person.employee %></p>-->
|
||||
<%= button_to 'Add to favorites', action: :add_to_fav, tiss_id: @person['tiss_id'] %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user