From a939847d020055b0ed09203fde0dfd5b603e9260 Mon Sep 17 00:00:00 2001 From: Mateus Rambo Strey <mars11@inf.ufpr.br> Date: Tue, 22 Mar 2016 11:36:00 -0300 Subject: [PATCH] fix author in learning object view --- app/views/learning_objects/_learning_object_horizontal.erb | 2 +- app/views/learning_objects/_learning_object_vertical.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/learning_objects/_learning_object_horizontal.erb b/app/views/learning_objects/_learning_object_horizontal.erb index c2e5cc26..074787dd 100644 --- a/app/views/learning_objects/_learning_object_horizontal.erb +++ b/app/views/learning_objects/_learning_object_horizontal.erb @@ -23,7 +23,7 @@ <h4 class="learning-object-heading"><%= learning_object_title learning_object %></h4> <% end %> - <span class="author-label">Por <%= learning_object.get_metadata_value_of("dc.contributor.author") %></span><br/> + <span class="author-label">Por <%= learning_object.author || learning_object.publisher.name %></span><br/> <i class="fa fa-eye" data-toggle="tooltip" data-placement="bottom" title="Visualizações"></i><%= learning_object.views.count %> <i class="fa fa-thumbs-up" data-toggle="tooltip" data-placement="bottom" title="Curtidas"></i><span data-id="<%= learning_object.id %>" class="votes-count"><%= learning_object.likes.count %></span><br> diff --git a/app/views/learning_objects/_learning_object_vertical.erb b/app/views/learning_objects/_learning_object_vertical.erb index 5319ca67..eb6f9e61 100644 --- a/app/views/learning_objects/_learning_object_vertical.erb +++ b/app/views/learning_objects/_learning_object_vertical.erb @@ -15,7 +15,7 @@ <h4 class="media-heading"><%= learning_object_title(learning_object) %></h4> <i class="fa fa-eye" data-toggle="tooltip" data-placement="bottom" title="Visualizações"></i><%= learning_object.views.size %> <i class="fa fa-thumbs-up" data-toggle="tooltip" data-placement="bottom" title="Curtidas"></i><span data-id="<%= learning_object.id %>" class="votes-count"><%= learning_object.likes.size %></span> - <span class="author-label">Por <%= learning_object.get_metadata_value_of("dc.contributor.author") %></span> + <span class="author-label">Por <%= learning_object.author || learning_object.publisher.name %></span> </div> </div> </div> -- GitLab