Index: openacs-4/contrib/packages/cop-base/cop-base.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/cop-base.info,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/cop-base/cop-base.info 29 Mar 2004 20:04:28 -0000 1.2 +++ openacs-4/contrib/packages/cop-base/cop-base.info 31 Mar 2004 21:15:21 -0000 1.3 @@ -1,17 +1,18 @@ - + COP Base COP Bases f t + cop-admin Jeff Davis Community of Practice base package Xarg - Provides datamodel, utility functions, includelets, and documentation for the Community of practice tools. + Provides datamodel, utility functions, includelets, and documentation for the Community of practice tools. Also the admin functions for creating the communities themselves. Index: openacs-4/contrib/packages/cop-base/lib/cop-footer.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/lib/cop-footer.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/cop-base/lib/cop-footer.adp 28 Mar 2004 21:17:13 -0000 1.1 +++ openacs-4/contrib/packages/cop-base/lib/cop-footer.adp 31 Mar 2004 21:15:22 -0000 1.2 @@ -66,8 +66,8 @@
- @catass_list@ +
Index: openacs-4/contrib/packages/cop-base/lib/cop-footer.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/lib/cop-footer.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/cop-base/lib/cop-footer.tcl 28 Mar 2004 21:17:13 -0000 1.1 +++ openacs-4/contrib/packages/cop-base/lib/cop-footer.tcl 31 Mar 2004 21:15:22 -0000 1.2 @@ -5,7 +5,7 @@ set cur_pkg [ad_conn package_id] set ratingicons [cop::rating::icon_base] -db_1row obj_title {select pretty_name as tname, pretty_plural as tname_s, title as obj_title, package_id as obj_pkg, acs_object__name(object_id) as acs_name from acs_objects o, acs_object_types t where object_id = :displayed_object_id and t.object_type = o.object_type} +db_1row obj_title {select o.object_type, pretty_name as tname, pretty_plural as tname_s, title as obj_title, package_id as obj_pkg, acs_object__name(object_id) as acs_name from acs_objects o, acs_object_types t where object_id = :displayed_object_id and t.object_type = o.object_type} if {[empty_string_p $obj_title]} { set obj_title EMPTY } @@ -18,7 +18,6 @@ cop::clipboard::clipboards -create_new -force_default [ad_conn user_id] clipboards cop::clipboard::clipped $displayed_object_id [ad_conn user_id] clipped - # record object view and get current count. db_string record_view "select cop_object_record_view(:displayed_object_id, :user_id)" -default 0 if {![db_0or1row views "select views, unique_views from cop_object_view_agg where object_id = :displayed_object_id"]} { @@ -41,8 +40,6 @@ } - - # stuff for comments # todo: suppress for things that should not be commentable. set comment_link {} @@ -67,7 +64,7 @@ category::ad_form::add_widgets -container_object_id [ad_conn subsite_id] -form_name catass # mapped categories: -set catass_list "[category::get_mapped_categories $displayed_object_id] : [category::list::get_pretty_list [category::get_mapped_categories $displayed_object_id]]" +set catass_list [category::list::get_pretty_list [category::get_mapped_categories $displayed_object_id]] # dummy for debug set foo {} Index: openacs-4/contrib/packages/cop-base/lib/install.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/lib/install.xml,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-base/lib/install.xml 31 Mar 2004 21:15:22 -0000 1.1 @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: openacs-4/contrib/packages/cop-base/tcl/cop-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/tcl/cop-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/cop-base/tcl/cop-procs.tcl 28 Mar 2004 21:17:14 -0000 1.1 +++ openacs-4/contrib/packages/cop-base/tcl/cop-procs.tcl 31 Mar 2004 21:15:22 -0000 1.2 @@ -12,7 +12,7 @@ namespace eval cop::util {} ad_proc -public cop::util::url { - {-subsite_id {}} + {-node_id {}} } { Returns the cop-ui URL for a given subsite. @@ -23,9 +23,211 @@ @author Jeff Davis davis@xarg.net @creation-date 2003-10-30 } { - if {[empty_string_p $subsite_id]} { - set subsite_id [ad_conn subsite_id] + if {[empty_string_p $node_id]} { + set node_id [site_node::closest_ancestor_package -package_key acs-subsite -node_id [ad_conn node_id] -include_self -element node_id] } - return [lindex [site_node::get_children -node_id $subsite_id -package_key cop-ui -all] 0] -} \ No newline at end of file + return [lindex [site_node::get_children -node_id $node_id -package_key cop-ui -all] 0] +} + +ad_proc -public cop::util::package_id { + {-node_id {}} +} { + Returns the first cop-ui package under node_id, node_id defaults to the nearest + + @param subsite_id the subsite for which to find the cop-ui package_id + + @return a url for the cop-ui package + + @author Jeff Davis davis@xarg.net + @creation-date 2003-10-30 +} { + if {[empty_string_p $node_id]} { + set node_id [site_node::closest_ancestor_package -package_key acs-subsite -node_id [ad_conn node_id] -include_self -element node_id] + } + + return [lindex [site_node::get_children -element package_id -node_id $node_id -package_key cop-ui -all] 0] +} + + +ad_proc -private cop::load_install_xml {filename binds} { + Loads an install file and returns the root node. + errors out if the file is not there. + + substitutes variables before parsing so you can provide interpolated values. + + @param filename relative to serverroot, leading slash needed. + @param binds list of {variable value variable value ...} + + @return root_node of the parsed xml file. + + @author Jeff Davis +} { + # Abort if there is no install.xml file + set filename [acs_root_dir]$filename + + if { ![file exists $filename] } { + error "File $filename not found" + } + + # Read the whole file + set file [open $filename] + set __the_body__ [read $file] + close $file + # Interpolate the vars. + if {![empty_string_p binds]} { + foreach {var val} $binds { + set $var $val + } + if {[catch {set __the_body__ [subst -nobackslashes -nocommands ${__the_body__}]} err]} { + error $err + } + } + + set root_node [xml_doc_get_first_node [xml_parse -persist ${__the_body__}]] + return $root_node +} + +ad_proc -private cop::install {filename binds} { + install a CoP subsite from an xml definition. + + @parameter filename path to the xml file defining the CoP relative to serverroot. + @param binds list of {variable value variable value ...} + + @return list of messages + + @author Jeff Davis (swiped from acs-bootstrap-installer though) +} { + set root_node [cop::load_install_xml $filename $binds] + + set acs_application(name) [apm_required_attribute_value $root_node name] + set acs_application(pretty_name) [apm_attribute_value -default $acs_application(name) $root_node pretty-name] + + lappend out "Loading packages for the $acs_application(pretty_name) application." + + set actions [xml_node_get_children_by_name $root_node actions] + + if { [llength $actions] != 1 } { + ns_log Error "Error in \"$filename\": only one action node is allowed, found: [llength $actions]" + error "Error in \"$filename\": only one action node is allowed" + } + + set actions [xml_node_get_children [lindex $actions 0]] + + foreach action $actions { + switch -exact [xml_node_get_name $action] { + text {} + + install { + set install_spec_files [list] + foreach install_spec_file [glob -nocomplain "[acs_root_dir]/packages/[apm_required_attribute_value $action package]/*.info"] { + if { [catch { array set package [apm_read_package_info_file $install_spec_file] } errmsg] } { + # Unable to parse specification file. + error "install: $install_spec_file could not be parsed correctly. The error: $errmsg" + return + } + + if { [apm_package_supports_rdbms_p -package_key $package(package.key)] + && ![apm_package_installed_p $package(package.key)] } { + lappend install_spec_files $install_spec_file + } + } + + set pkg_info_list [list] + foreach spec_file [glob -nocomplain "[acs_root_dir]/packages/*/*.info"] { + # Get package info, and find out if this is a package we should install + if { [catch { array set package [apm_read_package_info_file $spec_file] } errmsg] } { + # Unable to parse specification file. + error "install: $spec_file could not be parsed correctly. The error: $errmsg" + } + + if { [apm_package_supports_rdbms_p -package_key $package(package.key)] + && ![apm_package_installed_p $package(package.key)] } { + # Save the package info, we may need it for dependency satisfaction later + lappend pkg_info_list [pkg_info_new $package(package.key) $spec_file \ + $package(provides) $package(requires) ""] + } + } + + if { [llength $install_spec_files] > 0 } { + set dependency_results [apm_dependency_check -pkg_info_all $pkg_info_list $install_spec_files] + if { [lindex $dependency_results 0] == 1 } { + apm_packages_full_install -callback apm_ns_write_callback [lindex $dependency_results 1] + } else { + foreach package_spec [lindex $dependency_results 1] { + if { [string is false [pkg_info_dependency_p $package_spec]] } { + append err_out "install: package \"[pkg_info_key $package_spec]\"[join [pkg_info_comment $package_spec] ","]\n" + } + } + error $err_out + } + } + } + + mount { + + set package_key [apm_required_attribute_value $action package] + set instance_name [apm_required_attribute_value $action instance-name] + set mount_point [apm_required_attribute_value $action mount-point] + + regexp {(.*)/([^/]*)$} $mount_point match parent_url mount_point + if {$parent_url eq ""} { + set parent_url / + } + set parent_id [site_node::get_node_id -url $parent_url] + + if { [catch { + db_transaction { + set node_id [site_node::new -name $mount_point -parent_id $parent_id] + } + } error] } { + # There is already a node with that path, check if there is a package mounted there + error $error + array set node [site_node::get -url "/$mount_point"] + if { [empty_string_p $node(object_id)] } { + # There is no package mounted there so go ahead and mount the new package + set node_id $node(node_id) + } else { + error "A package is already mounted at \"$mount_point\"" + } + } + + if { ![empty_string_p $node_id] } { + lappend out "Mounting new instance of package $package_key at /$mount_point" + site_node::instantiate_and_mount \ + -node_id $node_id \ + -node_name $mount_point \ + -package_name $instance_name \ + -package_key $package_key + + } + + } + + set-parameter { + set name [apm_required_attribute_value $action name] + set value [apm_required_attribute_value $action value] + set package_key [apm_attribute_value -default "" $action package] + set url [apm_attribute_value -default "" $action url] + + if { ![string equal $package_key ""] && ![string equal $url ""] } { + error "set-parameter: Can't specify both package and url for $url and $package_key" + } elseif { ![string equal $package_key ""] } { + parameter::set_from_package_key -package_key $package_key -parameter $name -value $value + } else { + parameter::set_value \ + -package_id [site_node::get_object_id -node_id [site_node::get_node_id -url $url]] \ + -parameter $name \ + -value $value + } + } + + default { + error "Error in \"$filename\": got bad node \"[xml_node_get_name $action]\"" + } + + } + + } + return $out +} Index: openacs-4/contrib/packages/cop-base/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/www/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-base/www/index.adp 31 Mar 2004 21:15:22 -0000 1.1 @@ -0,0 +1,4 @@ + + CoP Central + + Create a new community Index: openacs-4/contrib/packages/cop-base/www/admin/community-new.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/www/admin/community-new.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-base/www/admin/community-new.adp 31 Mar 2004 21:15:23 -0000 1.1 @@ -0,0 +1,6 @@ + +Create a new CoP +copnew.name + + +@foo@ \ No newline at end of file Index: openacs-4/contrib/packages/cop-base/www/admin/community-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/www/admin/community-new.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-base/www/admin/community-new.tcl 31 Mar 2004 21:15:23 -0000 1.1 @@ -0,0 +1,39 @@ +ad_form -name copnew -form { + {name:text + {label {Community name}} + {html {size 60 maxlength 60}} + } + {stub:text + {label {URL stub}} + {html {size 60 maxlength 60}} + {help_text "This is the last part of the url. It should not have any spaces or characters
other than -,_,a-z, and 0-9. +Your community will be created at [ad_url][ad_conn package_url]url_stub/"} + } + {description:richtext(richtext),optional + {html {cols 60 rows 10}} + {label "Description"} + {help_text "A summary of the Community's purpose."} + } +} + +category::ad_form::add_widgets -container_object_id [subsite::main_site_id] -form_name copnew +set foo [subsite::main_site_id] +ad_form -extend -name copnew -validate { + { name {![string is space $name]} {You must enter a name.} } + { stub {![string is space $stub]} {You must enter a URL stub.} } + { stub {[regexp {^[-A-Za-z0-9_]*$} [string trim $stub]]} {Your URL stub contains invalid characters} } + { stub {![db_string stub_exists "select count(*) from site_nodes where parent_id = (select node_id from site_nodes where object_id = [subsite::main_site_id]) and lower(name) = lower(:stub)"]} {A community with this url already exists} } +} -on_submit { + set Description [template::util::richtext::get_property contents $description] + set DescriptionFormat [template::util::richtext::get_property format $description] + + set out [cop::install /packages/cop-base/lib/install.xml \ + [list \ + base_url /$stub \ + name $name \ + Description $Description \ + DescriptionFormat $DescriptionFormat \ + ] ] +} -after_submit { + ad_returnredirect -message "Created \"$name\"" "/$stub" +} Index: openacs-4/contrib/packages/cop-base/www/doc/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-base/www/doc/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-base/www/doc/index.adp 31 Mar 2004 21:15:23 -0000 1.1 @@ -0,0 +1,14 @@ + +Community Of Practice Support tools + +

