Styling of search result page

This commit is contained in:
2020-04-25 15:28:40 +02:00
parent 4f45c768ec
commit 99b4e66504
5 changed files with 94 additions and 9 deletions
+27 -9
View File
@@ -1,10 +1,28 @@
<h1>This is the result for your basic people search</h1>
<h1>Results for "<%= params[:search_term] %>"</h1>
<% @people.each_with_index do |person, index| %>
<p>
<%= person['first_name'] %>
<%= person['last_name'] %>
<%= button_to 'Details', action: :show_detail, tiss_id: person['tiss_id'] %>
<%= button_to 'Add to favorites', action: :add_to_fav, tiss_id: person['tiss_id'] %>
</p>
<% end %>
<ul class="people-list">
<% @people.each_with_index do |person| %>
<li class="person">
<%= link_to 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 people_crawler_add_to_fav_url(:tiss_id => person['tiss_id']) do %>
<%= show_svg('favorite-24px.svg') %>
<% end %>
</span>
</li>
<% end %>
</ul>