%3 ::xowiki::Includelet ::xowiki::Includelet → available_includelets → describe_includelets → glob_clause → html_encode → html_id → html_to_text → js_encode → js_name → listing → locale_clause → parent_id_clause → publish_status_clause → require_YUI_CSS → require_YUI_JS category_clause get_current_folder get_page_order include_head_entries initialize js_name resolve_page_name screen_name tableWidget ::xo::Context ::xo::Context ::xowiki::Includelet->::xo::Context ::xowiki::includelet::item-button ::xowiki::includelet::item-button get_page initialize render_button ::xowiki::includelet::item-button->::xowiki::Includelet ::xowiki::includelet::view-item-button ::xowiki::includelet::view-item-button render ::xowiki::includelet::view-item-button->::xowiki::includelet::item-button ::xowiki::includelet::create-item-button ::xowiki::includelet::create-item-button render ::xowiki::includelet::create-item-button->::xowiki::includelet::item-button ::xowiki::includelet::delete-item-button ::xowiki::includelet::delete-item-button render ::xowiki::includelet::delete-item-button->::xowiki::includelet::item-button ::xowiki::includelet::copy-item-button ::xowiki::includelet::copy-item-button render ::xowiki::includelet::copy-item-button->::xowiki::includelet::item-button ::xowiki::includelet::edit-item-button ::xowiki::includelet::edit-item-button render ::xowiki::includelet::edit-item-button->::xowiki::includelet::item-button

Class ::xowiki::includelet::item-button

::xowiki::includelet::item-button[i] create ... \
           [ -__decoration (default "none") ] \
           [ -return_url (default "") ]

Class Relations

  • class: ::xowiki::IncludeletClass[i]
  • superclass: ::xowiki::Includelet[i]
  • subclass: ::xowiki::includelet::view-item-button[i], ::xowiki::includelet::create-item-button[i], ::xowiki::includelet::delete-item-button[i], ::xowiki::includelet::copy-item-button[i], ::xowiki::includelet::edit-item-button[i]
::xowiki::IncludeletClass create ::xowiki::includelet::item-button \
     -superclass ::xowiki::Includelet

Methods (to be applied on instances)

  • __decoration (setter)

  • get_page (scripted)

    :upvar $varname page_id
    if {[info exists page_id]} {
      set page [::xo::db::CrClass get_instance_from_db -item_id $page_id]
    } else {
      set page ${:__including_page}
    }
  • initialize (scripted)

    if {[:return_url] eq "" } {
      :return_url [::${:package_id} url]
    }
  • render_button (scripted)

    set html ""
    if {![info exists return_url] || $return_url eq ""} {set return_url [::$package_id url]}
    if {![info exists alt]} {set alt $method}
    if {![info exists link] || $link eq ""} {
      if {[$page istype ::xowiki::Package]} {
        set link  [::$package_id make_link $package_id edit-new object_type  return_url page_order source_item_id]
      } else {
        set p_link [$page pretty_link]
        set link [::$package_id make_link -link $p_link $page $method  return_url page_order source_item_id]
      }
    }
    if {$link ne ""} {
      set button_class [namespace tail [:info class]]
      set props ""
      if {$alt ne ""} {append props "alt=\"[ns_quotehtml $alt]\" "}
      if {$title ne ""} {append props "title=\"[ns_quotehtml $title]\" "}
      if {$target ne ""} {append props "target=\"[ns_quotehtml $target]\" "}
      set html "<a class='$button_class' href=\"[ns_quotehtml $link]\" $props>&nbsp;</a>"
    }
    return $html
  • return_url (setter)