diff --git a/app/assets/stylesheets/favorites.scss b/app/assets/stylesheets/favorites.scss
index 2baf7cb..c3f5840 100644
--- a/app/assets/stylesheets/favorites.scss
+++ b/app/assets/stylesheets/favorites.scss
@@ -22,4 +22,8 @@
a:hover, a:active {
background-color: #009688;
}
+}
+
+.thumb {
+ width: 3em;
}
\ No newline at end of file
diff --git a/app/controllers/favorites_controller.rb b/app/controllers/favorites_controller.rb
index f53bef6..a6de6a3 100644
--- a/app/controllers/favorites_controller.rb
+++ b/app/controllers/favorites_controller.rb
@@ -1,7 +1,8 @@
class FavoritesController < ApplicationController
def people
- @favoritePeople = FavoritePerson.where('user_id': current_user.id)
+ @favorite_people = FavoritePerson.where('user_id': current_user.id)
+ .order(params[:sort])
@host = 'https://tiss.tuwien.ac.at'
end
diff --git a/app/views/favorites/people.html.erb b/app/views/favorites/people.html.erb
index eeadd54..edfa364 100644
--- a/app/views/favorites/people.html.erb
+++ b/app/views/favorites/people.html.erb
@@ -1,25 +1,56 @@
-<%= render(:partial => "nav")%>
+<%= render(:partial => "nav") %>
Favorite People
-
- <% @favoritePeople.each do |person| %>
- -
- <%= link_to crawlers_people_crawler_show_detail_url(:tiss_id => person['tiss_id']) do %>
-
-
+
+ <%# @favorite_people.each do |person| %>
+
+ <%#= link_to crawlers_people_crawler_show_detail_url(:tiss_id => person['tiss_id']) do %>
+
+
+ <%# if person['picture_uri'] != nil %>
+ <%#= image_tag @host + person['picture_uri'] %>
+ <%# else %>
+ <%#= show_svg('account_circle-black-48dp.svg') %>
+ <%# end %>
+
+
+ <%#= person['first_name'] %>
+ <%#= person['last_name'] %>
+
+
+ <%# end %>
+
+ <%# end %>
+
+
+
+
+ | Thumb |
+ <%= link_to "First Name", :sort => "first_name" %> |
+ <%= link_to "Last Name", :sort => "last_name" %> |
+ <%= link_to "Registration Date", :sort => "created_at" %> |
+
+ <% for person in @favorite_people %>
+
+ |
+
<% if person['picture_uri'] != nil %>
- <%= image_tag @host + person['picture_uri'] %>
+ <%= image_tag @host + person['picture_uri'], class: 'thumb'%>
<% else %>
- <%= show_svg('account_circle-black-48dp.svg') %>
+ <%= show_svg('account_circle-black-48dp.svg')%>
<% end %>
-
- <%= person['first_name'] %>
- <%= person['last_name'] %>
-
-
- <% end %>
-
+ |
+
+ <%= person['first_name'] %>
+ |
+
+ <%= person['last_name'] %>
+ |
+
+ <%= person['created_at'] %>
+ |
+
<% end %>
-
+