- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xowiki::includelet::item-button
::xowiki::includelet::item-button create ... \
[ -__decoration (default "none") ] \
[ -return_url (default "") ]
Class Relations
- class: ::xowiki::IncludeletClass
- superclass: ::xowiki::Includelet
- subclass: ::xowiki::includelet::view-item-button, ::xowiki::includelet::create-item-button, ::xowiki::includelet::delete-item-button, ::xowiki::includelet::copy-item-button, ::xowiki::includelet::edit-item-button
::xowiki::IncludeletClass create ::xowiki::includelet::item-button \ -superclass ::xowiki::IncludeletMethods (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> </a>" } return $htmlreturn_url (setter)
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables