- @resources.resource_title@ @resources.resource_description@
+ @resources.resource_title@ @resources.resource_description@
@@ -51,7 +51,7 @@
By @types.type_name@
Index: openacs-4/contrib/packages/resource-list/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/resource-list/www/index.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/resource-list/www/index.tcl 20 Feb 2004 01:11:53 -0000 1.2
+++ openacs-4/contrib/packages/resource-list/www/index.tcl 2 Mar 2004 21:32:32 -0000 1.3
@@ -29,7 +29,7 @@
write_p:onevalue
create_p:onevalue
admin_p:onevalue
-
+ url:onevalue
}
# --------------------------------------------------------------- #
@@ -54,6 +54,7 @@
# the unique identifier for this package
set package_id [ad_conn package_id]
set user_id [ad_verify_and_get_user_id]
+set url [ad_conn package_url]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
Index: openacs-4/contrib/packages/resource-list/www/one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/resource-list/www/one.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/packages/resource-list/www/one.adp 20 Feb 2004 01:11:53 -0000 1.3
+++ openacs-4/contrib/packages/resource-list/www/one.adp 2 Mar 2004 21:32:32 -0000 1.4
@@ -27,7 +27,7 @@
Categories:
Index: openacs-4/contrib/packages/resource-list/www/one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/resource-list/www/one.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/resource-list/www/one.tcl 20 Feb 2004 01:11:53 -0000 1.2
+++ openacs-4/contrib/packages/resource-list/www/one.tcl 2 Mar 2004 21:32:32 -0000 1.3
@@ -11,10 +11,10 @@
@return resources Multirow data set of resources.
} {
- resource_item_id:integer
+ resource_item_id:integer,multiple
} -properties {
-
+ url:onevalue
context_bar:onevalue
res:multirow
create:multirow
@@ -28,17 +28,25 @@
# --------------------------------------------------------------- #
+if {[llength $resource_item_id] > 1} {
+ set resource_item_id [lindex $resource_item_id 0]
+}
+
# set up context bar
set context_bar [ad_context_bar "View"]
# the unique identifier for this package
set package_id [ad_conn package_id]
set user_id [ad_verify_and_get_user_id]
+set url [ad_conn package_url]
-db_1row res_query {} -column_array res
+if {![db_0or1row res_query {} -column_array res]} {
+ ad_return_forbidden "No such resource" "There is no such resource. If you believe this is erroneous, please contact the system administrator"
+ ad_script_abort
+}
-set edit_link "add-edit?resource_revision_id=$res(resource_revision_id)"
+set edit_link "[set url]add-edit?resource_revision_id=$res(resource_revision_id)"
set res(resource_description) [ad_text_to_html $res(resource_description)]
@@ -60,9 +68,9 @@
db_1row create_query {} -column_array create
-set comments [general_comments_get_comments -print_content_p 1 $res(resource_item_id) "[ad_conn url]?resource_item_id=$res(resource_item_id)"]
+set comments [general_comments_get_comments -print_content_p 1 $res(resource_item_id) "[set url]view/$res(resource_item_id)"]
-set comments_link [general_comments_create_link -object_name resource-list -link_text "Comment on this resource" -context_id $package_id $res(resource_item_id) "[ad_conn url]?resource_item_id=$resource_item_id"]
+set comments_link [general_comments_create_link -object_name resource-list -link_text "Comment on this resource" -context_id $package_id $res(resource_item_id) "[set url]view/$resource_item_id"]
db_multirow cats get_categories { }
Index: openacs-4/contrib/packages/resource-list/www/type-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/resource-list/www/type-add-edit.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/resource-list/www/type-add-edit.tcl 20 Feb 2004 01:11:53 -0000 1.2
+++ openacs-4/contrib/packages/resource-list/www/type-add-edit.tcl 2 Mar 2004 21:32:32 -0000 1.3
@@ -93,14 +93,17 @@
db_foreach get_category_items { } {
lappend options [list $short_name $category_id]
}
- ad_form -extend -name add_edit -form \
- [list \
- [list \
+
+ set select_name "Select: $type_short_name"
+
+ ad_form -extend -name add_edit -form \
+ [list \
+ [list \
categories:text(checkbox),multiple \
- {label "Select: [set type_short_name]"} \
- {options [list $options]} \
- {values $categories} \
- ] \
- ]
+ {label $selectname} \
+ {options [list $options]} \
+ {values $categories} \
+ ] \
+ ]
}
Index: openacs-4/contrib/packages/resource-list/www/view.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/resource-list/www/view.vuh,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/resource-list/www/view.vuh 2 Mar 2004 21:32:32 -0000 1.1
@@ -0,0 +1,18 @@
+# Transform requests of type: a/b
+# into this internal request: A?c=b
+# for example, note/495 > note-edit?item_id=496
+# a: base name of this .vuh file
+# b: from the request
+# A: hard-coded
+# C: hard-coded
+
+set query [ad_conn url]
+
+set request [string range $query [expr [string last / $query] + 1] end]
+
+rp_form_put resource_item_id $request
+
+set internal_path "/packages/[ad_conn package_key]/www/one"
+
+rp_internal_redirect $internal_path
+
|