Class ::xowiki::includelet::unread-items

::xowiki::includelet::unread-items[i] create ... \
           [ -parameter_declaration (default " {-max_entries:integer 20} ") ] \
           [ -title (default "#xowiki.unread_items#") ]

List unread items.
Documented Parameters:
max_entries
show given number of entries
Defined in packages/xowiki/tcl/includelet-procs.tcl

Class Relations

  • class: ::xowiki::IncludeletClass[i]
  • superclass: ::xowiki::Includelet[i]
::xowiki::IncludeletClass create ::xowiki::includelet::unread-items \
     -superclass ::xowiki::Includelet

Methods (to be applied on instances)

  • parameter_declaration (setter)

  • render (scripted)

    :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]
  • title (setter)