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.5 -r1.6
--- openacs-4/packages/glossar/lib/glossar-file-upload.tcl 24 May 2006 06:12:31 -0000 1.5
+++ openacs-4/packages/glossar/lib/glossar-file-upload.tcl 30 Oct 2006 11:44:58 -0000 1.6
@@ -7,7 +7,7 @@
# @arch-tag: beb88796-955e-4cbd-af5e-3919597c7ed1
# @cvs-id $Id$
-foreach required_param {glossar_id} {
+foreach required_param {glossar_id contact_id} {
if {![info exists $required_param]} {
return -code error "$required_param is a required parameter."
}
@@ -42,6 +42,7 @@
set form_elements [list {glossar_id:integer(hidden)}]
lappend form_elements [list {upload_count:integer(hidden)}]
+lappend form_elements [list {contact_id:integer(hidden)}]
lappend form_elements [list {orderby:text(hidden),optional}]
set upload_number 1
@@ -99,9 +100,9 @@
} -after_submit {
if {[exists_and_not_null upload_more]} {
ad_returnredirect [export_vars \
- -base "glossar-file-upload" -url {{upload_count 10} glossar_id}]
+ -base "glossar-file-upload" -url {{upload_count 10} glossar_id contact_id}]
} else {
- ad_returnredirect "glossar-file-upload?glossar_id=$glossar_id"
+ ad_returnredirect "glossar-file-upload?glossar_id=$glossar_id&contact_id=$contact_id"
}
ad_script_abort
}
@@ -112,7 +113,7 @@
-multirow "files" \
-row_pretty_plural "[_ glossar.files]" \
-checkbox_name checkbox \
- -bulk_action_export_vars [list glossar_id orderby] \
+ -bulk_action_export_vars [list glossar_id orderby contact_id] \
-bulk_actions [list \
"[_ glossar.Delete]" "glossar-file-delete" "[_ glossar.lt_Delete_the_selectted_]" \
"[_ glossar.Update]" "glossar-file-update" "[_ glossar.Update_filenames]" \
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.6 -r1.7
--- openacs-4/packages/glossar/lib/glossar-list-postgresql.xql 24 May 2006 06:12:31 -0000 1.6
+++ openacs-4/packages/glossar/lib/glossar-list-postgresql.xql 30 Oct 2006 11:44:58 -0000 1.7
@@ -37,7 +37,8 @@
AND ((acs_rels.object_id_one = organizations.organization_id AND acs_rels.object_id_two = :owner_id)
OR (acs_rels.object_id_two = organizations.organization_id AND acs_rels.object_id_one = :owner_id))
AND acs_rels.rel_type = 'contact_rels_etat'
- ORDER BY query_number asc,
+ ORDER BY
+ -- query_number asc,
[template::list::orderby_clause -name gl_glossar]
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.10 -r1.11
--- openacs-4/packages/glossar/lib/glossar-list.tcl 4 Aug 2006 11:37:01 -0000 1.10
+++ openacs-4/packages/glossar/lib/glossar-list.tcl 30 Oct 2006 11:44:58 -0000 1.11
@@ -154,8 +154,8 @@
}
title {
label {[_ glossar.glossar_title]}
- orderby_desc {sort_key asc , gl_title desc}
- orderby_asc {sort_key asc, gl_title asc}
+ orderby_desc {gl_title desc}
+ orderby_asc {gl_title asc}
default_direction asc
}
} -orderby_name orderby \
@@ -195,16 +195,18 @@
set target_category "[category::get_name $target_category_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 delete_url "[export_vars -base "${base_url}/glossar-delete" {glossar_id return_url}]"
+ set delete_url "[export_vars -base "${base_url}/glossar-delete" {glossar_id return_url}]"
+ set print_url "[export_vars -base "${base_url}/glossar-term-list-print" {glossar_id contact_id return_url}]"
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 contact_id}]"
set target_url "/contacts/$organization_id"
set edit_delete_link "
"
if [permission::permission_p -object_id $owner_id -privilege admin] {
- append edit_delete_link "
"
- } else {
- append edit_delete_link ""
+ append edit_delete_link " "
}
+ append edit_delete_link " "
+ append edit_delete_link ""
+
} if_no_rows {
}
}
\ No newline at end of file
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.6 -r1.7
--- openacs-4/packages/glossar/lib/glossar-term-list.adp 24 May 2006 06:12:31 -0000 1.6
+++ openacs-4/packages/glossar/lib/glossar-term-list.adp 30 Oct 2006 11:44:58 -0000 1.7
@@ -1,7 +1,8 @@
+
- |
|
+
#glossar.glossar_single_category#: |
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.7 -r1.8
--- openacs-4/packages/glossar/lib/glossar-term-list.tcl 4 Aug 2006 11:37:01 -0000 1.7
+++ openacs-4/packages/glossar/lib/glossar-term-list.tcl 30 Oct 2006 11:44:58 -0000 1.8
@@ -7,6 +7,7 @@
# @arch-tag: beb88796-955e-4cbd-af5e-3919597c7ed1
# @cvs-id $Id$
# 2006/08/03 nfl/cognovis: with delete term functionality
+# 2006/08/14 nfl/cognovis: new alternative layout for printing
foreach required_param {glossar_id contact_id searchterm} {
if {![info exists $required_param]} {
@@ -19,6 +20,10 @@
}
}
+if {![info exists layout_for_printing]} {
+ set layout_for_printing 0
+}
+
# Get glossar info
set glossar_info [db_1row get_glossar_info { }]
@@ -43,18 +48,28 @@
}
if {![info exists page_size]} {
- set page_size "25"
+ #set page_size "25"
+ # 2006/08/14 the line above was never used, because 10 was hard coded below! (nfl)
+ #2006/09/26 set page_size 10
+ # 2006/09/26 Customer want's it all on one page. So trick it like the print version.
+ set page_size 10000000
}
+if {$layout_for_printing==1} {
+ set page_size ""
+ # no pagination when printing (layout)
+ set page_size 10000000
+ # okay, trick it... 10 million entries per page... ;-)
+}
-
if {[empty_string_p $user_id]} {
ad_redirect_for_registration
}
+set edit_p [permission::permission_p -object_id $glossar_id -party_id $user_id -privilege create]
-if {$format == "normal"} {
+if {$edit_p} {
set row_list [list source_text {} target_text {} dont_text {} description {} owner {} last_modified {} creation_user {} edit {} delete {} history {}]
} else {
set row_list [list source_text {} target_text {} dont_text {} description {} owner {} last_modified {} creator_name {}]
@@ -81,15 +96,22 @@
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 contact_id}] "[_ glossar.glossar_New_term]" ]
+ if {$layout_for_printing!=1} {
+ set actions [list "[_ glossar.glossar_New_term]" [export_vars -base glossar-term-add {glossar_id contact_id}] "[_ glossar.glossar_New_term]" ]
+ } else {
+ set actions ""
+ }
} 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 contact_id}] "[_ glossar.glossar_New_term]"]
-
+ if {$layout_for_printing!=1} {
+ set actions [list "[_ glossar.glossar_New_term]" [export_vars -base glossar-term-add {glossar_id contact_id}] "[_ glossar.glossar_New_term]"]
+ } else {
+ set actions ""
+ }
}
# get glossars with matching languages that belongs to the relationships
@@ -105,12 +127,16 @@
if {$format == "normal"} {
set where_format " AND "
- lappend actions "[_ glossar.glossar_Format_CSV]" [export_vars -base glossar-term-list {glossar_id contact_id {format csv}}] "[_ glossar.glossar_New2]"
+ if {$layout_for_printing!=1} {
+ 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 contact_id {format normal}}] "[_ glossar.glossar_New2]"
+ if {$layout_for_printing!=1} {
+ 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]} {
@@ -192,15 +218,15 @@
}
edit {
label " "
- display_template {}
+ display_template {}
}
delete {
label " "
- display_template {}
- }
+ display_template {}
+ }
history {
label " "
- display_template {#glossar.glossar_term_history#}
+ display_template {#glossar.glossar_term_history#}
}
} -actions $actions -sub_class narrow \
-orderby_name orderby \
@@ -256,7 +282,7 @@
where_clause $search_where_clause
}
} -page_size_variable_p 0 \
- -page_size 10 \
+ -page_size $page_size \
-page_flush_p 1 \
-page_query_name gl_term_page \
-formats {
@@ -277,7 +303,7 @@
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 creator_name edit_url delete_url history_url owner} gl_term gl_term {} {
+db_multirow -extend {gl_translation_p creator_url creator_name edit_url delete_url history_url owner layout_for_printer} gl_term gl_term {} {
if {![empty_string_p $target_text]} {
set gl_translation_p 1
} else {
@@ -294,13 +320,14 @@
} 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 contact_id}]
set delete_url [export_vars -base glossar-term-delete {term_id return_url}]
set history_url [export_vars -base glossar-term-rev-list {glossar_id term_id contact_id}]
+ set layout_for_printer $layout_for_printing
} if_no_rows {}
template::list::write_output -name gl_term
|