Index: openacs-4/packages/acs-subsite/lib/subsites.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/subsites.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-subsite/lib/subsites.adp 22 Sep 2003 08:40:04 -0000 1.1 @@ -0,0 +1,10 @@ + +

+
+ +

There are no @pretty_plural@ here.

+
+ + +

» Create new @pretty_name@

+
Index: openacs-4/packages/acs-subsite/lib/subsites.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/lib/subsites.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-subsite/lib/subsites.tcl 22 Sep 2003 08:40:04 -0000 1.1 @@ -0,0 +1,50 @@ +if { [string equal [ad_conn package_url] "/"] } { + set pretty_name "community" + set pretty_plural "communities" +} else { + set pretty_name "subcommunity" + set pretty_plural "subcommunities" +} + +set user_id [ad_conn user_id] + +set admin_p [permission::permission_p -object_id [ad_conn package_id] -privilege admin] +if { $admin_p } { + set add_url "[subsite::get_element -element url]admin/subsite-add" +} + + +# Get the subsite node ID +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) + +multirow create subsites node_id name package_id instance_name read_p + +foreach url [site_node::get_children -package_type apm_service -node_id $subsite_node_id] { + array unset node + array set node [site_node::get_from_url -url $url -exact] + + if { [string equal $node(package_key) "acs-subsite"] } { + multirow append subsites \ + $node(node_id) \ + $node(name) \ + $node(object_id) \ + $node(instance_name) \ + [permission::permission_p -object_id $node(object_id) -privilege read] + } +} + +list::create \ + -name subsites \ + -multirow subsites \ + -key node_id \ + -elements { + instance_name { + label "Name" + link_url_eval {$name/} + } + } + + + Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 19 Sep 2003 16:13:25 -0000 1.10 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 22 Sep 2003 08:40:04 -0000 1.11 @@ -526,29 +526,26 @@ label "Home" url "" } - lappend subsections members { - label "Members" - folder "members" - selected_patterns {*} - } - lappend subsections groups [list \ - label [ad_decode [ad_conn package_url] "/" "Communities" "Subcommunities"] \ - url "subsites"] - - set home { + + set pageflow [list] + lappend pageflow home { label "Home" folder "" url "" selected_patterns { "" "subsites" - "members/*" } } - lappend home subsections $subsections - set pageflow [list home $home] + lappend pageflow members { + label "Members" + folder "members" + selected_patterns {*} + } + + set subsite_url [subsite::get_element -element url] array set subsite_sitenode [site_node::get -url $subsite_url] set subsite_node_id $subsite_sitenode(node_id) Index: openacs-4/packages/acs-subsite/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/index.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-subsite/www/index.adp 22 Sep 2003 08:21:50 -0000 1.9 +++ openacs-4/packages/acs-subsite/www/index.adp 22 Sep 2003 08:40:04 -0000 1.10 @@ -1,37 +1,50 @@ -@subsite_name;noquote@ @context;noquote@ - - - Leave group - - - - - Join group - - - Request membership - + +
+ + Leave group - + + + + Join group + + + Request membership + + + +
-
    - -
  • (no packages)
  • -
    - - -
  • @nodes.name@
  • -
    -
    + + + + + +
    +

    Applications

    + + +

    +

  • @subsite_name@ Administration
  • +

    +
    + +
    +

    @communities_label@

    + +
    + Index: openacs-4/packages/acs-subsite/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/index.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-subsite/www/index.tcl 22 Sep 2003 08:21:50 -0000 1.10 +++ openacs-4/packages/acs-subsite/www/index.tcl 22 Sep 2003 08:40:04 -0000 1.11 @@ -50,4 +50,8 @@ set group_member_p [group::member_p -group_id $group_id -user_id $user_id] set group_admin_p [group::admin_p -group_id $group_id -user_id $user_id] +set main_site_p [string equal [ad_conn package_url] "/"] + set can_join_p [expr !$group_admin_p && $group_member_p == 0 && $user_id != 0 && ![string equal $group_join_policy "closed"]] + +set communities_label [ad_decode $main_site_p 1 "Communities" "Subcommunities"] Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-subsite/www/subsites-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-subsite/www/subsites-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-subsite/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/index.adp,v diff -u -r1.16 -r1.17 --- openacs-4/packages/acs-subsite/www/admin/index.adp 19 Sep 2003 13:58:03 -0000 1.16 +++ openacs-4/packages/acs-subsite/www/admin/index.adp 22 Sep 2003 08:40:04 -0000 1.17 @@ -1,8 +1,7 @@ @context;noquote@ -@subsite_name;noquote@ Administration -

    @subsite_name@ Administration

    +

    @subsite_name@ Administration