Here is a printer-friendly version of the presentation.
-
-@page_signature@
Index: openacs-4/packages/wp-slim/www/serve-presentation.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/wp-slim/www/serve-presentation.tcl 21 Sep 2002 17:09:10 -0000 1.3
+++ openacs-4/packages/wp-slim/www/serve-presentation.tcl 21 May 2003 15:31:03 -0000 1.3.2.1
@@ -24,6 +24,9 @@
ad_return_error "Wimpy Point" "Could not get a pres_item_id and slide_item_id out of url=$url"
}
+#added permission checking roc@
+set user_id [ad_verify_and_get_user_id]
+permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_view_presentation
set subsite_name [ad_conn package_url]
regexp {^(.+)/$} $subsite_name match subsite_name
@@ -37,12 +40,7 @@
and exists (select 1 from cr_wp_slides s where s.slide_id=cr_items.live_revision and s.sort_key=1)
}
-db_1row get_presentation_info {
- select p.pres_title, p.page_signature
- from cr_wp_presentations p, cr_items i
- where i.item_id = :pres_item_id
- and i.live_revision = p.presentation_id
-}
+db_1row get_presentation_info { *SQL* }
db_1row get_owner_name {
select first_names || ' ' || last_name as owner_name, person_id as owner_id
@@ -59,4 +57,13 @@
order by s.sort_key
"
+set users_list [list]
+db_multirow collaborators get_collaborators { *SQL* } {
+ if {[lsearch $users_list $person_id] != -1} {
+ continue
+ }
+ lappend users_list $person_id
+}
+
+
ad_return_template
Index: openacs-4/packages/wp-slim/www/serve-presentation.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation.xql,v
diff -u -r1.1 -r1.1.4.1
--- openacs-4/packages/wp-slim/www/serve-presentation.xql 4 Oct 2001 04:29:01 -0000 1.1
+++ openacs-4/packages/wp-slim/www/serve-presentation.xql 21 May 2003 15:31:03 -0000 1.1.4.1
@@ -17,7 +17,7 @@
- select p.pres_title, p.page_signature
+ select p.pres_title, p.page_signature, p.style, p.copyright_notice
from cr_wp_presentations p, cr_items i
where i.item_id = :pres_item_id
and i.live_revision = p.presentation_id
@@ -50,5 +50,26 @@
+
+
+
+
+ select p.person_id,
+ p.first_names || ' ' || p.last_name as full_name,
+ perm.privilege
+ from persons p,
+ acs_permissions perm
+ where perm.object_id = :pres_item_id
+ and perm.grantee_id <> :owner_id
+ and perm.grantee_id = p.person_id
+ and
+ ( perm.privilege = 'wp_edit_presentation'
+ or perm.privilege = 'wp_admin_presentation'
+ )
+ order by p.person_id, perm.privilege ASC
+
+
+
+
Index: openacs-4/packages/wp-slim/www/serve-slide-revision.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide-revision.adp,v
diff -u -r1.4 -r1.4.2.1
--- openacs-4/packages/wp-slim/www/serve-slide-revision.adp 6 Sep 2002 21:51:10 -0000 1.4
+++ openacs-4/packages/wp-slim/www/serve-slide-revision.adp 21 May 2003 15:31:03 -0000 1.4.2.1
@@ -1,6 +1,9 @@
-
+@slide_title@@context@
+@style@
+@page_signature@
+@copyright_notice@Last modified @modified_date@
@@ -84,4 +87,4 @@
-@page_signature@
\ No newline at end of file
+@page_signature@
Index: openacs-4/packages/wp-slim/www/serve-slide-revision.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide-revision.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/wp-slim/www/serve-slide-revision.tcl 6 Sep 2002 15:32:23 -0000 1.3
+++ openacs-4/packages/wp-slim/www/serve-slide-revision.tcl 21 May 2003 15:31:03 -0000 1.3.2.1
@@ -31,6 +31,9 @@
ad_return_error "Wimpy Point" "Could not get a pres_item_id, slide_item_id and slide_revision_id out of url=$url"
}
+#added permission checking roc@
+set user_id [ad_verify_and_get_user_id]
+permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_view_presentation
set subsite_name [ad_conn package_url]
regexp {^(.+)/$} $subsite_name match subsite_name
Index: openacs-4/packages/wp-slim/www/serve-slide-revision.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide-revision.xql,v
diff -u -r1.2 -r1.2.4.1
--- openacs-4/packages/wp-slim/www/serve-slide-revision.xql 15 Nov 2001 01:47:13 -0000 1.2
+++ openacs-4/packages/wp-slim/www/serve-slide-revision.xql 21 May 2003 15:31:03 -0000 1.2.4.1
@@ -5,7 +5,9 @@
select p.page_signature,
- p.show_modified_p
+ p.copyright_notice,
+ p.show_modified_p,
+ p.style
from cr_wp_presentations p, cr_items i
where i.item_id = :pres_item_id
and i.live_revision = p.presentation_id
Index: openacs-4/packages/wp-slim/www/serve-slide.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.adp,v
diff -u -r1.6.2.1 -r1.6.2.2
--- openacs-4/packages/wp-slim/www/serve-slide.adp 27 Jan 2003 11:39:27 -0000 1.6.2.1
+++ openacs-4/packages/wp-slim/www/serve-slide.adp 21 May 2003 15:31:03 -0000 1.6.2.2
@@ -1,6 +1,9 @@
@slide_title@@context@
+@style@
+@page_signature@
+@copyright_notice@
@@ -94,3 +97,23 @@
@page_signature@
+
+
+
+
Slide Comments
+@comments@
+
+
+
+
+
+
+
+
+
+
+@comment_link@
+
+
+
+
Index: openacs-4/packages/wp-slim/www/serve-slide.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.tcl,v
diff -u -r1.5 -r1.5.2.1
--- openacs-4/packages/wp-slim/www/serve-slide.tcl 6 Sep 2002 15:32:23 -0000 1.5
+++ openacs-4/packages/wp-slim/www/serve-slide.tcl 21 May 2003 15:31:03 -0000 1.5.2.1
@@ -29,7 +29,19 @@
ad_return_error "Wimpy Point" "Could not get a pres_item_id and slide_item_id out of url=$url"
}
+#added permission checking roc@
+set user_id [ad_verify_and_get_user_id]
+permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_view_presentation
+set edit_p 0
+if {[permission::permission_p -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation]} {
+ set edit_p 1
+}
+set delete_p 0
+if {[permission::permission_p -party_id $user_id -object_id $pres_item_id -privilege wp_delete_presentation]} {
+ set delete_p 1
+}
+
set subsite_name [ad_conn package_url]
regexp {^(.+)/$} $subsite_name match subsite_name
#set pkg_key [ad_conn package_key]
@@ -48,13 +60,7 @@
and ao.object_id = s.slide_id
}
-db_1row get_presentation_page_signature {
- select p.page_signature,
- p.show_modified_p
- from cr_wp_presentations p, cr_items i
- where i.item_id = :pres_item_id
- and i.live_revision = p.presentation_id
-}
+db_1row get_presentation_page_signature { *SQL* }
set context [list [list "$subsite_name/display/$pres_item_id" "one presentation"] "one slide"]
@@ -90,10 +96,8 @@
if {$sort_key == 1} {
# this is the only slide.
set href_back ""
- set href_forward "top"
- } else {
- set href_forward {}
}
+ set href_forward "top"
} else {
set href_forward "next"
}
@@ -107,5 +111,22 @@
and i.live_revision = x.attach_id
}
-set href_back_forward "$href_back $href_forward"
+set extra ""
+if {$edit_p == 1} {
+ append extra "edit | "
+}
+if {$delete_p == 1} {
+ append extra "delete |"
+}
+
+set href_back_forward "$href_back $extra $href_forward"
+
+
+#comments capability added roc@
+if {$edit_p == 1 || $show_comments_p == "t"} {
+ set comment_link [general_comments_create_link $slide_item_id $url]
+ set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 \
+ $slide_item_id $url]
+}
+
ad_return_template serve-slide
Index: openacs-4/packages/wp-slim/www/serve-slide.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.xql,v
diff -u -r1.2 -r1.2.4.1
--- openacs-4/packages/wp-slim/www/serve-slide.xql 15 Nov 2001 01:47:13 -0000 1.2
+++ openacs-4/packages/wp-slim/www/serve-slide.xql 21 May 2003 15:31:03 -0000 1.2.4.1
@@ -5,7 +5,10 @@
select p.page_signature,
- p.show_modified_p
+ p.copyright_notice,
+ p.show_modified_p,
+ p.style,
+ p.show_comments_p
from cr_wp_presentations p, cr_items i
where i.item_id = :pres_item_id
and i.live_revision = p.presentation_id
Index: openacs-4/packages/wp-slim/www/slide-publish.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-publish.tcl,v
diff -u -r1.1.1.1 -r1.1.1.1.4.1
--- openacs-4/packages/wp-slim/www/slide-publish.tcl 20 Apr 2001 20:51:24 -0000 1.1.1.1
+++ openacs-4/packages/wp-slim/www/slide-publish.tcl 21 May 2003 15:31:03 -0000 1.1.1.1.4.1
@@ -10,8 +10,13 @@
} {
revision_id:naturalnum,notnull
return_url:notnull
+ pres_item_id:notnull
}
+#added permission checking roc@
+set user_id [ad_verify_and_get_user_id]
+permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation
+
db_exec_plsql live_revision_set {
declare
v_revision_id cr_revisions.revision_id%TYPE;
@@ -35,4 +40,4 @@
end;
}
-ad_returnredirect $return_url
\ No newline at end of file
+ad_returnredirect $return_url
Index: openacs-4/packages/wp-slim/www/slide-revisions.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-revisions.adp,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/wp-slim/www/slide-revisions.adp 6 Sep 2002 21:51:10 -0000 1.3
+++ openacs-4/packages/wp-slim/www/slide-revisions.adp 21 May 2003 15:31:03 -0000 1.3.2.1
@@ -14,7 +14,7 @@
Created by @revisions.full_name@ from @revisions.creation_ip@ at @revisions.creation_date@ (view)
-Created by @revisions.full_name@ from @revisions.creation_ip@ at @revisions.creation_date@ (view | go live)
+Created by @revisions.full_name@ from @revisions.creation_ip@ at @revisions.creation_date@ (view | go live)
Index: openacs-4/packages/wp-slim/www/slide-revisions.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-revisions.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/wp-slim/www/slide-revisions.tcl 6 Sep 2002 15:32:23 -0000 1.3
+++ openacs-4/packages/wp-slim/www/slide-revisions.tcl 21 May 2003 15:31:03 -0000 1.3.2.1
@@ -16,7 +16,11 @@
subsite_name
}
+#added permission checking roc@
+set user_id [ad_verify_and_get_user_id]
+permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation
+
set subsite_name [ad_conn package_url]
set context [list [list "presentation-top?[export_url_vars pres_item_id]" "Presentation"] "Slide Revisions"]
Index: openacs-4/packages/wp-slim/www/slides-reorder-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slides-reorder-2.tcl,v
diff -u -r1.2 -r1.2.4.1
--- openacs-4/packages/wp-slim/www/slides-reorder-2.tcl 4 Oct 2001 04:29:01 -0000 1.2
+++ openacs-4/packages/wp-slim/www/slides-reorder-2.tcl 21 May 2003 15:31:03 -0000 1.2.4.1
@@ -12,6 +12,10 @@
}
+#added permission checking roc@
+set user_id [ad_verify_and_get_user_id]
+permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation
+
# Just iterate over the values for slide_id in order and set their respective
# sort_keys to 1, 2, 3, ...
set counter 0
Index: openacs-4/packages/wp-slim/www/slides-reorder.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slides-reorder.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/wp-slim/www/slides-reorder.tcl 6 Sep 2002 15:32:23 -0000 1.3
+++ openacs-4/packages/wp-slim/www/slides-reorder.tcl 21 May 2003 15:31:03 -0000 1.3.2.1
@@ -14,6 +14,10 @@
}
+#added permission checking roc@
+set user_id [ad_verify_and_get_user_id]
+permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation
+
set header [ad_header "Reorder Slides"]
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete-2-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete-2-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete-2.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit-2.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit-2.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-add.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-add.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-delete-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-delete-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-delete.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-view.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-view.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-view.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/toggle-comments-view.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/toggle-comments-view.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/wp-slim/www/upload-attachments.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/upload-attachments.adp,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/wp-slim/www/upload-attachments.adp 6 Sep 2002 21:51:10 -0000 1.3
+++ openacs-4/packages/wp-slim/www/upload-attachments.adp 21 May 2003 15:31:03 -0000 1.3.2.1
@@ -9,19 +9,14 @@
+Note: this is not a complete list of the users.
+Users who are collaborators on
+presentations owned by others are excluded. Users who have created
+only private presentations are excluded.
Index: openacs-4/packages/wp-slim/www/users.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/users.tcl,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/wp-slim/www/users.tcl 6 Sep 2002 15:32:23 -0000 1.3
+++ openacs-4/packages/wp-slim/www/users.tcl 21 May 2003 15:31:03 -0000 1.3.2.1
@@ -32,11 +32,6 @@
group by p.person_id, p.first_names, p.last_name, parties.email
}
-set footer "Note: this is not a complete list of the users.
-Users who are collaborators on
-presentations owned by others are excluded. Users who have created
-only private presentations are excluded.
-[ad_footer]"
ad_return_template
Index: openacs-4/packages/wp-slim/www/wp-presentation-master.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/wp-presentation-master.adp,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/wp-slim/www/wp-presentation-master.adp 27 Jan 2003 11:39:27 -0000 1.1.2.1
+++ openacs-4/packages/wp-slim/www/wp-presentation-master.adp 21 May 2003 15:31:03 -0000 1.1.2.2
@@ -1,16 +1,20 @@