Index: openacs-4/packages/glossar/catalog/glossar.de_DE.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/catalog/glossar.de_DE.ISO-8859-1.xml,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/glossar/catalog/glossar.de_DE.ISO-8859-1.xml 4 Jan 2006 08:09:35 -0000 1.6
+++ openacs-4/packages/glossar/catalog/glossar.de_DE.ISO-8859-1.xml 24 May 2006 06:12:31 -0000 1.7
@@ -20,7 +20,7 @@
Glossar Administration
Kommentar
Erstellt von
- Kommentar
+ Formalien
Nicht verwenden
Bearbeiten
Etat
@@ -50,13 +50,13 @@
Zielausdruck
Ausdruck hinzuf�gen
Aendern
- Alle Aenderungen
+ Alle �nderungen
Ausdruck Nr.
Titel
Glossare
Kategorieb�ume verkn�pfen
Neuer Glossar
- Neues Glossar
+ Neues Lektorats-Glossar
Neues �bersetzungsglossar
Keine Glossare vorhanden!
Umbenennen
Index: openacs-4/packages/glossar/lib/glossar-file-upload.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-file-upload.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/glossar/lib/glossar-file-upload.tcl 4 Jan 2006 08:09:37 -0000 1.4
+++ openacs-4/packages/glossar/lib/glossar-file-upload.tcl 24 May 2006 06:12:31 -0000 1.5
@@ -122,12 +122,12 @@
-elements {
file {
label "[_ glossar.File]"
- display_col title
+ display_col name
link_url_eval $file_url
}
rename {
label "[_ glossar.Rename]"
- display_template {
+ display_template {
}
}
type {
Index: openacs-4/packages/glossar/lib/glossar-list-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-list-postgresql.xql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/glossar/lib/glossar-list-postgresql.xql 4 Jan 2006 08:09:37 -0000 1.5
+++ openacs-4/packages/glossar/lib/glossar-list-postgresql.xql 24 May 2006 06:12:31 -0000 1.6
@@ -50,7 +50,8 @@
cr_items ci
where
ci.parent_id = :glossar_id
- and ci.content_type != 'gl_glossar_term'
+ and ci.content_type != 'gl_glossar_term'
+ and ci.live_revision is not null
Index: openacs-4/packages/glossar/lib/glossar-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-list.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/glossar/lib/glossar-list.tcl 4 Jan 2006 08:09:37 -0000 1.8
+++ openacs-4/packages/glossar/lib/glossar-list.tcl 24 May 2006 06:12:31 -0000 1.9
@@ -32,6 +32,7 @@
}
set user_id [ad_conn user_id]
+set contact_id $owner_id
if {[empty_string_p $user_id]} {
ad_redirect_for_registration
@@ -78,21 +79,21 @@
}
-set row_list [list checkbox {} title {} description {} source_category {} target_category {} glossar_edit {} glossar_files {}]
+set row_list [list checkbox {} title {} source_category {} target_category {} glossar_edit {} glossar_files {}]
set no_perm_p 0
set return_url [ad_conn url]
if [permission::permission_p -object_id $owner_id -privilege admin] {
-} elseif {[permission::permission_p -object_id $owner_id -privilege create]} {
+} elseif {[permission::permission_p -object_id $owner_id -privilege create] || [group::member_p -group_name Employees]} {
set user_perm create
} elseif {[permission::permission_p -object_id $owner_id -privilege read]} {
set actions ""
- set row_list [list title {} description {} source_category {} target_category {}]
+ set row_list [list title {} source_category {} target_category {}]
} else {
@@ -138,7 +139,7 @@
} -actions $actions -sub_class narrow \
-bulk_actions [list "[_ glossar.glossar_Move]" $move_url "[_ glossar.glossar_Move2]"] \
- -bulk_action_export_vars {return_url} \
+ -bulk_action_export_vars {return_url contact_id} \
-orderby {
default_value title
glossar_id {
@@ -156,6 +157,7 @@
} -orderby_name orderby \
-filters {
customer_id {}
+ contact_id {}
edit_link {}
} \
-page_size_variable_p 1 \
@@ -187,13 +189,11 @@
set files_count [db_string get_files_count { } -default 0]
set source_category "[category::get_name $source_category_id]"
set target_category "[category::get_name $target_category_id]"
- set title_url "[export_vars -base "${base_url}/glossar-term-list" {glossar_id}]"
- set edit_url "[export_vars -base "${base_url}/glossar-edit" {glossar_id}]"
+ set title_url "[export_vars -base "${base_url}/glossar-term-list" {glossar_id contact_id}]"
+ set edit_url "[export_vars -base "${base_url}/glossar-edit" {glossar_id contact_id}]"
set permission_url "[export_vars -base "/permissions/one" {{object_id $glossar_id} {application_url [ad_return_url]}}]"
- set files_url "[export_vars -base "${base_url}/glossar-file-upload" {glossar_id}]"
+ set files_url "[export_vars -base "${base_url}/glossar-file-upload" {glossar_id contact_id}]"
set target_url "/contacts/$organization_id"
} if_no_rows {
-
-
}
}
\ No newline at end of file
Index: openacs-4/packages/glossar/lib/glossar-portlet-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-portlet-list.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/glossar/lib/glossar-portlet-list.tcl 2 Jan 2006 13:22:06 -0000 1.3
+++ openacs-4/packages/glossar/lib/glossar-portlet-list.tcl 24 May 2006 06:12:31 -0000 1.4
@@ -26,6 +26,7 @@
set page_size 100
set base_url "glossar"
set user_id [ad_conn user_id]
+set contact_id $owner_id
if {[empty_string_p $user_id]} {
ad_redirect_for_registration
@@ -84,7 +85,7 @@
if [permission::permission_p -object_id $owner_id -privilege admin] {
-} elseif {[permission::permission_p -object_id $owner_id -privilege create]} {
+} elseif {[permission::permission_p -object_id $owner_id -privilege create] || [group::member_p -group_name Employees]} {
set user_perm create
@@ -188,8 +189,6 @@
set new_glossar "[export_vars -base "${base_url}/index" {owner_id {customer_id $gl_owner_id}}]"
}
} if_no_rows {
-
-
}
}
Index: openacs-4/packages/glossar/lib/glossar-term-list-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-term-list-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/glossar/lib/glossar-term-list-postgresql.xql 4 Jan 2006 08:09:37 -0000 1.4
+++ openacs-4/packages/glossar/lib/glossar-term-list-postgresql.xql 24 May 2006 06:12:31 -0000 1.5
@@ -15,7 +15,7 @@
WHERE gi.latest_revision = g.glossar_id
AND g.owner_id = o.organization_id
AND g.source_category_id = :source_category_id
- AND g.target_category_id = :target_category_id
+ $target_where_clause
AND r.rel_id = :owner_id
AND r.object_id_one = o.organization_id
AND r.rel_type = 'contact_rels_etat'
@@ -29,7 +29,7 @@
WHERE gi.latest_revision = g.glossar_id
AND g.owner_id = r.rel_id
AND g.source_category_id = :source_category_id
- AND g.target_category_id = :target_category_id
+ $target_where_clause
AND r.object_id_one = :owner_id
AND r.object_id_two = o.organization_id
AND r.rel_type = 'contact_rels_etat'
Index: openacs-4/packages/glossar/lib/glossar-term-list.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-term-list.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/glossar/lib/glossar-term-list.adp 4 Jan 2006 08:09:37 -0000 1.5
+++ openacs-4/packages/glossar/lib/glossar-term-list.adp 24 May 2006 06:12:31 -0000 1.6
@@ -12,25 +12,29 @@
- #glossar.Title#: |
- @glossar_title@ |
-
-
- #glossar.Comment#: |
- @glossar_comment;noquote@ |
-
-
#glossar.glossar_single_category#: |
@glossar_language;noquote@ |
+
#glossar.glossar_target_category#: |
@glossar_target_lan;noquote@ |
+
+ #glossar.Comment#: |
+ @glossar_comment;noquote@ |
+
+
+
#glossar.Files#: |
- @files;noquote@ |
+
+
+ @files.name@
+
+ |
+
|
Index: openacs-4/packages/glossar/lib/glossar-term-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-term-list.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/glossar/lib/glossar-term-list.tcl 4 Jan 2006 08:09:37 -0000 1.5
+++ openacs-4/packages/glossar/lib/glossar-term-list.tcl 24 May 2006 06:12:31 -0000 1.6
@@ -7,7 +7,7 @@
# @arch-tag: beb88796-955e-4cbd-af5e-3919597c7ed1
# @cvs-id $Id$
-foreach required_param {glossar_id searchterm} {
+foreach required_param {glossar_id contact_id searchterm} {
if {![info exists $required_param]} {
return -code error "$required_param is a required parameter."
}
@@ -32,22 +32,9 @@
set glossar_language " - - - - - - - - -
"
}
-if {[empty_string_p $glossar_target_lan] } {
- set glossar_target_lan " - - - - - - - - -
"
-}
-
# get all the files
-set files [list]
-db_foreach get_files { } {
- lappend files "$title"
-}
+db_multirow files get_files {}
-if {[empty_string_p $files] } {
- set files " - - - - - - - - -
"
-} else {
- set files [join $files ", "]
-}
-
if {![info exists format]} {
set format "normal"
}
@@ -67,7 +54,7 @@
if {$format == "normal"} {
set row_list [list source_text {} target_text {} dont_text {} description {} owner {} last_modified {} creation_user {} edit {} history {}]
} else {
- set row_list [list source_text {} target_text {} dont_text {} description {} owner {} last_modified {} creation_user {}]
+ set row_list [list source_text {} target_text {} dont_text {} description {} owner {} last_modified {} creator_name {}]
}
set glossar_ids $glossar_id
@@ -87,38 +74,40 @@
set glossar_owner_lable "[_ glossar.glossar_etat]"
}
-# get glossars with matching languages that belongs to the relationships
-db_foreach $glossar_query_name {} {
- lappend glossar_ids $item_id
- set owners($owner_id) $name
-}
-
if {![empty_string_p $target_category_id]} {
-
+
+ set target_where_clause "AND g.target_category_id = :target_category_id"
set source_text_lable [_ glossar.glossar_source_text]
- set actions [list "[_ glossar.glossar_New_term]" [export_vars -base glossar-term-add {glossar_id}] "[_ glossar.glossar_New_term]" ]
+ set actions [list "[_ glossar.glossar_New_term]" [export_vars -base glossar-term-add {glossar_id contact_id}] "[_ glossar.glossar_New_term]" ]
} else {
+ set target_where_clause ""
set row_list [lreplace $row_list 2 3]
set source_text_lable [_ glossar.glossar_singel_text]
- set actions [list "[_ glossar.glossar_New_term]" [export_vars -base glossar-term-add {glossar_id}] "[_ glossar.glossar_New_term]"]
+ set actions [list "[_ glossar.glossar_New_term]" [export_vars -base glossar-term-add {glossar_id contact_id}] "[_ glossar.glossar_New_term]"]
}
+# get glossars with matching languages that belongs to the relationships
+db_foreach $glossar_query_name {} {
+ lappend glossar_ids $item_id
+ set owners($owner_id) $name
+}
+
if {[permission::permission_p -object_id $glossar_id -privilege admin]} {
if {$format == "normal"} {
set where_format " AND "
- lappend actions "[_ glossar.glossar_Format_CSV]" [export_vars -base glossar-term-list {glossar_id {format csv}}] "[_ glossar.glossar_New2]"
+ lappend actions "[_ glossar.glossar_Format_CSV]" [export_vars -base glossar-term-list {glossar_id contact_id {format csv}}] "[_ glossar.glossar_New2]"
} else {
set where_format " "
- lappend actions "[_ glossar.glossar_Format_Normal]" [export_vars -base glossar-term-list {glossar_id {format normal}}] "[_ glossar.glossar_New2]"
+ lappend actions "[_ glossar.glossar_Format_Normal]" [export_vars -base glossar-term-list {glossar_id contact_id {format normal}}] "[_ glossar.glossar_New2]"
}
} elseif {[permission::permission_p -object_id $glossar_id -privilege create]} {
@@ -183,7 +172,7 @@
label {[_ glossar.glossar_dont_text]}
}
description {
- label {[_ glossar.glossar_description]}
+ label {[_ glossar.glossar_comment]}
}
owner {
label {$glossar_owner_lable}
@@ -195,6 +184,9 @@
label {[_ glossar.glossar_creation_user]}
display_template {@gl_term.last_name@, @gl_term.first_names@}
}
+ creator_name {
+ label {[_ glossar.glossar_creation_user]}
+ }
edit {
label " "
display_template {}
@@ -225,6 +217,18 @@
orderby_asc {lower(glt.dont_text) asc}
default_direction asc
}
+ description {
+ label {[_ glossar.glossar_comment]}
+ orderby_desc {lower(crr.description) desc}
+ orderby_asc {lower(crr.description) asc}
+ default_direction asc
+ }
+ owner {
+ label {[_ glossar.glossar_owner]}
+ orderby_desc {g.owner_id desc}
+ orderby_asc {g.owner_id asc}
+ default_direction asc
+ }
last_modified {
label {[_ glossar.glossar_last_modified]}
orderby_desc {aco.last_modified desc}
@@ -239,6 +243,7 @@
}
} -filters {
glossar_id {}
+ contact_id {}
searchterm {
label "[_ glossar.glossar_term_search]"
where_clause $search_where_clause
@@ -263,9 +268,9 @@
-set hidden_vars [export_vars -form {glossar_id gl_translation_p orderby format page owner_id customer_id }]
+set hidden_vars [export_vars -form {glossar_id gl_translation_p orderby format page owner_id customer_id contact_id }]
-db_multirow -extend {gl_translation_p creator_url edit_url history_url owner} gl_term gl_term {} {
+db_multirow -extend {gl_translation_p creator_url creator_name edit_url history_url owner} gl_term gl_term {} {
if {![empty_string_p $target_text]} {
set gl_translation_p 1
} else {
@@ -282,11 +287,12 @@
} else {
set owner ""
}
-
+
+ set creator_name "$first_names $last_name"
set last_modified [lc_time_fmt $last_modified $time_format]
set creator_url [acs_community_member_url -user_id $creation_user]
- set edit_url [export_vars -base glossar-term-add {glossar_id term_id}]
- set history_url [export_vars -base glossar-term-rev-list {glossar_id term_id}]
+ set edit_url [export_vars -base glossar-term-add {glossar_id term_id contact_id}]
+ set history_url [export_vars -base glossar-term-rev-list {glossar_id term_id contact_id}]
} if_no_rows {}
-# template::list::write_output -name gl_term
+template::list::write_output -name gl_term
Index: openacs-4/packages/glossar/lib/glossar-term-rev-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/lib/glossar-term-rev-list.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/glossar/lib/glossar-term-rev-list.tcl 4 Jan 2006 08:09:37 -0000 1.4
+++ openacs-4/packages/glossar/lib/glossar-term-rev-list.tcl 24 May 2006 06:12:31 -0000 1.5
@@ -9,7 +9,7 @@
-foreach required_param {glossar_id term_id searchterm} {
+foreach required_param {glossar_id term_id contact_id searchterm} {
if {![info exists $required_param]} {
return -code error "$required_param is a required parameter."
}
@@ -143,6 +143,7 @@
} -filters {
glossar_id {}
term_id {}
+ contact_id {}
searchterm {
label "[_ glossar.glossar_term_search]"
where_clause $search_where_clause
@@ -171,7 +172,8 @@
# May add extra order_by clause
-set hidden_vars [export_vars -form {glossar_id gl_translation_p orderby format page term_id}]
+set hidden_vars [export_vars -form {glossar_id gl_translation_p orderby format page term_id contact_id}]
+
db_multirow -extend {gl_translation_p creator_url} gl_term_rev gl_term_rev {} {
set creator_url [acs_community_member_url -user_id $creation_user]
set last_modified [lc_time_fmt $last_modified $time_format]
Index: openacs-4/packages/glossar/www/glossar-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-add.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/glossar/www/glossar-add.adp 20 Aug 2005 09:37:51 -0000 1.1
+++ openacs-4/packages/glossar/www/glossar-add.adp 24 May 2006 06:12:31 -0000 1.2
@@ -1,5 +1,6 @@
-
- @page_title@
- @context@
+
+ @owner_id@
+ @context;noquote@
+ @page_title;noquote@
-
\ No newline at end of file
+
Index: openacs-4/packages/glossar/www/glossar-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-add.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/glossar/www/glossar-add.tcl 4 Jan 2006 08:09:39 -0000 1.5
+++ openacs-4/packages/glossar/www/glossar-add.tcl 24 May 2006 06:12:31 -0000 1.6
@@ -20,21 +20,19 @@
if {$gl_translation_p == 1} {
if {[exists_and_not_null glossar_id]} {
- set context "translation-edit"
set page_title "[_ glossar.Edit_Translation]"
} else {
- set context "translation-add"
set page_title "[_ glossar.New_Translation]"
}
} else {
if {[exists_and_not_null glossar_id]} {
- set context "glossar-edit"
set page_title "[_ glossar.Edit_Glossar]"
} else {
- set context "glossar-add"
set page_title "[_ glossar.Add_new_Glossar]"
}
}
+
+set context [list [list "/contacts/$owner_id" [contact::name -party_id $owner_id]] $page_title]
acs_object::get -object_id $owner_id -array owner
set package_id $owner(package_id)
@@ -49,7 +47,7 @@
ad_form -name glossar-add -export {owner_id package_id gl_translation_p customer_id} -form {
{glossar_id:key}
{title:text(text) {label "[_ glossar.Title]"} }
- {description:text(textarea),optional {label "[_ glossar.Comment]"} {html{rows 4 cols 30} }}
+ {description:text(textarea),optional {label "[_ glossar.Comment]"} {html {rows 6 cols 80} }}
}
Index: openacs-4/packages/glossar/www/glossar-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-edit.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/glossar/www/glossar-edit.adp 23 Aug 2005 19:40:47 -0000 1.2
+++ openacs-4/packages/glossar/www/glossar-edit.adp 24 May 2006 06:12:31 -0000 1.3
@@ -1,5 +1,6 @@
-
- #glossar.Change_Glossar#
-
+
+ @contact_id@
+ @context;noquote@
+ @page_title;noquote@
-
\ No newline at end of file
+
Index: openacs-4/packages/glossar/www/glossar-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-edit.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/glossar/www/glossar-edit.tcl 4 Jan 2006 08:09:39 -0000 1.4
+++ openacs-4/packages/glossar/www/glossar-edit.tcl 24 May 2006 06:12:31 -0000 1.5
@@ -10,61 +10,65 @@
@cvs-id $Id$
} {
glossar_id:notnull
+ contact_id:notnull
} -properties {
-
-} -validate {
-} -errors {
}
-db_1row get_glossar {}
-
set from_object_id [db_string get_from_default_object { }]
set to_object_id [db_string get_to_default_object { }]
# We get the mapped category tree's to show in the form
set source_tree_id [lindex [lindex [category_tree::get_mapped_trees $from_object_id] 0] 0]
set target_tree_id [lindex [lindex [category_tree::get_mapped_trees $to_object_id] 0] 0]
-ad_form -name glossar-edit -form {
+set page_title "[_ glossar.Change_Glossar]"
+set context [list [list "/contacts/$contact_id" [contact::name -party_id $contact_id]] $page_title]
+db_1row check_translation_p {}
+
+ad_form -name glossar-edit -export {contact_id} -form {
+
{glossar_id:key}
{title:text(text) {label "[_ glossar.Title]"} }
- {description:text(textarea),optional {label "[_ glossar.Comment]"} {html{rows 4 cols 30} }}
+ {description:text(textarea),optional {label "[_ glossar.Comment]"} {html {rows 6 cols 80} }}
}
-if {![empty_string_p $target_category_id]} {
+if {$translation_p == "t"} {
ad_form -extend -name glossar-edit -form {
- {source_category_id:integer(category) {label "[_ glossar.glossar_source_category]"} {category_tree_id $source_tree_id} {category_assign_single_p t} {category_require_category_p t}}
+ {source_category_id:integer(category) {label "[_ glossar.glossar_source_category]"} {category_tree_id $source_tree_id} {category_assign_single_p t} {category_require_category_p t} {category_mapped $source_cat_id}}
- {target_category_id:integer(category) {label "[_ glossar.glossar_target_category]"} {category_tree_id $target_tree_id} {category_assign_single_p t} {category_require_category_p t}}
+ {target_category_id:integer(category) {label "[_ glossar.glossar_target_category]"} {category_tree_id $target_tree_id} {category_assign_single_p t} {category_require_category_p t} {category_mapped $target_cat_id}}
}
-
} else {
ad_form -extend -name glossar-edit -form {
-
- {source_category_id:integer(category) {label "[_ glossar.glossar_single_category]"} {category_tree_id $source_tree_id} {category_assign_single_p t} {category_require_category_p t}}
- {target_category_id:text(hidden) {value "[db_null]"}}
+ {source_category_id:integer(category) {label "[_ glossar.glossar_single_category]"} {category_tree_id $source_tree_id} {category_assign_single_p t} {category_require_category_p t} {category_mapped $source_cat_id}}
+ {target_category_id:text(hidden) {value "[db_null]"}}
}
-
}
-
+
+db_0or1row check_rel_owner {}
+
set group_id [group::get_id -group_name "Etat"]
-set is_etat_p [db_string check_if_is_etat {} -default 0]
+if {[db_string check_if_is_etat {} -default 0]} {
+ set target_label "[_ glossar.glossar_organization]"
+} else {
+ set target_label "[_ glossar.glossar_etat]"
+}
set options [db_list_of_lists get_etats {}]
set options [concat [list [list "" ""]] $options]
if {[llength $options] > 1} {
ad_form -extend -name glossar-edit -form {
- {target_id:integer(select),optional {label "[_ glossar.glossar_etat]"} {options $options}}
+ {target_id:integer(select),optional {label $target_label} {options $options}}
}
} else {
ad_form -extend -name glossar-edit -form {
@@ -75,16 +79,28 @@
ad_form -extend -name glossar-edit -form {
{owner_id:text(hidden)}
} -edit_request {
+ db_1row get_glossar {}
+
+ set organization_p [organization::organization_p -party_id $owner_id]
+ if {!$organization_p} {
+ db_1row get_rel_id {}
+ }
+ if {[exists_and_not_null rel_target_id]} {
+ set target_id $rel_target_id
+ }
+
} -edit_data {
set old_owner_id $owner_id
+
if {![empty_string_p $target_id]} {
- db_1row get_rel_id {}
+ db_1row get_rel_id2 {}
}
- gl_glossar::edit -glossar_item_id $glossar_id -title $title -description $comment -source_category_id $source_category_id -target_category_id $target_category_id -owner_id $owner_id -etat_id ""
+ gl_glossar::edit -glossar_item_id $glossar_id -title $title -description $description -source_category_id $source_category_id -target_category_id $target_category_id -owner_id $owner_id -etat_id ""
+
} -after_submit {
- ad_returnredirect "/contacts/$old_owner_id"
+ ad_returnredirect "/contacts/$contact_id"
ad_script_abort
}
Index: openacs-4/packages/glossar/www/glossar-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-edit.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/glossar/www/glossar-edit.xql 4 Jan 2006 08:09:39 -0000 1.2
+++ openacs-4/packages/glossar/www/glossar-edit.xql 24 May 2006 06:12:31 -0000 1.3
@@ -1,10 +1,21 @@
+
+
+ SELECT case when g.target_category_id is null then 'f' else 't' end as translation_p, g.owner_id,
+ g.source_category_id as source_cat_id, g.target_category_id as target_cat_id
+ FROM gl_glossars g,
+ cr_items i
+ WHERE i.item_id = :glossar_id
+ AND g.glossar_id = i.latest_revision
+
+
+
SELECT r.title,
- r.description as comment,
+ r.description,
g.source_category_id,
g.target_category_id,
g.etat_id,
@@ -54,6 +65,16 @@
+
+
+ select case when object_id_one = :contact_id then object_id_two else object_id_one end as rel_target_id,
+ :contact_id as owner_id
+ from acs_rels
+ where rel_id = :owner_id
+ and rel_type = 'contact_rels_etat'
+
+
+
select count(*)
@@ -65,6 +86,15 @@
+ SELECT :contact_id as owner_id
+ FROM acs_rels ar
+ WHERE ar.rel_id = :owner_id
+ AND ar.rel_type = 'contact_rels_etat'
+
+
+
+
+
SELECT ar.rel_id as owner_id
FROM acs_rels ar
WHERE ((object_id_one = :owner_id and object_id_two = :target_id)
Index: openacs-4/packages/glossar/www/glossar-file-upload.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-file-upload.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/glossar/www/glossar-file-upload.adp 23 Aug 2005 19:40:47 -0000 1.2
+++ openacs-4/packages/glossar/www/glossar-file-upload.adp 24 May 2006 06:12:31 -0000 1.3
@@ -1,7 +1,7 @@
-
- #glossar.Glossar_Files#
- glossar-file-upload
+
+ @contact_id@
+ @context;noquote@
+ @page_title;noquote@
-
Index: openacs-4/packages/glossar/www/glossar-file-upload.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-file-upload.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/glossar/www/glossar-file-upload.tcl 20 Aug 2005 09:37:51 -0000 1.1
+++ openacs-4/packages/glossar/www/glossar-file-upload.tcl 24 May 2006 06:12:31 -0000 1.2
@@ -12,11 +12,16 @@
glossar_id:notnull
{upload_count "1"}
{order_by "file,asc"}
+ contact_id:notnull
} -properties {
glossar_id
upload_count
order_by
-} -validate {
-} -errors {
}
+set page_title "[_ glossar.Glossar_Files]"
+set context [list [list "/contacts/$contact_id" [contact::name -party_id $contact_id]] $page_title]
+
+db_1row glossar_title {}
+
+append page_title ": $glossar_title"
Index: openacs-4/packages/glossar/www/glossar-move.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-move.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/glossar/www/glossar-move.adp 13 Nov 2005 13:39:56 -0000 1.1
+++ openacs-4/packages/glossar/www/glossar-move.adp 24 May 2006 06:12:31 -0000 1.2
@@ -1,14 +1,13 @@
-
-Move glossar
-@context@
+
+ @contact_id@
+ @context;noquote@
+ @page_title;noquote@
-Move glossar
-
-Search for Customers who's name contains:
+#glossar.glossar_move_search#
-
+
-
\ No newline at end of file
+
Index: openacs-4/packages/glossar/www/glossar-move.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-move.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/glossar/www/glossar-move.tcl 4 Jan 2006 08:09:39 -0000 1.2
+++ openacs-4/packages/glossar/www/glossar-move.tcl 24 May 2006 06:12:31 -0000 1.3
@@ -10,17 +10,21 @@
{return_url "/"}
{query ""}
{glossar_id:notnull,multiple}
+ contact_id:notnull
}
-set context "search"
+#move glossar
+set page_title "[_ glossar.glossar_move]"
+set context [list [list "/contacts/$contact_id" [contact::name -party_id $contact_id]] $page_title]
+
set search_id ""
set glossar_id [string trim $glossar_id "{}"]
set customer_group_id [group::get_id -group_name "Customers"]
-ad_form -name search -export {glossar_id} -form {
+ad_form -name search -export {glossar_id contact_id} -form {
{query:text(text) {label ""} {html {size 24}}}
- {Search:text(submit) {value "Search"}}
+ {search:text(submit) {value 1} {label "[_ glossar.search]"}}
}
template::list::create \
@@ -36,5 +40,5 @@
}
}
db_multirow -extend {move_url} customers get_customers_from_prefix {} {
- set move_url [export_vars -base "move-glossar" {{customer_id $organization_id} glossar_id:multiple return_url}]
+ set move_url [export_vars -base "move-glossar" {{customer_id $organization_id} glossar_id:multiple return_url contact_id}]
}
Index: openacs-4/packages/glossar/www/glossar-move.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-move.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/glossar/www/glossar-move.xql 4 Jan 2006 08:09:39 -0000 1.2
+++ openacs-4/packages/glossar/www/glossar-move.xql 24 May 2006 06:12:31 -0000 1.3
@@ -9,10 +9,9 @@
WHERE o.organization_id = p.party_id
AND o.organization_id = m.member_id
AND m.group_id = :customer_group_id
- [contact::search_clause -and -search_id $search_id -query $query -party_id "o.party_id" -revision_id "revision_id"]
+ [contact::search_clause -and -search_id $search_id -query $query -party_id "p.party_id" -revision_id "revision_id"]
-
Index: openacs-4/packages/glossar/www/glossar-term-add.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-term-add.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/glossar/www/glossar-term-add.adp 20 Aug 2005 09:37:51 -0000 1.1
+++ openacs-4/packages/glossar/www/glossar-term-add.adp 24 May 2006 06:12:31 -0000 1.2
@@ -1,6 +1,7 @@
-
- @title@
- @context@
+
+ @contact_id@
+ @context;noquote@
+ @page_title;noquote@
Index: openacs-4/packages/glossar/www/glossar-term-add.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-term-add.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/glossar/www/glossar-term-add.tcl 4 Jan 2006 08:09:39 -0000 1.3
+++ openacs-4/packages/glossar/www/glossar-term-add.tcl 24 May 2006 06:12:31 -0000 1.4
@@ -15,43 +15,50 @@
{target_text ""}
{dont_text ""}
{description ""}
+ {__new_p 0}
+ contact_id:notnull
} -properties {
-} -validate {
-} -errors {
}
-set context "[_ glossar.glossar_term_add]"
-set title "[_ glossar.Add_a_Term_to_a_Glossar]"
+db_1row glossar_title {}
+if {![info exists term_id] || $__new_p} {
+ set context [list [list "/contacts/$contact_id" [contact::name -party_id $contact_id]] [list [export_vars -base "glossar-term-list" {glossar_id contact_id}] $glossar_title] "[_ glossar.glossar_term_add]"]
+ set page_title "[_ glossar.Add_a_Term_to_a_Glossar]"
+} else {
+ set context [list [list "/contacts/$contact_id" [contact::name -party_id $contact_id]] [list [export_vars -base "glossar-term-list" {glossar_id contact_id}] $glossar_title] "[_ glossar.Edit_Term]"]
+ set page_title "[_ glossar.Edit_Term]"
+}
+
db_1row get_glossar_data {
select g.target_category_id
from gl_glossars g, cr_items gi
where g.glossar_id = gi.latest_revision
and gi.item_id = :glossar_id
}
-ad_form -name glossar-term-add -export {glossar_id} -form {
+ad_form -name glossar-term-add -export {glossar_id contact_id} -form {
{term_id:key}
}
if {![empty_string_p $target_category_id]} {
ad_form -extend -name glossar-term-add -form {
- {source_text:text(textarea),optional {label "[_ glossar.glossar_source_text]"} {html {rows 4 cols 60}}}
- {target_text:text(textarea),optional {label "[_ glossar.glossar_target_text]"} {html {rows 4 cols 60}}}
+ {source_text:text(textarea),optional {label "[_ glossar.glossar_source_text]"} {html {rows 4 cols 50}}}
+ {target_text:text(textarea),optional {label "[_ glossar.glossar_target_text]"} {html {rows 4 cols 50}}}
}
} else {
ad_form -extend -name glossar-term-add -form {
- {source_text:text(textarea),optional {label "[_ glossar.glossar_singel_text]"} {html {rows 4 cols 60}}}
+ {source_text:text(textarea),optional {label "[_ glossar.glossar_singel_text]"} {html {rows 4 cols 50}}}
}
}
ad_form -extend -name glossar-term-add -form {
{dont_text:text(textarea),optional {label "[_ glossar.glossar_dont_text]"} {html {rows 4 cols 50}}}
- {description:text(textarea),optional {label "[_ glossar.glossar_description]"} {html {rows 4 cols 50}}}
+ {description:text(textarea),optional {label "[_ glossar.glossar_comment]"} {html {rows 4 cols 50}}}
} -new_request {
Index: openacs-4/packages/glossar/www/glossar-term-list.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-term-list.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/glossar/www/glossar-term-list.adp 4 Jan 2006 08:09:39 -0000 1.3
+++ openacs-4/packages/glossar/www/glossar-term-list.adp 24 May 2006 06:12:31 -0000 1.4
@@ -1,5 +1,6 @@
-
- #glossar.Glossars#
- index
+
+ @contact_id@
+ @context;noquote@
+ @page_title;noquote@
-
\ No newline at end of file
+
Index: openacs-4/packages/glossar/www/glossar-term-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-term-list.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/glossar/www/glossar-term-list.tcl 4 Jan 2006 08:09:39 -0000 1.2
+++ openacs-4/packages/glossar/www/glossar-term-list.tcl 24 May 2006 06:12:31 -0000 1.3
@@ -14,6 +14,7 @@
{orderby ""}
{searchterm ""}
{format "normal"}
+ contact_id:notnull
} -properties {
glossar_id
gl_translation_p
@@ -23,7 +24,9 @@
customer_id
format
owner_id
-} -validate {
-} -errors {
}
+db_1row glossar_title {}
+
+set page_title "[_ glossar.Glossars] \"$glossar_title\""
+set context [list [list "/contacts/$contact_id" [contact::name -party_id $contact_id]] $page_title]
Index: openacs-4/packages/glossar/www/glossar-term-rev-list.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-term-rev-list.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/glossar/www/glossar-term-rev-list.adp 4 Jan 2006 08:09:39 -0000 1.3
+++ openacs-4/packages/glossar/www/glossar-term-rev-list.adp 24 May 2006 06:12:31 -0000 1.4
@@ -1,5 +1,6 @@
-
- #glossar.Glossars#
- index
+
+ @contact_id@
+ @context;noquote@
+ @page_title;noquote@
-
\ No newline at end of file
+
Index: openacs-4/packages/glossar/www/glossar-term-rev-list.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/glossar-term-rev-list.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/glossar/www/glossar-term-rev-list.tcl 4 Jan 2006 08:09:39 -0000 1.2
+++ openacs-4/packages/glossar/www/glossar-term-rev-list.tcl 24 May 2006 06:12:31 -0000 1.3
@@ -14,12 +14,18 @@
{page ""}
{orderby ""}
{searchterm ""}
+ contact_id:notnull
} -properties {
glossar_id
page
orderby
searchterm
term_id
-} -validate {
-} -errors {
+
}
+
+db_1row glossar_title {}
+db_1row term_title {}
+
+set page_title "[_ glossar.Glossar_term_history_of] \"$term_title\""
+set context [list [list "/contacts/$contact_id" [contact::name -party_id $contact_id]] [list [export_vars -base "glossar-term-list" {glossar_id contact_id}] $glossar_title] $page_title]
Index: openacs-4/packages/glossar/www/move-glossar.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/glossar/www/move-glossar.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/glossar/www/move-glossar.tcl 4 Jan 2006 08:09:39 -0000 1.2
+++ openacs-4/packages/glossar/www/move-glossar.tcl 24 May 2006 06:12:31 -0000 1.3
@@ -3,25 +3,40 @@
} {
customer_id:integer,notnull
glossar_id:integer,notnull,multiple
+ contact_id:notnull
{return_url}
}
-foreach id $glossar_id {
- set glossar_revision_id [content::item::get_best_revision -item_id $id]
- db_1row get_glossar_info {
- SELECT g.source_category_id, g.target_category_id, g.etat_id, r.title, r.description
- FROM gl_glossars g, cr_revisions r
- WHERE g.glossar_id = :glossar_revision_id
- AND g.glossar_id = r.revision_id
- }
+db_transaction {
+ foreach id $glossar_id {
+ set glossar_revision_id [content::item::get_best_revision -item_id $id]
+ set owner_id $customer_id
+
+ db_1row get_glossar_info {
+ SELECT g.source_category_id, g.target_category_id, g.etat_id, r.title, r.description,
+ g.owner_id as old_owner_id
+ FROM gl_glossars g, cr_revisions r
+ WHERE g.glossar_id = :glossar_revision_id
+ AND g.glossar_id = r.revision_id
+ }
+
+ db_0or1row check_owner_rel {
+ select rel_id as owner_id
+ from acs_rels
+ where rel_type = 'contact_rels_etat'
+ and object_id_one = :contact_id
+ and object_id_two = :customer_id
+ and exists (select 1 from acs_rels where rel_id = :old_owner_id)
+ }
- gl_glossar::edit -glossar_item_id $id \
- -owner_id $customer_id \
- -source_category_id $source_category_id\
- -target_category_id $target_category_id\
- -etat_id "" \
- -title $title \
- -description $description
+ gl_glossar::edit -glossar_item_id $id \
+ -owner_id $owner_id \
+ -source_category_id $source_category_id\
+ -target_category_id $target_category_id\
+ -etat_id "" \
+ -title $title \
+ -description $description
+ }
}
-ad_returnredirect $return_url
\ No newline at end of file
+ad_returnredirect "/contacts/$customer_id"