Index: openacs-4/packages/dotlrn/www/members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members.tcl,v diff -u -r1.27.2.1 -r1.27.2.2 --- openacs-4/packages/dotlrn/www/members.tcl 3 Apr 2008 20:28:21 -0000 1.27.2.1 +++ openacs-4/packages/dotlrn/www/members.tcl 19 Aug 2008 11:55:31 -0000 1.27.2.2 @@ -66,10 +66,10 @@ } set bio_attribute_id [db_string bio_attribute_id { - select attribute_id - from acs_attributes - where object_type = 'person' - and attribute_name = 'bio' + select attribute_id + from acs_attributes + where object_type = 'person' + and attribute_name = 'bio' }] # Actions for Removing Members according to their role @@ -84,70 +84,70 @@ set bulk_actions_export_vars [list "user_id" "referer" "reset"] set actions [list "CSV" "members?csv=yes" "[_ dotlrn.Comma_Separated_Values]"] foreach role $rel_types { - # lappend actions "[_ dotlrn.Remove_all] [lang::util::localize [lindex $role 3]]" "members?reset=1&reltype=[lindex $role 0]" "[lang::util::localize [lindex $role 2]]" - lappend actions "[_ dotlrn.Remove_all] [lang::util::localize [lindex $role 3]]" "member-confirm?reset=1&reltype=[lindex $role 0]" "[lang::util::localize [lindex $role 2]]" + # lappend actions "[_ dotlrn.Remove_all] [lang::util::localize [lindex $role 3]]" "members?reset=1&reltype=[lindex $role 0]" "[lang::util::localize [lindex $role 2]]" + lappend actions "[_ dotlrn.Remove_all] [lang::util::localize [lindex $role 3]]" "member-confirm?reset=1&reltype=[lindex $role 0]" "[lang::util::localize [lindex $role 2]]" } } # Set the elements list set elm_list { - portrait { - label "" - html "align right" - display_template { - - - #acs-subsite.Profile# - - - -
Update bio -
+ portrait { + label "" + html "align right" + display_template { + + + #acs-subsite.Profile# + + + +
Update bio +
- } - } last_name { - label "[_ acs-subsite.Last_name]" - html "align left" - display_template { - @members.last_name;noquote@ - } - } first_names { - label "[_ acs-subsite.First_names]" - html "align left" - display_template { - @members.first_names@ - } - } email { - label "[_ dotlrn.Email_1]" - html "align left" - display_template {@members.email;noquote@} - } role { - label "[_ dotlrn.Role]" - html "align left" - } + } + } last_name { + label "[_ acs-subsite.Last_name]" + html "align left" + display_template { + @members.last_name;noquote@ + } + } first_names { + label "[_ acs-subsite.First_names]" + html "align left" + display_template { + @members.first_names@ + } + } email { + label "[_ dotlrn.Email_1]" + html "align left" + display_template {@members.email;noquote@} + } role { + label "[_ dotlrn.Role]" + html "align left" + } } if {$admin_p} { lappend elm_list {action} { - label "[_ dotlrn.Actions]" - html "align left" - display_template { - - #dotlrn.Drop_Membership# | - #dotlrn.User_Admin_Page# - - } - } + label "[_ dotlrn.Actions]" + html "align left" + display_template { + + #dotlrn.Drop_Membership# | + #dotlrn.User_Admin_Page# + + } + } } # Build the list-builder list template::list::create -name members -multirow members -key user_id -actions $actions -bulk_actions $bulk_actions -bulk_action_export_vars $bulk_actions_export_vars -elements $elm_list -orderby { - last_name {orderby last_name} - first_names {orderby first_names} - email {orderby email} - role {orderby role} + last_name {orderby last_name} + first_names {orderby first_names} + email {orderby email} + role {orderby role} } -selected_format csv -formats { - csv { output csv } + csv { output csv } } set orderby [template::list::orderby_clause -name "members" -orderby] @@ -192,44 +192,44 @@ if {$admin_p} { if { [template::multirow size pending_users] > 0 } { - set pend_actions [list "[_ dotlrn.Approve_all]" "approve?${user_ids}referer=$referer" "[_ dotlrn.Approve_all]" \ - "[_ dotlrn.Reject_all]" "reject?${user_ids}referer=$referer" "[_ dotlrn.Reject_all]"] + set pend_actions [list "[_ dotlrn.Approve_all]" "approve?${user_ids}referer=$referer" "[_ dotlrn.Approve_all]" \ + "[_ dotlrn.Reject_all]" "reject?${user_ids}referer=$referer" "[_ dotlrn.Reject_all]"] } else { - set pend_actions "" + set pend_actions "" } } else { set pend_actions "" } template::list::create -name pending_users -multirow pending_users -key user_id -actions $pend_actions -elements { last_name { - label "[_ acs-subsite.Last_name]" - html "align left" - display_template { - @pending_users.last_name;noquote@ - } + label "[_ acs-subsite.Last_name]" + html "align left" + display_template { + @pending_users.last_name;noquote@ + } } first_names { - label "[_ acs-subsite.First_names]" - html "align left" - display_template { - @pending_users.first_names@ - } + label "[_ acs-subsite.First_names]" + html "align left" + display_template { + @pending_users.first_names@ + } } email { - label "[_ dotlrn.Email_1]" - html "align left" - display_template { - @pending_users.email@ - } + label "[_ dotlrn.Email_1]" + html "align left" + display_template { + @pending_users.email@ + } } role { - label "[_ dotlrn.Role]" - html "align left" + label "[_ dotlrn.Role]" + html "align left" } action { - label "[_ dotlrn.Actions]" - html "align left" - display_template { - #dotlrn.Approve# | - #dotlrn.Reject# - } + label "[_ dotlrn.Actions]" + html "align left" + display_template { + #dotlrn.Approve# | + #dotlrn.Reject# + } } } @@ -247,29 +247,29 @@ } if {[form is_valid parent_users_form]} { - set user_ids_to_email [list] + set user_ids_to_email [list] foreach user $parent_user_list { set rel [element get_value parent_users_form "selected_user.[ns_set get $user user_id]"] if {![string match $rel none]} { dotlrn_community::add_user -rel_type $rel $community_id [ns_set get $user user_id] - lappend user_ids_to_email [ns_set get $user user_id] + lappend user_ids_to_email [ns_set get $user user_id] } } - if {[llength $user_ids_to_email]} { - set return_url [export_vars -base member-email-confirm {{user_id $user_ids_to_email} community_id}] - } else { - set return_url [ns_conn url] - } + if {[llength $user_ids_to_email]} { + set return_url [export_vars -base member-email-confirm {{user_id $user_ids_to_email} community_id}] + } else { + set return_url [ns_conn url] + } ad_returnredirect $return_url } } if {[exists_and_not_null reset] && [exists_and_not_null reltype]} { -set result "" + set result "" db_multirow reset_members select_members {} { - rp_form_put user_id $member_id + rp_form_put user_id $member_id } rp_form_put referer "one-community" rp_form_put community_id $community_id