Index: openacs-4/packages/acs-templating/www/doc/demo/list3/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/list3/index-oracle.xql,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-templating/www/doc/demo/list3/index-oracle.xql 6 Feb 2006 13:08:30 -0000 1.1
@@ -0,0 +1,42 @@
+
+
+ oracle8.1.6
+
+
+
+ select n.template_demo_note_id,
+ n.title,
+ n.body,
+ n.color,
+ to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date,
+ p.first_names || ' ' || p.last_name as creation_user_name,
+ decode(acs_permission.permission_p(n.template_demo_note_id,
+ :user_id,
+ 'write'),
+ 't', 1,
+ 'f', 0) as write_p,
+ decode(acs_permission.permission_p(n.template_demo_note_id,
+ :user_id,
+ 'admin'),
+ 't', 1,
+ 'f', 0) as admin_p,
+ decode(acs_permission.permission_p(n.template_demo_note_id,
+ :user_id,
+ 'delete'),
+ 't', 1,
+ 'f', 0) as delete_p
+ from template_demo_notes n,
+ acs_objects o,
+ persons p
+ where n.template_demo_note_id = o.object_id
+ and o.creation_user = p.person_id
+ and exists (select 1
+ from acs_object_party_privilege_map
+ where object_id = template_demo_note_id
+ and party_id = :user_id
+ and privilege = 'read')
+ order by creation_date
+
+
+
+
Index: openacs-4/packages/acs-templating/www/doc/demo/list3/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/list3/index-postgresql.xql,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-templating/www/doc/demo/list3/index-postgresql.xql 6 Feb 2006 13:08:30 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+ postgresql7.1
+
+
+
+
+ select
+ n.template_demo_note_id,
+ n.title,
+ n.color,
+ to_char(o.creation_date, 'YYYY-MM-DD HH24:MI:SS') as creation_date,
+ p.first_names || ' ' || p.last_name as creation_user_name
+ from
+ template_demo_notes n,
+ acs_objects o,
+ persons p
+ where n.template_demo_note_id = o.object_id
+ and o.creation_user = p.person_id
+ and exists (select 1
+ from acs_object_party_privilege_map
+ where object_id = template_demo_note_id
+ and party_id = :user_id
+ and privilege = 'read')
+ [template::list::orderby_clause -orderby -name notes]
+
+
+
+
Index: openacs-4/packages/acs-templating/www/doc/demo/list3/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/list3/index.adp,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-templating/www/doc/demo/list3/index.adp 6 Feb 2006 13:08:30 -0000 1.1
@@ -0,0 +1,6 @@
+
+Notes
+@context;noquote@
+
+
+
Index: openacs-4/packages/acs-templating/www/doc/demo/list3/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/demo/list3/index.tcl,v
diff -u -N
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-templating/www/doc/demo/list3/index.tcl 6 Feb 2006 13:08:30 -0000 1.1
@@ -0,0 +1,60 @@
+# main index page for notes.
+
+ad_page_contract {
+
+ @author rhs@mit.edu
+ @creation-date 2000-10-23
+ @cvs-id $Id: index.tcl,v 1.1 2006/02/06 13:08:30 jiml Exp $
+} -query {
+ orderby:optional
+} -properties {
+ notes:multirow
+ context:onevalue
+ create_p:onevalue
+}
+
+set package_id [ad_conn package_id]
+set user_id [ad_conn user_id]
+
+set context [list]
+set create_p [ad_permission_p $package_id create]
+
+template::list::create -name notes \
+ -multirow template_demo_notes \
+ -elements {
+ title {
+ label "Title of Note"
+ }
+ creation_user_name {
+ label "Owner of Note"
+ }
+ creation_date {
+ label "When Note Created"
+ }
+ color {
+ label "Color"
+ }
+ } \
+ -orderby {
+ default_value title,asc
+ title {
+ label "Title of Note"
+ orderby n.title
+ }
+ creation_user_name {
+ label "Owner of Note"
+ orderby creation_user_name
+ }
+ creation_date {
+ label "When Note Created"
+ orderby o.creation_date
+ }
+ color {
+ label "Color"
+ orderby n.color
+ }
+ }
+
+db_multirow template_demo_notes template_demo_notes {}
+
+ad_return_template