Class ::xowiki::includelet::most-frequent-visitors (public)
::xowiki::IncludeletClass ::xowiki::includelet::most-frequent-visitors
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
List the most frequent visitors.
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowiki::includelet {} ::nsf::object::alloc ::xowiki::IncludeletClass ::xowiki::includelet::most-frequent-visitors {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :aggregating false set :cacheable false set :localized true set :personalized true} ::xowiki::includelet::most-frequent-visitors instproc render {} { :get_parameters ::xo::Page requireCSS "/resources/acs-templating/lists.css" [:tableWidget] create t1 -volatile -columns { Field create user -label [_ xowiki.includelet-visitors] -html { align right } Field create count -label [_ xowiki.includelets-visits] -html { align right } } ::xo::dc foreach most-frequent-visistors [::xo::dc select -vars "sum(count) as sum, user_id" -from "xowiki_last_visited" -where "package_id = :package_id" -groupby "user_id" -orderby "sum desc" -limit $max_entries] { t1 add -user [::xo::get_user_name $user_id] -count $sum } return [t1 asHTML] } ::xowiki::includelet::most-frequent-visitors instparametercmd title ::xowiki::includelet::most-frequent-visitors instparametercmd parameter_declaration ::nsf::relation::set ::xowiki::includelet::most-frequent-visitors superclass ::xowiki::Includelet ::nx::slotObj -container slot ::xowiki::includelet::most-frequent-visitors ::xowiki::includelet::most-frequent-visitors::slot eval {set :__parameter { {title "#xowiki.most_frequent_visitors#"} {parameter_declaration { {-max_entries:integer "15"} }} }} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::most-frequent-visitors::slot::parameter_declaration {set :accessor public set :configurable true set :convert false set :default { {-max_entries:integer "15"} } set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::most-frequent-visitors set :incremental 0 set :manager ::xowiki::includelet::most-frequent-visitors::slot::parameter_declaration set :methodname parameter_declaration set :multiplicity 1..1 set :name parameter_declaration set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::most-frequent-visitors::slot::title {set :accessor public set :configurable true set :convert false set :default #xowiki.most_frequent_visitors# set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::most-frequent-visitors set :incremental 0 set :manager ::xowiki::includelet::most-frequent-visitors::slot::title set :methodname title set :multiplicity 1..1 set :name title set :per-object false set :position 0 set :required false set :substdefault 0b111 set :trace none : init}XQL Not present: Generic, PostgreSQL, Oracle