::xowiki::IncludeletClass
::xowiki::includelet::my-tags
Class Hierarchy of ::xowiki::includelet::my-tags
- ::xotcl::Object
- Meta-class:
- ::xotcl::Class
![[i]](/resources/acs-subsite/ZoomIn16.gif)
- Methods for instances:
- __api_make_doc, __api_make_forward_doc, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, check, classC, cleanupC, configureC, containsC, copyC, db_0or1rowC, db_1rowC, debug, defaultmethodC, destroyC, destroy_on_cleanup, ds, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearch, forward, hasclass, incrC, infoC, init, instvarC, invarC, isclass, ismetaclass, ismixin, isobject, istype, lappendC, log, method, mixinC, mixinguardC, moveC, msg, noinitC, objectparameter, parametercmdC, proc, procsearch, qn, requireNamespaceC, residualargsC, self, serialize, setC, set_instance_vars_defaults, show-object, substC, traceC, unknown, unsetC, uplevelC, upvarC, volatileC, vwait
- Methods to be applied on the class (in addition to the methods provided by the meta-class):
- getExitHandler, setExitHandler, unsetExitHandler
- ::xo::Context
- Meta-class:
- ::xotcl::Class
![[i]](/resources/acs-subsite/ZoomIn16.gif)
- Parameter for instances:
- actual_query (default " "), locale, package_id (default "0"), parameter_declaration (default "")
- Methods for instances:
- exists_query_parameter, export_vars, get_all_query_parameter, get_parameters, initialize, original_url_and_query, process_query_parameter, query_parameter
- Methods to be applied on the class:
- Methods provided by the meta-class
- ::xowiki::Includelet
- Meta-class:
- ::xotcl::Class
![[i]](/resources/acs-subsite/ZoomIn16.gif)
- Parameter for instances:
- __decoration (default "portlet"), id, name (default ""), parameter_declaration (default ""), title (default "")
- Methods for instances:
- category_clause, get_page_order, include_head_entries, initialize, js_name, resolve_page_name, screen_name
- Methods to be applied on the class (in addition to the methods provided by the meta-class):
- 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
- ::xowiki::includelet::my-tags
- Meta-class:
- ::xowiki::IncludeletClass
![[i]](/resources/acs-subsite/ZoomIn16.gif)
- Parameter for instances:
- __decoration (default "none"), id, parameter_declaration (default "
{-summary 1}
")
- Methods for instances:
- render
- Methods to be applied on the class:
- Methods provided by the meta-class
Class Relations
- superclass: ::xowiki::Includelet
![[i]](/resources/acs-subsite/ZoomIn16.gif)
::xowiki::IncludeletClass create ::xowiki::includelet::my-tags \
-superclass ::xowiki::Includelet \
-parameter {{__decoration none} id {parameter_declaration {
{-summary 1}
}}}
Methods
instproc render
::248206 instproc render {} {
my get_parameters
my instvar __including_page tags
::xo::Page requireJS "/resources/xowiki/get-http-object.js"
set p_link [$__including_page pretty_link]
set return_url "[::xo::cc url]?[::xo::cc actual_query]"
set weblog_page [$package_id get_parameter weblog_page weblog]
set save_tag_link [$package_id make_link -link $p_link $__including_page save-tags return_url]
set popular_tags_link [$package_id make_link -link $p_link $__including_page popular-tags return_url weblog_page]
set tags [lsort [::xowiki::Page get_tags -user_id [::xo::cc user_id] -item_id [$__including_page item_id] -package_id $package_id]]
set href [$package_id package_url]$weblog_page?summary=$summary&tag
set entries [list]
#foreach tag $tags {lappend entries "<a href='$href&tag=[ad_urlencode $tag]'>$tag</a>"}
set href [$package_id package_url]/tag/
foreach tag $tags {lappend entries "<a rel='tag' href='$href[ad_urlencode $tag]?summary=$summary'>$tag</a>"}
set tags_with_links [join [lsort $entries] {, }]
if {![my exists id]} {my set id [::xowiki::Includelet html_id [self]]}
set content [subst -nobackslashes {
Your Tags: $tags_with_links
(<a href='#' onclick='document.getElementById("[my id]-edit_tags").style.display="block";return false;'>edit tags</a>,
<a href='#' onclick='get_popular_tags("$popular_tags_link","[my id]");return false;'>popular tags</a>)
<FORM id='[my id]-edit_tags' style='display: none' action="$save_tag_link" method='POST'>
<INPUT name='new_tags' type='text' value="$tags">
</FORM>
<span id='[my id]-popular_tags' style='display: none'></span><br >
}]
return $content
}