general_comments_create_link (public)
general_comments_create_link [ -object_name object_name ] \ [ -link_text link_text ] [ -context_id context_id ] \ [ -category category ] [ -link_attributes link_attributes ] \ object_id [ return_url ]
Defined in packages/general-comments/tcl/general-comments-procs.tcl
Generates an html link to add a comment to an object.
- Switches:
- -object_name (optional)
- The name of the object.
- -link_text (optional, defaults to
"#general-comments.Add_comment#"
)- The text to display for the link.
- -context_id (optional)
- The context_id for the comment.
- -category (optional)
- A category to associate comment to.
- -link_attributes (optional)
- Some additional parameters for the link. Could be used to set the link title and other things like that. Ex. -link_attributes { title="My link title" }
- Parameters:
- object_id (required)
- The object to comment on.
- return_url (optional)
- A url for the user to return to after viewing a comment.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- general_comments_create_link
Source code: # get the package url set package_url [general_comments_package_url] if { $package_url eq "" } { return "" } # initialize variables if { ![info exists object_name] } { set object_name [acs_object_name $object_id] } if { ![info exists context_id] } { set context_id $object_id } set html [subst {<a href="[ns_quotehtml [export_vars -base ${package_url}comment-add {object_id object_name return_url context_id category}]]" $link_attributes>$link_text</a>}] return $htmlGeneric XQL file: packages/general-comments/tcl/general-comments-procs.xql
PostgreSQL XQL file: packages/general-comments/tcl/general-comments-procs-postgresql.xql
Oracle XQL file: packages/general-comments/tcl/general-comments-procs-oracle.xql