Index: openacs-4/packages/attachments/catalog/attachments.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/catalog/attachments.en_US.ISO-8859-1.xml,v
diff -u -r1.18.2.2 -r1.18.2.3
--- openacs-4/packages/attachments/catalog/attachments.en_US.ISO-8859-1.xml 21 Oct 2005 14:07:05 -0000 1.18.2.2
+++ openacs-4/packages/attachments/catalog/attachments.en_US.ISO-8859-1.xml 16 Aug 2006 17:22:31 -0000 1.18.2.3
@@ -8,6 +8,7 @@
Add %pretty_name%
+ Are you sure you want to remove this attachment?
Attach
Attach a <b>new</b>:
This key is going to give problems with word-order for several languages, because the "attach new" grammar is quite specific to English. For example the best translation in Dutch would be "Nieuwe xxxx toevoegen", but we do not know xxxx yet. A work around is to write "Voeg toe nieuw", but depending on what is behind it, grammar requires "Voeg toe nieuwe". So, we get a very forced translation: "Voeg toe nieuw(e)".
@@ -17,8 +18,13 @@
Attach URL
Used as title on page for attaching a URL to an object.
+ Attachment
+ This is the only object this item is attached to. You can choose to delete it from file storage as well.
Choose
+ Delete this attachment from file storage?
Description:
+ Detach
+ Detach file from %object_name%
File
Last Modified
Add Attachment Folder Link
@@ -46,6 +52,9 @@
Name
No such type
Object
+ on Object
+ This item is attached to other objects. You can only remove it from this object but not delete from file storage.
+ remove
Size
Title
Used as label in a form for the title of a new document to attach to an object.
Index: openacs-4/packages/attachments/tcl/attachments-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/tcl/attachments-procs.tcl,v
diff -u -r1.12.6.1 -r1.12.6.2
--- openacs-4/packages/attachments/tcl/attachments-procs.tcl 10 Dec 2005 11:56:45 -0000 1.12.6.1
+++ openacs-4/packages/attachments/tcl/attachments-procs.tcl 16 Aug 2006 17:22:31 -0000 1.12.6.2
@@ -129,6 +129,16 @@
return "${base_url}[attachments::get_url]/go-to-attachment?object_id=$object_id&attachment_id=$attachment_id"
}
+ ad_proc -public detach_url {
+ {-package_id ""}
+ {-object_id:required}
+ {-attachment_id:required}
+ {-base_url ""}
+ {-return_url ""}
+ } {
+ return "${base_url}[attachments::get_url]/detach?object_id=$object_id&attachment_id=$attachment_id&return_url=[ad_urlencode $return_url]"
+ }
+
ad_proc -public graphic_url {
{-package_id ""}
} {
@@ -138,8 +148,9 @@
ad_proc -public get_attachments {
{-object_id:required}
{-base_url ""}
+ {-return_url ""}
} {
- returns a list of attachment ids and names which are approved: {item_id name url}
+ returns a list of attachment ids and names which are approved: {item_id name url detach_url}
} {
set lst [db_list select_attachments {}]
set lst_with_urls [list]
@@ -151,6 +162,7 @@
set label [fs::get_object_prettyname -object_id $item_id]
}
set append_lst [list [goto_attachment_url -object_id $object_id -attachment_id $item_id -base_url $base_url]]
+ lappend append_lst [detach_url -object_id $object_id -attachment_id $item_id -base_url $base_url -return_url $return_url]
lappend lst_with_urls [concat [list $item_id $label] $append_lst]
}
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/attachments/www/detach.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/attachments/www/detach.tcl'.
Fisheye: No comparison available. Pass `N' to diff?