Class ::xowiki::includelet::unread-items (public)
::xowiki::IncludeletClass ::xowiki::includelet::unread-items
Defined in /var/www/openacs.org/packages/xowiki/tcl/includelet-procs.tcl
List unread items.
- Testcases:
- No testcase defined.
Source code: namespace eval ::xowiki::includelet {} ::nsf::object::alloc ::xowiki::IncludeletClass ::xowiki::includelet::unread-items {set :__default_metaclass ::xotcl::Class set :__default_superclass ::xotcl::Object set :aggregating false set :cacheable false set :localized true set :personalized true} ::xowiki::includelet::unread-items instproc render {} { :get_parameters ::xo::Page requireCSS "/resources/acs-templating/lists.css" [:tableWidget] create t1 -volatile -columns { AnchorField create title -label [::xowiki::Page::slot::title set pretty_name] } set user_id [::xo::cc user_id] set or_clause "or i.item_id in ( select x.page_id from xowiki_last_visited x, acs_objects o where x.time < o.last_modified and x.page_id = o.object_id and x.package_id = :package_id and x.user_id = :user_id )" set or_clause "" set folder_id [::$package_id folder_id] ::xo::dc foreach unread-items [::xo::dc select -vars "a.title, i.name, i.parent_id" -from "xowiki_page p, cr_items i, acs_objects a " -where "(i.item_id not in ( select x.page_id from xowiki_last_visited x where x.user_id = [::xo::cc user_id] and x.package_id = :package_id ) $or_clause ) and i.live_revision = p.page_id and i.parent_id = :folder_id and i.publish_status <> 'production' and a.object_id = i.item_id" -orderby "a.creation_date desc" -limit $max_entries] { t1 add -title $title -title.href [::$package_id pretty_link -parent_id $parent_id $name] } return [t1 asHTML] } ::xowiki::includelet::unread-items instparametercmd title ::xowiki::includelet::unread-items instparametercmd parameter_declaration ::nsf::relation::set ::xowiki::includelet::unread-items superclass ::xowiki::Includelet ::nx::slotObj -container slot ::xowiki::includelet::unread-items ::xowiki::includelet::unread-items::slot eval {set :__parameter { {title "#xowiki.unread_items#"} {parameter_declaration { {-max_entries:integer 20} }} }} ::nsf::object::alloc ::xotcl::Attribute ::xowiki::includelet::unread-items::slot::parameter_declaration {set :accessor public set :configurable true set :convert false set :default { {-max_entries:integer 20} } set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::unread-items set :incremental 0 set :manager ::xowiki::includelet::unread-items::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::unread-items::slot::title {set :accessor public set :configurable true set :convert false set :default #xowiki.unread_items# set :defaultmethods {} set :disposition alias set :domain ::xowiki::includelet::unread-items set :incremental 0 set :manager ::xowiki::includelet::unread-items::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