Skip to content
Snippets Groups Projects
Commit 961a2089 authored by Mateus Rambo Strey's avatar Mateus Rambo Strey
Browse files

Merge branch 'bugfix-collections' into 'master'

Fixing collection counter in show



See merge request !227
parents 62db6d9f 930df62f
No related branches found
No related tags found
No related merge requests found
......@@ -172,6 +172,13 @@ $(document).on 'refresh_comments', (e) ->
$.get url, (data) ->
$parent.html('<br>' + data)
num = $('.learning-object-vertical').length
if num == 1
$('.object-number').html("1 objeto")
else if num > 1
$('.object-number').html( num + " objetos")
else
$('.object-number').html("coleção vazia")
$(document).trigger 'create-learning-object-columns'
$(document).trigger 'add_collection_selector'
......
......@@ -7,7 +7,7 @@
<li><h2>Favoritos</h2></li>
<li>
<input type="checkbox" class="count-collections-objects" data-toggle="tooltip" data-placement="bottom" title="Selecionar todos">
<%= bookmark_length @user %>
<span class="object-number"><%= bookmark_length @user %></span>
</li>
</ul>
</div>
......
......@@ -29,8 +29,8 @@
<li><h2><%= (@collection.class != Bookmark) ? @collection.name : "Favoritos" %></h2></li>
<li>
<input type="checkbox" class="count-collections-objects" data-toggle="tooltip" data-placement="bottom" title="Selecionar todos">
<%= collection_length @collection %>
</a>
<span class="object-number"><%= collection_length @collection %>
</span>
</li>
</ul>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment