From c2018016bd6dca10d9cec7e8f8864bc5ce557b51 Mon Sep 17 00:00:00 2001
From: Matheus Agio Nerone <man13@inf.ufpr.br>
Date: Tue, 10 Nov 2015 11:10:41 -0200
Subject: [PATCH] now its possible to like a learning object inside the show
 page

Signed-off-by: Matheus Agio Nerone <man13@inf.ufpr.br>
---
 app/views/learning_objects/show.html.erb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/views/learning_objects/show.html.erb b/app/views/learning_objects/show.html.erb
index abf75867d..99cce25fe 100644
--- a/app/views/learning_objects/show.html.erb
+++ b/app/views/learning_objects/show.html.erb
@@ -36,7 +36,7 @@
     </div>
     <div class="pull-right" style="padding-right:122px">
       <span class="glyphicon glyphicon-eye-open"><%= @learning_object.views %>&nbsp;</span>
-      <span class="glyphicon glyphicon-star"><%= @learning_object.likes %>&nbsp;</span>
+      <span class="glyphicon glyphicon-star votes-count" data-id="<%= @learning_object.id %>" data-toggle="tooltip" data-placement="bottom" title="Curtidas"><%= @learning_object.likes %></span>&nbsp;
     </div>
     <br/><br/>
     <h2 class="title"><%= @learning_object.name %></h2>
@@ -61,8 +61,10 @@
       <div class="rating-panel">
         <div class="actions">
           <div class="col-md-3 action">
-            <%= image_tag "icons/Curtir_01.png", alt: "Curtir" %>
-            <h6>curtir objeto</h6>
+            <%= link_to like_learning_object_path(id: @learning_object.id), class: 'vote',method: :post, remote: true do %>
+                <%= image_tag "icons/Curtir_01.png", alt: "Curtir" %>
+                <h6>curtir objeto</h6>
+            <% end %>
           </div>
           <div class="col-md-3 action">
             <a href="<%= @learning_object.get_retrievelink %>">
-- 
GitLab