Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.de_DE.ISO-8859-1.xml,v diff -u -r1.23 -r1.23.2.1 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.de_DE.ISO-8859-1.xml 14 Mar 2005 00:41:34 -0000 1.23 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.de_DE.ISO-8859-1.xml 2 Aug 2005 18:16:44 -0000 1.23.2.1 @@ -1,5 +1,5 @@ - + oder Die Allgemeinen Informationen aktualisieren @@ -14,8 +14,14 @@ Ihr Benutzerkonto wurde wieder aktiviert. Willkommen bei %system_name%. Benutzerkonto wieder aktiviert Aktion + Hinzuf�gen + Ordner hinzuf�gen Neue Anwendung hinzuf�gen + Diesen User hinzuf�gen + User hinzuf�gen + User hinzuf�gen Verwalten + Admin %subsite_name% verwalten Verwaltungsoptionen f�r diesen Benutzer Art der Benachrichtigung @@ -34,6 +40,7 @@ Passwort zur�cksetzen durch lokale Authentifizierungsstelle nicht unterst�tzt Liste der Teilnehmer verborgen Sprache einstellen + �nderung meines e-Mail Privacy Levels Passwort �ndern Passwort, E-Mail-Adresse oder Bild �ndern �berp�fen Sie Ihr Postfach @@ -51,6 +58,7 @@ Fortsetzen Weiter nach %pvt_home_name% Land + Erstellen Neue %pretty_name% erstellen Neue Subsite erstellen Aktuelles Passwort: @@ -60,6 +68,7 @@ Datenbankfehler Standardkontext L�schen + l�schen Administration (Entwickler) Administration auf Entwicklerebene Explizite Berechtigungen @@ -70,9 +79,13 @@ Kommentar bearbeiten Einige Elemente k�nnen nicht bearbeitet werden, da sie von %authority_name% verwaltet werden. E-Mail-Adresse + Zulassen, mich �ber ein Formular anzusprechen + Meine e-Mail als Bild anzeigen + Meine e-Mail als Text anzeigen Hier sind Ihre neuen Anmeldedaten: %account_id_label%: %account_id% %password_label%: %password%. Bitte �ndern Sie Ihr Passwort unter folgendem Link: %reset_password_url% Vielen Dank f�r Ihre Registrierung bei %system_name%. Mit folgenden Daten k�nnen Sie sich bei %system_url% anmelden: %account_id_label%: %account_id% %password_label%: %password% Bitte �ndern Sie Ihr Passwort unter folgendem Link: %reset_password_url% E-Mail-Adresse best�tigen: + Meine e-Mail nicht anzeigen E-Mail nicht angefordert Email-Adresse muss angegeben werden Ihr vergessenes Passwort f�r %system_name% @@ -102,6 +115,7 @@ Homepage Wenn Sie sich anmelden Die Information wurde aktualisiert. + Sprachen installieren Einladen ISO-Code Liste der ISO-Codes @@ -130,6 +144,7 @@ Abmelden Von %system_name% abmelden , werden Ihnen mehr Informationen �ber andere Teilnehmer Ihrer Gruppe angezeigt. + Markierte User zu den Usern hinzuf�gen, die Zugriffsrechte auf das Objekt haben. Diese Gruppe kann nicht hinzugef�gt werden. Vollst�ndige Liste der ISO-Codes Weiterarbeiten mit %system_name% @@ -143,6 +158,8 @@ Wenn die Person noch kein Benutzerkonto hat: Wenn die Person, die Sie einladen wollen, bereits ein Benutzerkonto auf diesem System hat: Wenn Sie diese Funktionalit�t nutzen wollen, laden Sie bitte acs-reference und ref-countries. + �bernehmen von $parent_object_name + Zugriffsberechtigungen von $parent_object_name �bernehmen Vererbte Berechtigungen Diese Option sollte nicht gew�hlt werden, wenn der Computer von mehreren Personen genutzt wird, etwa in einer Bibliothek oder einem universit�ren Rechenzentrum. Nachfolgende Benutzer k�nnen sonst unter Ihrer Identit�t auf den Dienst zugreifen. Neue Registrierung bei %system_url% @@ -220,6 +237,7 @@ Optionen oder einen neuen Benutzer hinzuf�gen oder das + parameter Passwort Das Passwort Ihres Benutzerkontos (%account_id_label%: %account_id%) bei %system_name% wurde k�rzlich ge�ndert. Es sind keine weiteren Schritte n�tig, diese Mitteilung dient lediglich Ihrer Sicherheit. --------------- Sie k�nnen Ihr Passwort jederzeit mit folgenden Schritten �ndern: 1. Melden Sie sich bei %system_name% an. 2. Klicken Sie auf den Link '%pvt_home_name%'. 3. W�hlen Sie die Option '%password_update_link_text%'. Passwort ge�ndert @@ -233,6 +251,7 @@ Profil Frage: Aktivieren + Lesen Passwort zur�cksetzen Anmeldung aktualisieren Registrieren @@ -241,6 +260,7 @@ Anmeldedaten auf diesem Computer speichern Entfernen Alle Entfernen + Umbenennen Zugang zu dieser Gruppe beantragen Mitgliedschaft f�r diese Subsite beantragen Zugang beantragen @@ -255,6 +275,7 @@ W�hlen Sie mit Hilfe der ID ein Objekt aus: E-Mail an diesen Benutzer senden Anzeigen + System Administration Systemadministration Das Passwort kann nicht zur�ckgesetzt werden. Status @@ -276,6 +297,7 @@ Thema Typspezifische Informationen: Email-Adresse unbekannt + abh�ngen Eine Ebene nach oben Eine Ebene h�her zu "%context_name%" Aktualisieren @@ -293,6 +315,7 @@ Bereits erteilte Berechtigungen, die Sie hier nicht ausw�hlen, werden aufgehoben. Benutzer, die derzeit online sind Wer ist online? + Schreiben Ja, l�schen Sie geh�ren folgenden Gruppen an: Weitere M�glichkeiten f�r die Navigation sind der Index: openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml,v diff -u -r1.67.2.4 -r1.67.2.5 --- openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml 31 Jul 2005 08:15:20 -0000 1.67.2.4 +++ openacs-4/packages/acs-subsite/catalog/acs-subsite.en_US.ISO-8859-1.xml 2 Aug 2005 18:16:44 -0000 1.67.2.5 @@ -332,8 +332,8 @@ Options Or add a new user or the - parameters Parameters + parameters Password Your login information on %system_name%: Index: openacs-4/packages/acs-subsite/tcl/rel-types-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/rel-types-procs-oracle.xql,v diff -u -r1.2 -r1.2.14.1 --- openacs-4/packages/acs-subsite/tcl/rel-types-procs-oracle.xql 20 Aug 2001 05:15:28 -0000 1.2 +++ openacs-4/packages/acs-subsite/tcl/rel-types-procs-oracle.xql 2 Aug 2005 18:16:44 -0000 1.2.14.1 @@ -45,5 +45,12 @@ end; + + + +begin acs_rel_type.create_role(:role, :pretty_name, :pretty_plural); +end; + + Index: openacs-4/packages/acs-subsite/tcl/rel-types-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/rel-types-procs-postgresql.xql,v diff -u -r1.6 -r1.6.8.1 --- openacs-4/packages/acs-subsite/tcl/rel-types-procs-postgresql.xql 23 Sep 2003 17:33:22 -0000 1.6 +++ openacs-4/packages/acs-subsite/tcl/rel-types-procs-postgresql.xql 2 Aug 2005 18:16:44 -0000 1.6.8.1 @@ -70,4 +70,11 @@ + + + select acs_rel_type__create_role(:role, :pretty_name, :pretty_plural) + + + + Index: openacs-4/packages/acs-subsite/tcl/rel-types-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/rel-types-procs.tcl,v diff -u -r1.6 -r1.6.8.1 --- openacs-4/packages/acs-subsite/tcl/rel-types-procs.tcl 25 Sep 2003 17:25:08 -0000 1.6 +++ openacs-4/packages/acs-subsite/tcl/rel-types-procs.tcl 2 Aug 2005 18:16:44 -0000 1.6.8.1 @@ -7,38 +7,33 @@ @author mbryzek@arsdigita.com @creation-date Tue Dec 12 15:40:39 2000 @cvs-id $Id$ - } - -ad_page_contract_filter rel_type_dynamic_p { name value } { +ad_page_contract_filter rel_type_dynamic_p {name value} { Checks whether the value (assumed to be a string referring to a - relationship type) is a dynamic object type. + relationship type) is a dynamic object type. @author Michael Bryzek (mbryzek@arsdigita.com) @creation-date 12/30/2000 - } { - if { [db_string rel_type_dynamic_p { - select case when exists (select 1 - from acs_object_types t - where t.dynamic_p = 't' - and t.object_type = :value) - then 1 else 0 end - from dual - }] } { + if {[db_string rel_type_dynamic_p { + select case when exists (select 1 + from acs_object_types t + where t.dynamic_p = 't' + and t.object_type = :value) + then 1 else 0 end + from dual}]} { return 1 } ad_complain "Specific rel type either does not exist or is not dynamic and thus cannot be modified" return 0 } - namespace eval rel_types { - ad_proc -public additional_rel_types_p { - { -group_id "" } - { -group_type "" } + ad_proc -public additional_rel_types_p { + {-group_id "" } + {-group_type "" } } { Returns 1 if there is a relationship type not being used by the specified group_id or group_type. Useful for deciding when @@ -47,27 +42,27 @@ @author Michael Bryzek (mbryzek@arsdigita.com) @creation-date 12/2000 - } { - if { ![empty_string_p $group_id] } { + if {![empty_string_p $group_id]} { return [additional_rel_types_group_p $group_id] - } elseif { ![empty_string_p $group_type] } { + } elseif {![empty_string_p $group_type]} { return [additional_rel_types_group_type_p $group_type] } else { error "rel_types::rel_types_p error: One of group_id or group_type must be specified" } } - ad_proc -private additional_rel_types_group_p { group_id } { + ad_proc -private additional_rel_types_group_p { + group_id + } { returns 1 if there is a rel type that is not defined as a segment for this group @author Michael Bryzek (mbryzek@arsdigita.com) @creation-date 12/30/2000 - } { return [db_string "group_rel_type_exists" " - select case when exists (select 1 + select case when exists (select 1 from acs_object_types t where t.object_type not in (select g.rel_type from group_rels g @@ -78,17 +73,17 @@ from dual"] } - - ad_proc -private additional_rel_types_group_type_p { group_type } { + ad_proc -private additional_rel_types_group_type_p { + group_type + } { returns 1 if there is a rel type that is not defined as allowable for the specified group_type. @author Michael Bryzek (mbryzek@arsdigita.com) @creation-date 12/30/2000 - } { return [db_string "group_rel_type_exists" " - select case when exists (select 1 + select case when exists (select 1 from acs_object_types t where t.object_type not in (select g.rel_type from group_type_rels g @@ -99,89 +94,121 @@ from dual"] } - ad_proc -public new { - { -supertype "relationship" } - { -role_one "" } - { -role_two "" } - rel_type - pretty_name - pretty_plural - object_type_one - min_n_rels_one - max_n_rels_one - object_type_two - min_n_rels_two + {-supertype "relationship" } + {-role_one "" } + {-role_two "" } + {-table_name ""} + {-create_table_p "t"} + rel_type + pretty_name + pretty_plural + object_type_one + min_n_rels_one + max_n_rels_one + object_type_two + min_n_rels_two max_n_rels_two } { Creates a new relationship type named rel_type - + @author Michael Bryzek (mbryzek@arsdigita.com) @creation-date 12/30/2000 - } { - - # use 29 chars to leave 1 character in the name for later dynamic views - set rel_type [plsql_utility::generate_oracle_name -max_length 29 $rel_type] - if { [plsql_utility::object_type_exists_p $rel_type] } { + + # use 29 chars to leave 1 character in the name for later dynamic + # views + + set rel_type [plsql_utility::generate_oracle_name \ + -max_length 29 $rel_type] + if {[plsql_utility::object_type_exists_p $rel_type]} { error "Specified relationship type, $rel_type, already exists (or another object of the same type exists)\n" } - - if { ![db_0or1row parent_rel_type { + + if {![db_0or1row parent_rel_type { select table_name as references_table, - id_column as references_column - from acs_object_types - where object_type=:supertype - }] } { + id_column as references_column + from acs_object_types + where object_type=:supertype}]} { error "The specified supertype \"$supertype\" does not exist" } - # use 29 chars to leave 1 character in the name for later dynamic views - set table_name [plsql_utility::generate_oracle_name -max_length 29 "${rel_type}_ext"] + # use 29 chars to leave 1 character in the name for later dynamic + # views + + if {[empty_string_p $table_name]} { + set table_name [plsql_utility::generate_oracle_name \ + -max_length 29 "${rel_type}_ext"] + } set package_name $rel_type # We use rel_id for the primary key... since this is a relationship + set pk_constraint_name [plsql_utility::generate_constraint_name $table_name rel_id "pk"] set fk_constraint_name [plsql_utility::generate_constraint_name $table_name rel_id "fk"] - + set plsql [list] # Create the actual acs object type + lappend plsql_drop [list db_exec_plsql drop_type {FOO}] lappend plsql [list db_exec_plsql create_type {FOO}] - + # Mark the type as dynamic + lappend plsql [list db_dml update_type {FOO}] - foreach pair $plsql { + # Force internationalisation of Roles + + # Internationalising of Attributes. This is done by storing the + # attribute with it's acs-lang key + + set message_key "rel_type_${rel_type}" + + # Register the language keys + + lang::message::register en_US acs-translations $message_key $pretty_name + lang::message::register en_US acs-translations "${message_key}_plural" $pretty_plural + + # Replace the pretty_name and pretty_plural with the message key, so + # it is inserted correctly in the database + + set pretty_name "#acs-translations.${message_key}#" + set pretty_plural "#acs-translations.${message_key}_plural#" + + foreach pair $plsql { eval [lindex $pair 0] [lindex $pair 1] [lindex $pair 2] } - # The following create table statement commits the - # transaction. If it fails, we roll back what we've done + # The following create table statement commits the transaction. If it + # fails, we roll back what we've done - if { [catch {db_exec_plsql create_table " - create table $table_name ( - rel_id constraint $fk_constraint_name + if {$create_table_p == "t"} { + if {[catch {db_exec_plsql create_table " + create table $table_name ( + rel_id constraint $fk_constraint_name references $references_table ($references_column) constraint $pk_constraint_name primary key - )"} errmsg] } { - # Roll back our work so for - for { set i [expr [llength $plsql_drop] - 1] } { $i >= 0 } { incr i -1 } { - set drop_pair [lindex $plsql_drop $i] - if { [catch {eval [lindex $drop_pair 0] [lindex $drop_pair 1] [lindex $drop_pair 2]} err_msg_2] } { - append errmsg "\nAdditional error while trying to roll back: $err_msg_2" - return -code error $errmsg + )"} errmsg]} { + + # Roll back our work so for + + for {set i [expr [llength $plsql_drop] - 1]} {$i >= 0} {incr i -1} { + set drop_pair [lindex $plsql_drop $i] + if {[catch {eval [lindex $drop_pair 0] [lindex $drop_pair 1] [lindex $drop_pair 2]} err_msg_2]} { + append errmsg "\nAdditional error while trying to roll back: $err_msg_2" + return -code error $errmsg + } } + return -code error $errmsg } - return -code error $errmsg - } + } - # Finally, create the PL/SQL package. + # Finally, create the PL/SQL package. + package_recreate_hierarchy $rel_type return $rel_type - } ad_proc -public add_permissible { @@ -207,6 +234,59 @@ } errmsg]} { } } - + + ad_proc -public create_role { + {-pretty_name:required} + {-pretty_plural:required} + {-role} + } { + + Create a new Relationship Role + + @author Malte Sussdorff (sussdorff@sussdorff.de) + @creation-date 2005-06-04 + + @param pretty_name + + @param pretty_plural + + @param role + + @return 1 if successful + } { + if {![exists_and_not_null role]} { + set role [util_text_to_url \ + -text $pretty_name \ + -replacement "_" \ + -existing_urls [db_list get_roles {}]] + } + + set return_code 1 + + db_transaction { + + # Force internationalisation of Roles + + # Internationalising of Attributes. This is done by storing the + # attribute with it's acs-lang key + + set message_key "role_${role}" + + # Register the language keys + + lang::message::register en_US acs-translations $message_key $pretty_name + lang::message::register en_US acs-translations "${message_key}_plural" $pretty_plural + + # Replace the pretty_name and pretty_plural with the message key, so + # it is inserted correctly in the database + + set pretty_name "#acs-translations.${message_key}#" + set pretty_plural "#acs-translations.${message_key}_plural#" + db_exec_plsql create_role {} + } on_error { + set return_code 0 + } + return $return_code + } } Index: openacs-4/packages/acs-subsite/tcl/rel-types-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/rel-types-procs.xql,v diff -u -r1.3 -r1.3.14.1 --- openacs-4/packages/acs-subsite/tcl/rel-types-procs.xql 20 Aug 2001 21:52:31 -0000 1.3 +++ openacs-4/packages/acs-subsite/tcl/rel-types-procs.xql 2 Aug 2005 18:16:44 -0000 1.3.14.1 @@ -34,5 +34,11 @@ and rel_type= :rel_type + + + +select role from acs_rel_roles + + Index: openacs-4/packages/acs-subsite/www/permissions/perm-user-add-include.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/perm-user-add-include.tcl,v diff -u -r1.5 -r1.5.6.1 --- openacs-4/packages/acs-subsite/www/permissions/perm-user-add-include.tcl 11 Dec 2003 21:39:56 -0000 1.5 +++ openacs-4/packages/acs-subsite/www/permissions/perm-user-add-include.tcl 2 Aug 2005 18:16:44 -0000 1.5.6.1 @@ -24,24 +24,24 @@ -key user_id \ -page_size 20 \ -page_query_name users_who_dont_have_any_permissions_paginator \ - -no_data "There are no users who don't already have access to this object" \ + -no_data "[_ acs-subsite.lt_There_are_no_users_wh]" \ -bulk_action_export_vars { return_url object_id } \ -bulk_actions [list \ - "Add users" "${perm_url}perm-user-add-2" "Add checked users to users who have permissions on your object." \ + "[_ acs-subsite.Add_users]" "${perm_url}perm-user-add-2" "[_ acs-subsite.lt_Add_checked_users_to_]" \ ] \ -elements { name { - label "Name" + label "[_ acs-subsite.Name]" } email { - label "Email" + label "[_ acs-subsite.Email]" link_url_eval {mailto:$email} } add { - label "Add" + label "[_ acs-subsite.Add]" link_url_col add_url - link_html { title "Add this user" } - display_template "Add" + link_html { title "[_ acs-subsite.Add_this_user]" } + display_template "[_ acs-subsite.Add]" } } -filters { object_id {} Index: openacs-4/packages/acs-subsite/www/permissions/perm-user-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/perm-user-add.tcl,v diff -u -r1.2 -r1.2.8.1 --- openacs-4/packages/acs-subsite/www/permissions/perm-user-add.tcl 28 Aug 2003 09:41:41 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/permissions/perm-user-add.tcl 2 Aug 2005 18:16:44 -0000 1.2.8.1 @@ -4,6 +4,6 @@ return_url } -set context [list [list $return_url "Permissions"] "Add User"] -set title "Add User" +set context [list [list $return_url "Permissions"] "[_ acs-subsite.Add_User]"] +set title "[_ acs-subsite.Add_User]"