Setup notes

+
    +
  • Set up searching
  • +
  • mount search at /search
  • +
  • Install the packages forums, cop-ui, blog, file-storage, static-pages, ...
  • +
  • Create a subsite, mount packages underneath, including cop-ui, +
  • set DefaultMaster to /packages/cop-ui/lib/cop-master +
  • set IndexRedirectUrl /packages/cop-ui/lib/index +
  • set new-registration email address to a real address. +
  • create the camden APLAWS category tree cop-ui/categories/acl.tcl (takes a long time). +
Index: openacs-4/contrib/packages/cop-ui/cop-ui.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/cop-ui.info,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/cop-ui/cop-ui.info 29 Mar 2004 20:04:29 -0000 1.2 +++ openacs-4/contrib/packages/cop-ui/cop-ui.info 31 Mar 2004 21:12:16 -0000 1.3 @@ -6,7 +6,7 @@ COP UI` f f - + Jeff Davis Commmunity of practice UI including admin functions. @@ -18,7 +18,8 @@ - + + Index: openacs-4/contrib/packages/cop-ui/lib/cop-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/lib/cop-master.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-ui/lib/cop-master.adp 31 Mar 2004 21:12:16 -0000 1.1 @@ -0,0 +1,97 @@ + + + + @title;noquote@ + + + @signatory;noquote@ + + + @focus;noquote@ + + + @context;noquote@ + + + @header_stuff;noquote@ + + + @displayed_object_id;noquote@ + +
+ @subsite_name@ + @subsite_name@ +
+ + + + Index: openacs-4/contrib/packages/cop-ui/lib/cop-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/lib/cop-master.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-ui/lib/cop-master.tcl 31 Mar 2004 21:12:16 -0000 1.1 @@ -0,0 +1,35 @@ +# Expects properties: +# title +# focus +# header_stuff +# section +# subnavbar_link + +if { ![info exists section] } { + set section {} +} + +if { ![info exists header_stuff] } { + set header_stuff {} +} + +if { ![info exists subnavbar_link] } { + set subnavbar_link {} +} + +# This will set 'sections' and 'subsections' multirows +subsite::define_pageflow -section $section +subsite::get_section_info -array section_info + +# Find the subsite we belong to +set subsite_url [site_node_closest_ancestor_package_url] +array set subsite_sitenode [site_node::get -url $subsite_url] +set subsite_node_id $subsite_sitenode(node_id) +set subsite_name $subsite_sitenode(instance_name) + +# Where to find the stylesheet +set css_url "/resources/cop-ui/cop-master.css" + +if { [string equal [ad_conn url] $subsite_url] } { + set subsite_url {} +} Index: openacs-4/contrib/packages/cop-ui/lib/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/lib/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-ui/lib/index.adp 31 Mar 2004 21:12:16 -0000 1.1 @@ -0,0 +1,10 @@ + + @subsite_name;noquote@ +@description;noquote@ + + Index: openacs-4/contrib/packages/cop-ui/lib/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/lib/index.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-ui/lib/index.tcl 31 Mar 2004 21:12:16 -0000 1.1 @@ -0,0 +1,14 @@ +ad_page_contract { + + +} {} + +set subsite_name [ad_conn instance_name] +set url [cop::util::url] +set package_id [lindex [cop::util::package_id] 0] + +set description [ad_html_text_convert \ + -from [parameter::get -package_id $package_id -parameter DescriptionFormat -default text/plain] \ + -to text/html \ + [parameter::get -package_id $package_id -parameter Description -default {def}] ] + Index: openacs-4/contrib/packages/cop-ui/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/www/index.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/cop-ui/www/index.adp 28 Mar 2004 21:17:10 -0000 1.1 +++ openacs-4/contrib/packages/cop-ui/www/index.adp 31 Mar 2004 21:12:16 -0000 1.2 @@ -1,6 +1,5 @@ - COP HOME - cop + KM
  • clipboards
  • Index: openacs-4/contrib/packages/cop-ui/www/categories/acl.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/www/categories/acl.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-ui/www/categories/acl.tcl 31 Mar 2004 21:12:17 -0000 1.1 @@ -0,0 +1,1556 @@ +set cats {1 + {advice, benefits and emergencies} + 2 + {accident at work} + 2 + {advice} + 3 + {consumer} + 3 + {debt and money} + 3 + {employment} + 3 + {family law} + 3 + {health} + 3 + {housing} + 3 + {immigration and nationalty} + 3 + {legal} + 3 + {welfare rights} + 2 + {advice centres} + 3 + {call centre} + 3 + {contact centre} + 3 + {libraries} + 3 + {local service centres} + 3 + {one stop shops} + 2 + {benefits} + 3 + {attendance allowance} + 3 + {council tax benefit} + 3 + {disability living allowance} + 3 + {help with health costs} + 3 + {help with house repairs} + 3 + {help with fuel bills} + 3 + {housing benefit} + 3 + {incapacity benefit} + 3 + {income support} + 3 + {invalid care allowance} + 3 + {severe disablement allowance} + 3 + {help with residential or nursing home fees} + 3 + {travel concessions} + 2 + {careers service} + 2 + {citizens advice bureau} + 2 + {complaints} + 2 + {debt} + 3 + {debt counselling} + 2 + {emergencies} + 3 + {alarms} + 3 + {ambulance} + 3 + {civic protection} + 3 + {council services} + 3 + {emergency planning} + 3 + {phone numbers} + 2 + {floods} + 3 + {sandbags} + 2 + {nuisances} + 3 + {animals} + 4 + {barking dogs} + 3 + {neighbours} + 3 + {noise} + 3 + {pest control} + 2 + {rates} + 1 + {business} + 2 + {building regulations} + 2 + {building sites} + 2 + {business advice} + 2 + {business charges} + 2 + {business development} + 2 + {business grants} + 2 + {business sites} + 2 + {business support} + 2 + {chamber of commerce} + 2 + {commercial property} + 2 + {council approved suppliers list} + 2 + {economic development} + 3 + {regeneration} + 2 + {economic statistics} + 2 + {health and safety} + 2 + {industrial property} + 2 + {licensing} + 3 + {acupuncture} + 3 + {amusement arcades} + 3 + {betting offices} + 3 + {bingo} + 3 + {caravans and camping sites} + 3 + {civic licensing} + 3 + {entertainment} + 3 + {gaming machines} + 3 + {hackney carriages} + 3 + {livestock markets} + 3 + {massage and special treatments} + 3 + {minerals} + 3 + {pet shops} + 2 + {local businesses} + 2 + {markets} + 3 + {farmers market} + 3 + {market licence} + 2 + {permits} + 3 + {scaffolding} + 3 + {skips} + 2 + {planning applications} + 2 + {premises to let} + 2 + {regeneration} + 2 + {self employment} + 2 + {shops} + 2 + {small medium enterprises} + 2 + {starting a business} + 2 + {trading standards} + 2 + {youth enterprise} + 1 + {community, people and living} + 2 + {accesibility} + 2 + {births, deaths, marriage registration} + 2 + {burials} + 3 + {cemeteries} + 2 + {charity events} + 2 + {clubs and societies} + 3 + {charities} + 3 + {Voluntary organisations} + 4 + {volunteering} + 2 + {community centres} + 2 + {community groups} + 2 + {community safety} + 2 + {community services} + 2 + {consumer protection} + 2 + {consumer advice} + 2 + {coroners office} + 2 + {crematoria} + 2 + {crime and disorder} + 3 + {anti-social behaviour} + 3 + {CCTV} + 3 + {crime preventions} + 3 + {prisons} + 3 + {victim support} + 2 + {discrimination} + 2 + {elderly} + 2 + {equalities} + 2 + {ethnic minority groups} + 2 + {events} + 2 + {fire services} + 2 + {grants} + 3 + {lottery} + 2 + {harassment} + 3 + {neighbours} + 3 + {racial} + 2 + {health and safety} + 2 + {identity cards} + 2 + {interpreters service} + 2 + {key workers} + 2 + {life events} + 2 + {life saving} + 2 + {luncheon clubs} + 2 + {magistrates} + 2 + {maps} + 2 + {markets} + 2 + {neighbourhood} + 2 + {police} + 2 + {register of births, deaths and marriages} + 2 + {sexuality} + 2 + {smart cards} + 2 + {travellers} + 2 + {twin towns} + 2 + {voluntary organisations} + 2 + {weddings} + 2 + {Welsh language} + 2 + {women} + 2 + {young people} + 3 + {advice} + 3 + {youth offending team} + 3 + {working} + 3 + {youth services} + 1 + {council and democracy} + 2 + {adjacent authorities} + 2 + {best value} + 3 + {best value performance indicators} + 3 + {best value performance plan} + 2 + {bylaws} + 2 + {cabinet} + 2 + {campaigns} + 2 + {census} + 2 + {central government} + 2 + {citizens charter} + 2 + {commitees} + 3 + {agendas} + 3 + {meetings} + 3 + {minutes} + 3 + {membership} + 3 + {papers} + 3 + {reports} + 3 + {representation} + 3 + {scrutiny} + 3 + {services} + 2 + {consultation} + 2 + {council} + 3 + {composition of} + 2 + {council land and property} + 2 + {council tax} + 2 + {complaints} + 2 + {councillors} + 3 + {surgeries} + 3 + {interests} + 2 + {decision making} + 2 + {departments} + 2 + {elections} + 3 + {electoral boundaries} + 3 + {electoral registration} + 3 + {electoral services} + 3 + {postal voting} + 3 + {proxy votes} + 2 + {equal opportunities} + 2 + {European affairs} + 2 + {European funding} + 2 + {finances} + 2 + {forward plan} + 2 + {licences} + 3 + {entertainment licences} + 3 + {skip licences} + 2 + {local stratgeic plan} + 2 + {marches} + 2 + {mayor} + 2 + {media enquiries} + 2 + {members of parliament} + 2 + {members of European parliament} + 2 + {modernising} + 2 + {parish councils} + 2 + {parliamentry boundaries} + 2 + {policy and performance} + 3 + {best value} + 2 + {political parties} + 2 + {population statistics} + 2 + {standards} + 2 + {statistics} + 3 + {population} + 2 + {town councils} + 2 + {trade unions} + 2 + {wards} + 1 + {education} + 2 + {after school clubs} + 2 + {adult education} + 2 + {advisory service} + 2 + {appeals} + 2 + {awards} + 2 + {careers} + 2 + {colleges and universities} + 3 + {six form colleges} + 3 + {universities} + 3 + {specialist colleges} + 3 + {tertiary colleges} + 2 + {commnunity education} + 2 + {education centres} + 2 + {education standards} + 2 + {education welfare service} + 2 + {evening classes} + 2 + {examinations} + 3 + {Key Stage 2} + 3 + {GCSE} + 3 + {A and S levels} + 2 + {extra curricular} + 2 + {grants} + 2 + {home teaching} + 2 + {inclusive education} + 2 + {learning difficulties} + 2 + {life long learning} + 2 + {music centres} + 2 + {National Grid for Learning} + 2 + {OFSTED inspections / reports} + 2 + {pre school} + 3 + {creche} + 3 + {early years development} + 3 + {play groups} + 3 + {play schemes} + 3 + {play programmes} + 2 + {scholarships and trust funds} + 2 + {schools} + 3 + {admissions} + 4 + {appeals} + 3 + {attendance} + 3 + {buildings} + 3 + {bullying} + 3 + {clothing grants} + 3 + {crossing patrols} + 3 + {educational development behaviour centre} + 3 + {exclusion} + 3 + {free milk} + 3 + {free school meals} + 3 + {independent schools} + 3 + {inspections} + 3 + {junior schools} + 4 + {first schools} + 4 + {middle schools} + 4 + {high schools} + 3 + {nursery schools} + 3 + {primary schools} + 3 + {public schools} + 3 + {pupil support service} + 3 + {religious schools} + 3 + {secondary schools} + 3 + {transport} + 2 + {students} + 3 + {awards} + 3 + {student grants} + 3 + {loans and fees} + 2 + {teachers} + 2 + {training} + 2 + {work based learning} + 1 + {environment} + 2 + {abandoned vehhicles} + 2 + {accident prevention} + 2 + {advertisements - display of} + 2 + {agenda 21} + 2 + {agri food supply} + 2 + {air quality} + 2 + {animals} + 3 + {animal nuisances} + 3 + {animal welfare} + 3 + {cruelty} + 3 + {dangerous or wild} + 3 + {dead animals} + 3 + {dogs} + 4 + {fouling} + 4 + {guard dogs} + 4 + {wardens} + 3 + {farm animals} + 3 + {performing animals} + 3 + {rabies} + 2 + {asbestos} + 2 + {beaches} + 3 + {cleanliness} + 3 + {safety} + 2 + {bonfires} + 2 + {buildings} + 3 + {alterations} + 3 + {design} + 3 + {extensions} + 2 + {cleansing} + 2 + {community safety} + 2 + {composting} + 2 + {conservation} + 3 + {archeology} + 3 + {archeological sites and monuments} + 3 + {areas of outstanding national beauty} + 3 + {coast protection} + 3 + {conservation areas} + 3 + {historic buildings} + 2 + {contaminated land} + 2 + {crop spraying} + 2 + {dangerous structures} + 2 + {demolition} + 3 + {design guide} + 2 + {dilapidated premises} + 2 + {draining and sewerage} + 3 + {blocked drains} + 3 + {cesspools and septic tanks} + 3 + {effluent} + 3 + {sewers} + 2 + {dustbins} + 2 + {environmental health} + 3 + {air quality} + 3 + {food hygiene} + 4 + {devlivery vehicles} + 3 + {hygiene inspections} + 3 + {infectious diseases} + 3 + {noise} + 3 + {pests} + 3 + {pollution} + 2 + {energy} + 3 + {conservation} + 3 + {efficiency} + 2 + {fire escape regualtions} + 2 + {flyposting} + 2 + {flytipping} + 2 + {food} + 3 + {food hygiene and safety} + 3 + {food labelling} + 3 + {mobile snack bars} + 2 + {graffiti removal} + 2 + {grass cutting} + 2 + {grounds maintenance} + 2 + {hazardous substances} + 3 + {radioactive material} + 2 + {hedges and scrubs} + 2 + {health and safety} + 2 + {hoardings} + 2 + {inspections} + 3 + {hygiene and safety} + 2 + {land} + 3 + {council land} + 3 + {land charges} + 3 + {land fill} + 4 + {land fill tax} + 3 + {land registry} + 2 + {land use and register} + 2 + {landscaping} + 2 + {litter} + 3 + {litter bins} + 3 + {litter complaints} + 2 + {listed buildings} + 2 + {local agenda 21} + 2 + {local development plans} + 2 + {morturies} + 2 + {planning} + 3 + {advice} + 3 + {appeals} + 3 + {applications} + 3 + {change of use} + 3 + {compulsory purchase orders} + 3 + {conveyancing} + 3 + {enforcement} + 3 + {unitary development plan} + 2 + {pest control} + 3 + {ants} + 3 + {bed bugs} + 3 + {bees} + 3 + {beetles} + 3 + {cockroaches} + 3 + {fleas} + 3 + {fumigation} + 3 + {insects} + 3 + {lice} + 3 + {mice} + 3 + {rats} + 3 + {wasps} + 2 + {pollution} + 3 + {air} + 4 + {exhaust fumes} + 3 + {chemical} + 3 + {control} + 3 + {land} + 3 + {smoke control} + 3 + {sulphur dioxide monitoring} + 3 + {water} + 2 + {recycling} + 2 + {road safety} + 2 + {rubbish collection} + 3 + {dustbins} + 3 + {bulky waste} + 2 + {satellite dishes} + 2 + {scaffolding} + 2 + {skips} + 2 + {street repairs} + 2 + {toxic substances} + 3 + {lead} + 2 + {trading standards} + 3 + {calibration service} + 3 + {catering} + 3 + {consumer advice} + 3 + {counterfeiting} + 3 + {description of goods} + 3 + {doorstep sales persons} + 3 + {ear piercing} + 3 + {fair trading} + 3 + {fake goods} + 3 + {fraud} + 3 + {food hawkers} + 3 + {garages} + 3 + {hairdressers} + 3 + {hallmarking} + 3 + {hawkers} + 3 + {liquid petroleum gas} + 3 + {misleading advertising} + 3 + {money lenders} + 3 + {raffles} + 3 + {street trading} + 2 + {trees} + 3 + {trees conservation} + 2 + {waste} + 3 + {business} + 3 + {clinical} + 3 + {dangerous} + 3 + {garden} + 3 + {household} + 3 + {poisonous} + 3 + {trade} + 2 + {water} + 3 + {drinking water} + 3 + {water meters} + 3 + {water safety} + 2 + {weight and measures} + 1 + {health} + 2 + {AIDS/HIV} + 2 + {drugs action} + 2 + {health action zone} + 2 + {health benefits} + 2 + {health promotion} + 2 + {health visitors} + 2 + {heat waves} + 2 + {infectious diseases} + 2 + {mental health promotion} + 2 + {smoking} + 1 + {housing} + 2 + {allocations} + 2 + {applications} + 2 + {bed and breakfast} + 2 + {build your own home} + 2 + {choice based lettings} + 2 + {council housing} + 2 + {conversions} + 3 + {loft conversions} + 2 + {decoration allowance} + 2 + {empty properties} + 2 + {energy conservation} + 2 + {estate management} + 2 + {evictions} + 2 + {fuel grants} + 2 + {gas repairs} + 2 + {home improvement grants} + 2 + {home ownership} + 2 + {homelessness} + 2 + {hostels} + 2 + {houseboats} + 2 + {house numbering} + 2 + {household numbering} + 2 + {household waste} + 2 + {housing associations and cooperatives} + 2 + {housing benefits} + 2 + {housing offices} + 2 + {housing policies} + 2 + {housing register} + 2 + {houses in multi occupancy (hmo)} + 2 + {garages} + 2 + {insulation} + 2 + {letting property} + 2 + {planning} + 2 + {postcode allocation} + 2 + {mortgages with the council} + 2 + {private sector housing} + 2 + {properties for sale / rent} + 2 + {rehousing} + 2 + {refuges} + 2 + {renovation grants} + 2 + {rent} + 3 + {arrears} + 3 + {paying} + 3 + {rent officer service} + 2 + {repairs} + 3 + {damp} + 2 + {repossessions} + 2 + {right to buy} + 2 + {safety} + 3 + {asbestos} + 3 + {gas} + 2 + {shared ownership} + 2 + {sheltered housing} + 2 + {smoke alarms} + 2 + {squatters} + 2 + {supported housing} + 2 + {temporary accommodation} + 2 + {tenants} + 3 + {tenants and residents groups} + 3 + {tenants participation} + 2 + {transfers and exchanges} + 2 + {waiting list} + 1 + {jobs and careers} + 2 + {careers advice} + 2 + {job centres} + 2 + {job seekers allowance} + 2 + {modern apprenticeships} + 2 + {retirement} + 2 + {self employed} + 2 + {training} + 2 + {unemployment} + 2 + {vacancies} + 2 + {voluntary work} + 2 + {work experience} + 2 + {young people} + 1 + {leisure} + 2 + {accommodation} + 3 + {bed and breakfast} + 3 + {hotels} + 2 + {allotments} + 2 + {archives} + 3 + {diocesan records} + 2 + {arts} + 3 + {galleries} + 3 + {development} + 2 + {beaches} + 2 + {boats} + 2 + {bowls} + 2 + {camp sites} + 2 + {castles} + 2 + {children's activities} + 2 + {cinemas} + 2 + {cicuses} + 2 + {clubs and societies} + 2 + {coaching} + 2 + {ccountryside} + 3 + {country parks} + 3 + {countryside management} + 3 + {countryside and nature conservation} + 2 + {crafts} + 2 + {cycle routes} + 2 + {dance} + 3 + {tea dances} + 2 + {drama} + 2 + {eating out} + 2 + {entertainment} + 2 + {events} + 2 + {fairs} + 2 + {fairgrounds} + 2 + {firework displays} + 2 + {fishing} + 3 + {fishing permits} + 2 + {gardens} + 3 + {gardening competitions} + 3 + {public gardens} + 2 + {golf courses} + 2 + {gyms} + 2 + {halls for hire} + 2 + {heritage} + 3 + {historic buildings} + 3 + {historic monuments} + 3 + {historical records} + 3 + {historic sites} + 2 + {horse riding} + 2 + {keep fit} + 2 + {leisure centres} + 2 + {libraries} + 3 + {branch libraries} + 3 + {mobile libraries} + 3 + {reference libraries} + 2 + {local history} + 2 + {museums} + 2 + {parks} + 3 + {arboriculture} + 3 + {open spaces} + 2 + {playgrounds} + 3 + {adventure playgrounds} + 3 + {fencing} + 2 + {picnic sites} + 2 + {ranger service} + 2 + {rivers} + 3 + {river moorings} + 2 + {swimming} + 2 + {sports pitches} + 3 + {cricket} + 3 + {football} + 3 + {hockey} + 2 + {sports} + 3 + {grants} + 2 + {theatres} + 2 + {tourism} + 3 + {accommodation} + 2 + {travel} + 2 + {village greens} + 2 + {walks} + 2 + {wildfire} + 2 + {woodlands} + 2 + {youth clubs} + 2 + {youth hostels} + 2 + {zoos} + 1 + {news} + 2 + {mailing lists} + 2 + {media} + 2 + {media enquries} + 2 + {newspapers} + 2 + {press enquries} + 2 + {press releases} + 2 + {publications} + 1 + {social care} + 2 + {abuse} + 3 + {alcohol} + 3 + {drugs} + 3 + {substance} + 2 + {access - disabled} + 2 + {adoption and fostering} + 2 + {alarms} + 3 + {elderly and disabled} + 2 + {anti - poverty} + 2 + {assessment of care needs} + 2 + {asylum seekers} + 2 + {behaviour suport service} + 2 + {bereavement} + 2 + {blindness and visual impairment} + 2 + {care needs} + 2 + {careline} + 2 + {childminders} + 2 + {children's homes} + 2 + {child protection} + 3 + {children at risk} + 3 + {children in need} + 2 + {choosing a residential home} + 2 + {community services} + 3 + {community care} + 2 + {day care} + 3 + {day care for elders} + 3 + {day centres} + 2 + {deaf services} + 2 + {dial-a-ride} + 2 + {disabilty} + 3 + {disability access} + 2 + {domestic violence} + 2 + {domiciliary care in the home} + 2 + {elderly people} + 2 + {family support} + 2 + {health} + 2 + {home care services} + 3 + {home help} + 2 + {holidays} + 2 + {hospital discharge} + 2 + {hostels} + 2 + {families} + 2 + {fostering} + 2 + {meals on wheels} + 2 + {mental health} + 2 + {orange badge scheme} + 2 + {parenting} + 2 + {refugees} + 2 + {residential accommodation} + 2 + {respite care} + 2 + {sensory impairment} + 2 + {shop mobility} + 2 + {visual impairment} + 2 + {warden call} + 2 + {welfare rights} + 2 + {winter fuel allowance} + 1 + {transport and streets} + 2 + {abandoned vehicles} + 2 + {abnormal loads} + 2 + {bridges} + 2 + {bridleways} + 2 + {concessionary rates} + 2 + {cycling} + 3 + {proficiency} + 2 + {dog fouling} + 2 + {foot bridges} + 2 + {footpaths} + 2 + {garages} + 2 + {grass verges} + 2 + {gritting} + 2 + {gully cleansing} + 2 + {HGV management and signing} + 2 + {highways} + 2 + {icy roads} + 2 + {leaves} + 2 + {litter} + 2 + {local tansport links} + 2 + {manhole covers} + 2 + {mini cabs} + 2 + {MOT} + 2 + {motorcycle training} + 2 + {park and ride} + 2 + {parking} + 3 + {car parking badges} + 3 + {car parks} + 3 + {controlled parking zones} + 3 + {parking bays} + 3 + {parking fines} + 3 + {parking meters} + 3 + {residents parking} + 2 + {pavements} + 2 + {pedestrian / pelican crossings} + 2 + {potholes} + 2 + {public conveniences} + 2 + {public transport} + 3 + {buses} + 4 + {bus lanes} + 4 + {bus passes} + 4 + {bus shelters} + 3 + {trains} + 3 + {trams} + 2 + {public rights of way} + 3 + {adopted highways} + 3 + {adopted roads} + 2 + {public weighbridge} + 2 + {roads} + 3 + {building} + 3 + {cleaning} + 3 + {maintenance} + 3 + {road works} + 3 + {safety} + 3 + {signs} + 3 + {unadopted} + 2 + {snow clearance} + 2 + {speed limits} + 2 + {street lighting} + 2 + {taxi ranks} + 2 + {traffic calming} + 2 + {traffic lights} + 2 + {traffic management} + 2 + {transport planning} + 2 + {travel enquiries} + 2 + {weighbridges} + 2 + {zebra crossings} +} + + +set tree_id [category_tree::add -name Categories -description "CoP Categories" -context_id [subsite::main_site_id]] + +set parent(1) {} + +foreach {cat key} $cats { + set parent([expr $cat + 1]) [category::add -name $key -description $key -tree_id $tree_id -parent_id $parent($cat)] +} Index: openacs-4/contrib/packages/cop-ui/www/categories/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/www/categories/index.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-ui/www/categories/index.adp 31 Mar 2004 21:12:17 -0000 1.1 @@ -0,0 +1 @@ +Category browsing. Index: openacs-4/contrib/packages/cop-ui/www/categories/map.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/www/categories/map.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/cop-ui/www/categories/map.tcl 28 Mar 2004 21:17:10 -0000 1.1 +++ openacs-4/contrib/packages/cop-ui/www/categories/map.tcl 31 Mar 2004 21:12:17 -0000 1.2 @@ -21,3 +21,5 @@ -object_id $object_id \ $category_ids } + +ad_returnredirect [get_referrer] Index: openacs-4/contrib/packages/cop-ui/www/categories/new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/www/categories/new.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-ui/www/categories/new.tcl 31 Mar 2004 21:12:17 -0000 1.1 @@ -0,0 +1,28 @@ +# /packages/cop-ui/www/clipboard/view.tcl +ad_page_contract { + Create the category tree associated with the subsite containing this cop instance. + + @author Jeff Davis (davis@xarg.net) + @creation-date 2004-03-28 + + @cvs-id $Id: new.tcl,v 1.1 2004/03/31 21:12:17 jeffd Exp $ +} { +} + +set tree_id [category_tree::add -name Categories -description "CoP Categories" -context_id [ad_conn subsite_id]] + +set out "tree $tree_id" + +category_tree::map -tree_id $tree_id -object_id [ad_conn subsite_id] + +foreach {cat desc} { + KM {Knowledge management} + CM {Content management} + Workflow {Workflow} + Incentives {Incentives for participation in a CoP} +} { + append out " cat [category::add -name $cat -description $desc -tree_id $tree_id -parent_id {}]" +} + +ns_return 200 text/plain $out + Index: openacs-4/contrib/packages/cop-ui/www/resources/cop-master.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/cop-ui/www/resources/cop-master.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/cop-ui/www/resources/cop-master.css 31 Mar 2004 21:12:18 -0000 1.1 @@ -0,0 +1,9 @@ +body { + font: verdana, arial, sans; + background-color: #f0f0fc; +} + +#subsite-name { + padding: 10px 0 0 10px; + font-size: 1.25em; +}