Index: openacs-4/packages/xowiki/tcl/link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/link-procs.tcl,v diff -u -r1.90.2.10 -r1.90.2.11 --- openacs-4/packages/xowiki/tcl/link-procs.tcl 9 Jan 2015 12:52:41 -0000 1.90.2.10 +++ openacs-4/packages/xowiki/tcl/link-procs.tcl 9 Jan 2015 20:09:18 -0000 1.90.2.11 @@ -91,24 +91,30 @@ set target [my target] if {[info commands ::xowiki::template::$target] ne ""} { # - # The target exists. This is a situation, where potentially a + # The target template exists. use the template + # + # This is a situation, where potentially a # recursive inclusion is happening. The included content is # added to the html output only once, with a unique id, which # can be referenced multiple times. The link is included for # each occurance. # set item_id [my item_id] set targetId [xowiki::Includelet html_id [my item_id]-$target] - set key ::__xowiki_link_rendered($targetId) - if {![info exists $key]} { - set $key 1 - set page [::xo::db::CrClass get_instance_from_db -item_id $item_id -revision_id 0] - set content [$page render_content] - set withBody true - } else { - #ns_log notice "modal with is already included: $key" - set page ::$item_id - set withBody false + set page [::xo::db::CrClass get_instance_from_db -item_id $item_id -revision_id 0] + set content "Loading ..." + set withBody true + + if {[::xowiki::template::$target render_content]} { + set key ::__xowiki_link_rendered($targetId) + if {![info exists $key]} { + set $key 1 + set content [$page render_content] + } else { + #ns_log notice "modal with is already included: $key" + set page ::$item_id + set withBody false + } } set result [::xowiki::template::$target render \ -with_body $withBody \ @@ -117,7 +123,7 @@ -content $content \ -label $label \ -href $href] - + return $result } else { ns_log notice "xowiki::link: unknown target $target" @@ -212,7 +218,7 @@ # # Link template # - ::xotcl::Class create ::xowiki::LinkTemplate -parameter {link_template body_template} + ::xotcl::Class create ::xowiki::LinkTemplate -parameter {link_template body_template {render_content true}} ::xowiki::LinkTemplate instproc render { {-with_link:boolean true} {-with_body:boolean true} @@ -227,7 +233,10 @@ if {$with_body} {append result [subst [my body_template]]} return $result } - + + # + # Small bootstrap modal + # ::xowiki::LinkTemplate create ::xowiki::template::modal-sm -link_template { $label } -body_template { @@ -249,6 +258,9 @@ } + # + # Large bootstrap modal + # ::xowiki::LinkTemplate create ::xowiki::template::modal-lg -link_template { $label } -body_template { @@ -270,6 +282,56 @@ } + # + # Small bootstrap modal using ajax + # + ::xowiki::LinkTemplate create ::xowiki::template::modal-sm-ajax -render_content false -link_template { + $label + } -body_template { +
+ +} + # + # Large bootstrap modal using ajax + # + ::xowiki::LinkTemplate create ::xowiki::template::modal-lg-ajax -render_content false -link_template { + $label + } -body_template { + + +} # # folder links Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/xowiki/www/view-modal-content.adp'. Fisheye: No comparison available. Pass `N' to diff?