Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index-oracle.xql 28 May 2001 20:43:16 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index-oracle.xql 10 Sep 2004 19:29:16 -0000 1.2 @@ -30,6 +30,39 @@ + + + + +select * from ( + +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 + +) paged_tickets where ticket_id in (CURRENT_PAGE_SET) + + + + + Index: openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index-postgresql.xql 26 Feb 2002 15:51:17 -0000 1.2 +++ openacs-4/contrib/obsolete-packages/ticket-tracker-lite/www/index-postgresql.xql 10 Sep 2004 19:29:16 -0000 1.3 @@ -32,7 +32,39 @@ + + +select * from ( + +select t.ticket_id, + a.name as area_name, + case when t.priority=1 + then 'High' else (case when t.priority=2 + then 'Medium' else (case when t.priority=3 + then 'Low' else t.priority::varchar end) end ) end as ticket_priority, + t.status, + s.sort_key, + t.name as ticket_name, + ttl_relative_date(coalesce(c.creation_date, t.last_modified)) as last_comment, + case when deadline is null then null else to_char(deadline, 'Mon DD') end + as ticket_deadline + from ttl_va_tickets t left join ttl_v_comments_latest c using (ticket_id), + ttl_status s, + ttl_va_areas a + where a.context_id = :package_id and + a.area_id = t.area_id and + t.status = s.status + $user_id_clause + $status_clause + $area_clause + $order_clause + +) paged_tickets where ticket_id in (CURRENT_PAGE_SET) + + + + 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]