Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.adp 22 Sep 2003 14:13:38 -0000 1.6
+++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.adp 10 Sep 2004 19:29:16 -0000 1.7
@@ -41,7 +41,16 @@
+
+
+ More Tickets:
+
+ @pages.page@
+
+
+
+
Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.tcl 6 Sep 2002 13:28:00 -0000 1.5
+++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index.tcl 10 Sep 2004 19:29:16 -0000 1.6
@@ -1,3 +1,9 @@
+ad_page_contract {
+ lets set the default page when not available
+} {
+ {page:naturalnum 1}
+}
+
set caller_privilege [ttl_restrict_to_ttl_users]
if [string equal admin $caller_privilege] {
@@ -117,26 +123,6 @@
append title " in \"$area_name\""
}
-db_multirow tickets get_tickets "
- select
- t.ticket_id,
- a.name as area_name,
- decode(t.priority, 1, 'High',
- 2, 'Medium',
- 3, 'Low',
- t.priority) as ticket_priority,
- t.status,
- s.sort_key,
- t.name as ticket_name,
- ttl_relative_date(nvl(c.creation_date, t.last_modified)) as last_comment,
- decode(deadline, null, null, to_char(deadline, 'Mon DD')) as ticket_deadline
- from ttl_va_tickets t, ttl_status s, ttl_va_areas a, ttl_v_comments_latest c
- where a.context_id = :package_id
- and a.area_id = t.area_id
- and t.status = s.status
- and t.ticket_id = c.ticket_id(+) $user_id_clause $status_clause $area_clause
- $order_clause"
-
#
# For dimensional sliders
#
@@ -155,3 +141,13 @@
set area_optionlist [ttl_area_optionlist -all_option $area_id]
+
+
+# build the paginated tickets
+set p_name tickets_paginator
+
+paginator create get_tickets $p_name "" -pagesize 20 -timeout 1
+paginator get_data get_paged_tickets $p_name tickets "" ticket_id $page
+
+set group [paginator get_group $p_name $page]
+paginator get_pages_info $p_name pages [paginator get_pages $p_name $group]