bm_context_bar_args (public)

 bm_context_bar_args arg_list viewed_user_id

Defined in packages/bookmarks/tcl/bookmarks-procs.tcl

If viewed_user_id <> browsing_user_id we need to prefix the context bar args with an entry for bookmarks of the viewed user. If the arg_list is empty it is assumed that we are on the index page and that otherwise the page has been linked from the index page.

Parameters:
arg_list (required)
viewed_user_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 packages/bookmarks/www/bookmark-add-import.tcl packages/bookmarks/ www/bookmark-add-import.tcl bm_context_bar_args bm_context_bar_args packages/bookmarks/www/bookmark-add-import.tcl->bm_context_bar_args packages/bookmarks/www/bookmark-add-one.tcl packages/bookmarks/ www/bookmark-add-one.tcl packages/bookmarks/www/bookmark-add-one.tcl->bm_context_bar_args packages/bookmarks/www/bookmark-edit.tcl packages/bookmarks/ www/bookmark-edit.tcl packages/bookmarks/www/bookmark-edit.tcl->bm_context_bar_args packages/bookmarks/www/bookmark-permissions.tcl packages/bookmarks/ www/bookmark-permissions.tcl packages/bookmarks/www/bookmark-permissions.tcl->bm_context_bar_args packages/bookmarks/www/bookmarks-check.tcl packages/bookmarks/ www/bookmarks-check.tcl packages/bookmarks/www/bookmarks-check.tcl->bm_context_bar_args ad_conn ad_conn (public) bm_context_bar_args->ad_conn db_string db_string (public) bm_context_bar_args->db_string

Testcases:
No testcase defined.
Source code:
    set browsing_user_id [ad_conn user_id]
    
    if { $browsing_user_id ne $viewed_user_id && $viewed_user_id ne ""} {
    # The user is viewing someone elses bookmarks
    # and we need the set the context bar so that 
    # he can go back to viewing his own bookmarks
    set user_name [db_string user_name "select first_names || ' ' || last_name from cc_users where object_id = :viewed_user_id" -default ""]

    if { $arg_list eq "" } {
        # We are on the index page
        return [list "Bookmarks of $user_name"]
    } else {
        # We were linked from the index page
        return [linsert $arg_list 0 [list "index?viewed_user_id=$viewed_user_id" "Bookmarks of $user_name"]]
    }
    } else {
    return $arg_list
    }
Generic XQL file:
<fullquery name="bm_context_bar_args.user_name">
    <querytext>
      select first_names || ' ' || last_name from cc_users where object_id = :viewed_user_id
      </querytext>
</fullquery>
packages/bookmarks/tcl/bookmarks-procs.xql

PostgreSQL XQL file:
packages/bookmarks/tcl/bookmarks-procs-postgresql.xql

Oracle XQL file:
packages/bookmarks/tcl/bookmarks-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: