added widget for site count
This commit is contained in:
parent
4fa49d0b1b
commit
19d9c8b530
|
@ -0,0 +1,13 @@
|
|||
class RegisteredSitesController < ApplicationController
|
||||
|
||||
def site_count_widget
|
||||
count = RegisteredSite.count
|
||||
{
|
||||
{
|
||||
"extras" => {
|
||||
"total_sites" => count
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
|
@ -4,6 +4,8 @@ module RegisteredSites
|
|||
OrbitApp.registration "RegisteredSites", :type => "ModuleApp" do
|
||||
module_label "registered_sites.registered_sites"
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
widget_methods ["site_count_widget"]
|
||||
widget_settings [{"data_count"=>30}]
|
||||
authorizable
|
||||
taggable "RegisteredSite"
|
||||
categorizable
|
||||
|
|
Loading…
Reference in New Issue