Index: openacs-4/packages/dotlrn/www/manage-memberships.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/manage-memberships.adp,v diff -u -r1.25 -r1.26 --- openacs-4/packages/dotlrn/www/manage-memberships.adp 29 Apr 2004 15:39:13 -0000 1.25 +++ openacs-4/packages/dotlrn/www/manage-memberships.adp 22 Jul 2004 16:50:53 -0000 1.26 @@ -79,7 +79,10 @@ [ #dotlrn.Pending_Approval# ] - + + + + @@ -113,7 +116,10 @@ [ #dotlrn.Pending_Approval# ] - + + + + @@ -166,10 +172,10 @@ @non_member_classes.term_name@ @non_member_classes.term_year@   - + - + @@ -203,10 +209,10 @@     - + - + Index: openacs-4/packages/dotlrn/www/manage-memberships.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/manage-memberships.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn/www/manage-memberships.tcl 22 Jul 2004 16:45:01 -0000 1.10 +++ openacs-4/packages/dotlrn/www/manage-memberships.tcl 22 Jul 2004 16:47:57 -0000 1.11 @@ -1,5 +1,5 @@ # -# Copyright (C) 2001, 2002 OpenForce, Inc. +# Copyright (C) 2001, 2002 MIT # # This file is part of dotLRN. # @@ -14,6 +14,22 @@ # details. # +# +# Copyright (C) 2001, 2002 MIT +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + # dotlrn/www/manage-memberships.tcl ad_page_contract { @@ -30,6 +46,15 @@ set user_id [ad_conn user_id] +set show_drop_button_p [parameter::get_from_package_key \ + -package_key dotlrn-portlet \ + -parameter AllowMembersDropGroups] + +if {![dotlrn::user_can_browse_p]} { + ad_returnredirect "not-allowed" + ad_script_abort +} + set departments [db_list_of_lists select_departments_for_select_widget { select dotlrn_departments_full.pretty_name, dotlrn_departments_full.department_key @@ -51,29 +76,29 @@ form create member_form element create member_form member_department_key \ - -label "Department" \ + -label "[_ dotlrn.Department]" \ -datatype text \ -widget select \ -options $departments \ -html {onChange document.member_form.submit()} \ -value $member_department_key element create member_form member_term_id \ - -label "Term" \ + -label "[_ dotlrn.Term]" \ -datatype integer \ -widget select \ -options $terms \ -html {onChange document.member_form.submit()} \ -value $member_term_id element create member_form non_member_department_key \ - -label "Department" \ + -label "[_ dotlrn.Department]" \ -datatype text \ -widget hidden \ -value $non_member_department_key element create member_form non_member_term_id \ - -label "Term" \ + -label "[_ dotlrn.Term]" \ -datatype text \ -widget hidden \ -value $non_member_term_id @@ -95,35 +120,41 @@ } set n_member_classes [db_string select_n_member_classes {}] -db_multirow member_classes $member_query {} -db_multirow member_clubs select_member_clubs {} +db_multirow member_classes $member_query {} { + set role [template::util::nvl [dotlrn_community::get_role_pretty_name -community_id $class_instance_id -rel_type $rel_type] [_ dotlrn.student_role_pretty_name]] +} + +db_multirow member_clubs select_member_clubs {} { + set role [dotlrn_community::get_role_pretty_name -community_id $club_id -rel_type $rel_type] +} + form create non_member_form element create non_member_form non_member_department_key \ - -label "Department" \ + -label "[_ dotlrn.Department]" \ -datatype text \ -widget select \ -options $departments \ -html {onChange document.non_member_form.submit()} \ -value $non_member_department_key element create non_member_form non_member_term_id \ - -label "Term" \ + -label "[_ dotlrn.Term]" \ -datatype integer \ -widget select \ -options $terms \ -html {onChange document.non_member_form.submit()} \ -value $non_member_term_id element create non_member_form member_department_key \ - -label "Department" \ + -label "[_ dotlrn.Department]" \ -datatype text \ -widget hidden \ -value $member_department_key element create non_member_form member_term_id \ - -label "Term" \ + -label "[_ dotlrn.Term]" \ -datatype text \ -widget hidden \ -value $member_term_id @@ -148,6 +179,11 @@ db_multirow non_member_classes $non_member_query {} db_multirow non_member_clubs select_non_member_clubs {} -set referer [ns_urlencode "/dotlrn/manage-memberships?[export_vars {member_department_key member_term_id non_member_department_key non_member_term_id}]"] +set referer [ns_urlencode "[ns_conn url]?[export_vars {member_department_key member_term_id non_member_department_key non_member_term_id}]"] +# en_US messages make use of these configurable pretty names +set clubs_pretty_plural [parameter::get -localize -parameter clubs_pretty_plural] +set class_instances_pretty_name [parameter::get -localize -parameter class_instances_pretty_name] +set clubs_pretty_name [parameter::get -localize -parameter clubs_pretty_name] + ad_return_template