apm_application_new_checkbox (public)

 apm_application_new_checkbox

Defined in packages/acs-tcl/tcl/apm-procs.tcl

Return an HTML checkbox of package_key and package names for applications that can be mounted in the site-map. Excludes singletons that are already instantiated.

Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-subsite/www/admin/site-map/index.tcl packages/acs-subsite/ www/admin/site-map/index.tcl apm_application_new_checkbox apm_application_new_checkbox packages/acs-subsite/www/admin/site-map/index.tcl->apm_application_new_checkbox packages/acs-subsite/www/admin/site-map/site-map.tcl packages/acs-subsite/ www/admin/site-map/site-map.tcl packages/acs-subsite/www/admin/site-map/site-map.tcl->apm_application_new_checkbox packages/acs-subsite/www/site-map/index.tcl packages/acs-subsite/ www/site-map/index.tcl packages/acs-subsite/www/site-map/index.tcl->apm_application_new_checkbox acs_user::site_wide_admin_p acs_user::site_wide_admin_p (public) apm_application_new_checkbox->acs_user::site_wide_admin_p db_foreach db_foreach (public) apm_application_new_checkbox->db_foreach

Testcases:
No testcase defined.
Source code:
    set options [list]
    db_foreach package_types {
         select package_key, pretty_name
         from apm_package_types t
         where not (singleton_p = 't'
                    and exists (select 1 from apm_packages
                                where package_key = t.package_key))
         order by pretty_name
    } {
        lappend options [subst {<option value="$package_key">$pretty_name</option>}]
    }

    # If this is a site-wide admin, offer a link to the package manager
    if { [acs_user::site_wide_admin_p] } {
        lappend options {<option value="/new">--Install new package--</option>}
    }

    return [subst {<select name="package_key">[join $options]</select>}]
Generic XQL file:
packages/acs-tcl/tcl/apm-procs.xql

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

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

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