Skip to content
Snippets Groups Projects
Commit 020003d6 authored by Alexandre Peres Arias's avatar Alexandre Peres Arias
Browse files

add statistics from users

parent fae4ad9b
No related branches found
No related tags found
No related merge requests found
......@@ -127,6 +127,7 @@ GEM
equalizer (~> 0.0.9)
connection_pool (2.2.0)
curb (0.8.8)
dalli (2.7.4)
debug_inspector (0.0.2)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
......@@ -378,6 +379,7 @@ DEPENDENCIES
chart-js-rails
coffee-rails (~> 4.1.0)
curb (~> 0.8.8)
dalli
devise
devise_token_auth
dspace_rest_client (~> 1.1.0)
......
class Management::StatisticsController < ManagementController
def index
end
def usuarios
def users
user_repository get_number_of_users
end
def downloads
......@@ -13,9 +11,11 @@ class Management::StatisticsController < ManagementController
end
def accesses
end
def highlights
end
def collections
......
......@@ -24,6 +24,9 @@ module OrientDb
(result.count > 0)
end
def get_number_of_users
result = connection.query sprintf("SELECT COUNT(@rid) FROM User").to_i
end
private
def odb_class
......
......@@ -70,13 +70,18 @@
<div class="row learning-object-columns">
<h2>Destaque por assunto</h2>
<% @subjects.each do |subject|%>
<div class="row mainpage-subject-element">
<h4><b><%= subject.name %></b></h4>
<%= render subject.highlights.first, orientation: 'vertical'%>
<p class="more">
<a href="#">Ver Mais</a>
</p>
</div>
<%= debug subject%>
<% if !subject.highlights.empty? %>
<div class="row mainpage-subject-element">
<h4><b><%= subject.name %></b></h4>
<%= render subject.highlights.first, orientation: 'vertical'%>
<p class="more">
<a href="#">Ver Mais</a>
</p>
</div>
<% end %>
<% end %>
</div>
<% end %>
......
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