From bb1109f6cdcb029a707b8e1f493fd45577e323b2 Mon Sep 17 00:00:00 2001 From: Mateus Rambo Strey <mars11@inf.ufpr.br> Date: Wed, 11 Nov 2015 00:26:21 -0200 Subject: [PATCH] fix bookmarks display --- app/views/bookmarks/_bookmarks.html.erb | 6 ++---- app/views/collections/_collection.html.erb | 2 +- app/views/collections/show.html.erb | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/app/views/bookmarks/_bookmarks.html.erb b/app/views/bookmarks/_bookmarks.html.erb index dcb2ed526..07fbcb9b0 100644 --- a/app/views/bookmarks/_bookmarks.html.erb +++ b/app/views/bookmarks/_bookmarks.html.erb @@ -1,4 +1,2 @@ -<%#= link_to collection, do %> - <%= image_tag 'icons/collection', width: 24 %> - Favoritos -<%# end %> \ No newline at end of file +<% bookmarks.owner.name = "" %> +<%= render 'collections/collection', collection: bookmarks %> diff --git a/app/views/collections/_collection.html.erb b/app/views/collections/_collection.html.erb index cc1381979..f8cf27f6c 100644 --- a/app/views/collections/_collection.html.erb +++ b/app/views/collections/_collection.html.erb @@ -4,7 +4,7 @@ <%= image_tag 'icons/collection', width: 210,height:140 %> </div> <div class="panel-body"> - <h4 class="media-heading"><%= collection.name %></h4> + <h4 class="media-heading"><%= collection.name unless collection.name == "Bookmarks" %><%= "Favoritos" if collection.name == "Bookmarks" %></h4> <!-- <span class="glyphicon glyphicon-eye-open">200 </span> <span class="glyphicon glyphicon-star">4,5 </span> --> <span><a><%= 'Por '+ collection.owner.name unless collection.owner.name.blank? %></a></span> diff --git a/app/views/collections/show.html.erb b/app/views/collections/show.html.erb index be1ab078e..e7a016113 100644 --- a/app/views/collections/show.html.erb +++ b/app/views/collections/show.html.erb @@ -15,7 +15,7 @@ <div class="navbar-header"> <%= image_tag image_path("icons/collection.png"), class: "logo-image", size: "90x66" %> <ul class="nav navbar-nav navbar-right collection-header" style="margin-left: 30px;"> - <li><h2><%= @collection.name %></h2></li> + <li><h2><%= (@collection.class != Bookmarks) ? @collection.name : "Favoritos" %></h2></li> <li> <%= image_tag image_path("icons/square.png"), class: "logo-image", size: "20x20" %> <%= collection_length @collection %> -- GitLab