Email notify for deleted files now includes the name.
Replaced homebrew 'string_is_whitespace' function with one from the
libraries.
Updated MANIFEST.
Updated deps.
scripts/edit.ml
scripts/edit_contact.ml
scripts/edit_contact_form.ml
+scripts/edit_file.ml
+scripts/edit_file_form.ml
scripts/edit_host_css.ml
scripts/edit_host_css_form.ml
scripts/edit_host_settings.ml
scripts/edit_host_settings_form.ml
+scripts/edit_image.ml
+scripts/edit_image_form.ml
scripts/edit_page_css.ml
scripts/edit_page_css_form.ml
scripts/edit_page_title.ml
templates/edit.html
templates/edit_conflict.html
templates/edit_contact_form.html
+templates/edit_file_form.html
templates/edit_host_css_form.html
templates/edit_host_settings_form.html
+templates/edit_image_form.html
templates/edit_page_css_form.html
templates/edit_page_email.txt
templates/edit_page_title_form.html
lib/cocanwiki_strings.cmx
edit_contact_form.cmo: lib/cocanwiki.cmo lib/cocanwiki_template.cmi
edit_contact_form.cmx: lib/cocanwiki.cmx lib/cocanwiki_template.cmx
+edit_file.cmo: lib/cocanwiki.cmo lib/cocanwiki_emailnotify.cmo \
+ lib/cocanwiki_ok.cmo lib/cocanwiki_strings.cmo
+edit_file.cmx: lib/cocanwiki.cmx lib/cocanwiki_emailnotify.cmx \
+ lib/cocanwiki_ok.cmx lib/cocanwiki_strings.cmx
+edit_file_form.cmo: lib/cocanwiki.cmo lib/cocanwiki_date.cmo \
+ lib/cocanwiki_template.cmi
+edit_file_form.cmx: lib/cocanwiki.cmx lib/cocanwiki_date.cmx \
+ lib/cocanwiki_template.cmx
edit_host_css.cmo: lib/cocanwiki.cmo lib/cocanwiki_ok.cmo \
lib/cocanwiki_strings.cmo
edit_host_css.cmx: lib/cocanwiki.cmx lib/cocanwiki_ok.cmx \
edit_host_settings.cmx: lib/cocanwiki.cmx lib/cocanwiki_ok.cmx
edit_host_settings_form.cmo: lib/cocanwiki.cmo lib/cocanwiki_template.cmi
edit_host_settings_form.cmx: lib/cocanwiki.cmx lib/cocanwiki_template.cmx
+edit_image.cmo: lib/cocanwiki.cmo lib/cocanwiki_emailnotify.cmo \
+ lib/cocanwiki_ok.cmo lib/cocanwiki_strings.cmo
+edit_image.cmx: lib/cocanwiki.cmx lib/cocanwiki_emailnotify.cmx \
+ lib/cocanwiki_ok.cmx lib/cocanwiki_strings.cmx
+edit_image_form.cmo: lib/cocanwiki.cmo lib/cocanwiki_date.cmo \
+ lib/cocanwiki_template.cmi
+edit_image_form.cmx: lib/cocanwiki.cmx lib/cocanwiki_date.cmx \
+ lib/cocanwiki_template.cmx
edit_page_css.cmo: lib/cocanwiki.cmo lib/cocanwiki_diff.cmi \
lib/cocanwiki_emailnotify.cmo lib/cocanwiki_ok.cmo \
lib/cocanwiki_strings.cmo
undelete_image_form.cmo: lib/cocanwiki.cmo lib/cocanwiki_template.cmi
undelete_image_form.cmx: lib/cocanwiki.cmx lib/cocanwiki_template.cmx
upload_file.cmo: lib/cocanwiki.cmo lib/cocanwiki_emailnotify.cmo \
- lib/cocanwiki_images.cmi lib/cocanwiki_ok.cmo lib/cocanwiki_template.cmi
+ lib/cocanwiki_images.cmi lib/cocanwiki_ok.cmo lib/cocanwiki_strings.cmo \
+ lib/cocanwiki_template.cmi
upload_file.cmx: lib/cocanwiki.cmx lib/cocanwiki_emailnotify.cmx \
- lib/cocanwiki_images.cmx lib/cocanwiki_ok.cmx lib/cocanwiki_template.cmx
+ lib/cocanwiki_images.cmx lib/cocanwiki_ok.cmx lib/cocanwiki_strings.cmx \
+ lib/cocanwiki_template.cmx
upload_file_form.cmo: lib/cocanwiki.cmo lib/cocanwiki_template.cmi
upload_file_form.cmx: lib/cocanwiki.cmx lib/cocanwiki_template.cmx
upload_image.cmo: lib/cocanwiki.cmo lib/cocanwiki_emailnotify.cmo \
- lib/cocanwiki_images.cmi lib/cocanwiki_ok.cmo
+ lib/cocanwiki_images.cmi lib/cocanwiki_ok.cmo lib/cocanwiki_strings.cmo
upload_image.cmx: lib/cocanwiki.cmx lib/cocanwiki_emailnotify.cmx \
- lib/cocanwiki_images.cmx lib/cocanwiki_ok.cmx
+ lib/cocanwiki_images.cmx lib/cocanwiki_ok.cmx lib/cocanwiki_strings.cmx
upload_image_form.cmo: lib/cocanwiki.cmo lib/cocanwiki_template.cmi
upload_image_form.cmx: lib/cocanwiki.cmx lib/cocanwiki_template.cmx
user_prefs.cmo: lib/cocanwiki.cmo lib/cocanwiki_ok.cmo \
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: delete_file.ml,v 1.7 2004/10/21 19:54:29 rich Exp $
+ * $Id: delete_file.ml,v 1.8 2004/11/01 17:05:14 rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
let id = int_of_string (q#param "id") in
if q#param_true "yes" then (
+ (* Get the name. *)
+ let sth = dbh#prepare_cached "select coalesce (name, name_deleted)
+ from files
+ where hostid = ? and id = ?" in
+ sth#execute [`Int hostid; `Int id];
+ let name = sth#fetch1string () in
+
(* Delete the file. *)
let sth = dbh#prepare_cached "update files
set name_deleted = name, name = null
dbh#commit ();
(* Email notify. *)
- let subject = "File #" ^ string_of_int id ^ " has been deleted." in
+ let subject = "File " ^ name ^ "#" ^ string_of_int id ^
+ " has been deleted." in
let body = fun () ->
"Page: http://" ^ hostname ^ "/_files?deleted=1" in
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: delete_image.ml,v 1.7 2004/10/21 19:54:29 rich Exp $
+ * $Id: delete_image.ml,v 1.8 2004/11/01 17:05:14 rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
let id = int_of_string (q#param "id") in
if q#param_true "yes" then (
+ (* Get the name. *)
+ let sth = dbh#prepare_cached "select coalesce (name, name_deleted)
+ from images
+ where hostid = ? and id = ?" in
+ sth#execute [`Int hostid; `Int id];
+ let name = sth#fetch1string () in
+
(* Delete the image. *)
let sth = dbh#prepare_cached "update images
set name_deleted = name, name = null
dbh#commit ();
(* Email notify. *)
- let subject = "Image #" ^ string_of_int id ^ " has been deleted." in
+ let subject = "Image " ^ name ^ "#" ^ string_of_int id ^
+ " has been deleted." in
let body = fun () ->
"Page: http://" ^ hostname ^ "/_images?deleted=1" in
email_notify ~body ~subject ~user dbh hostid;
+
(* Done. *)
let buttons = [ ok_button "/_images" ] in
ok ~title:"Image deleted" ~buttons
--- /dev/null
+(* COCANWIKI - a wiki written in Objective CAML.
+ * Written by Richard W.M. Jones <rich@merjis.com>.
+ * Copyright (C) 2004 Merjis Ltd.
+ * $Id: edit_file.ml,v 1.1 2004/11/01 17:05:14 rich Exp $
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *)
+
+open Apache
+open Registry
+open Cgi
+open Printf
+
+open Cocanwiki
+open Cocanwiki_ok
+open Cocanwiki_strings
+open Cocanwiki_emailnotify
+
+let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user =
+ let id = int_of_string (q#param "id") in
+
+ (* Get the fields. *)
+ let title = q#param "title" in
+
+ let title = if string_is_whitespace title then `Null else `String title in
+
+ (* Edit it. *)
+ let sth = dbh#prepare_cached "update files set title = ?
+ where hostid = ? and id = ?
+ and name is not null" in
+ sth#execute [title; `Int hostid; `Int id];
+
+ (* Email notify. *)
+ let subject = "Description fields on file #" ^
+ string_of_int id ^ " where changed." in
+ let body = fun () -> "Page: http://" ^ hostname ^ "/_files" in
+
+ email_notify ~body ~subject ~user dbh hostid;
+
+ (* Done it. *)
+ dbh#commit ();
+
+ let buttons = [ ok_button "/_files" ] in
+ ok ~title:"Description fields updated" ~buttons
+ q "The description fields were updated."
+
+let () =
+ register_script ~restrict:[CanEdit] run
--- /dev/null
+(* COCANWIKI - a wiki written in Objective CAML.
+ * Written by Richard W.M. Jones <rich@merjis.com>.
+ * Copyright (C) 2004 Merjis Ltd.
+ * $Id: edit_file_form.ml,v 1.1 2004/11/01 17:05:14 rich Exp $
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *)
+
+open Apache
+open Registry
+open Cgi
+open Printf
+
+open Cocanwiki
+open Cocanwiki_template
+open Cocanwiki_date
+
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
+ let template = get_template dbh hostid "edit_file_form.html" in
+
+ let id = int_of_string (q#param "id") in
+
+ let sth = dbh#prepare_cached "select name, coalesce (title, ''),
+ mime_type,
+ upload_date
+ from files
+ where hostid = ? and id = ?" in
+ sth#execute [`Int hostid; `Int id];
+
+ let name, title, mime_type, upload_date =
+ match sth#fetch1 () with
+ [ `String name; `String title; `String mime_type;
+ `Timestamp upload_date ] ->
+ name, title, mime_type, upload_date
+ | _ -> assert false in
+
+ template#set "id" (string_of_int id);
+ template#set "name" name;
+ template#set "title" title;
+ template#set "mime_type" mime_type;
+ template#set "upload_date" (printable_date upload_date);
+
+ q#template template
+
+let () =
+ register_script ~restrict:[CanEdit] run
--- /dev/null
+(* COCANWIKI - a wiki written in Objective CAML.
+ * Written by Richard W.M. Jones <rich@merjis.com>.
+ * Copyright (C) 2004 Merjis Ltd.
+ * $Id: edit_image.ml,v 1.1 2004/11/01 17:05:14 rich Exp $
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *)
+
+open Apache
+open Registry
+open Cgi
+open Printf
+
+open Cocanwiki
+open Cocanwiki_ok
+open Cocanwiki_strings
+open Cocanwiki_emailnotify
+
+let run r (q : cgi) (dbh : Dbi.connection) hostid {hostname = hostname} user =
+ let id = int_of_string (q#param "id") in
+
+ (* Get the fields. *)
+ let alt = q#param "alt" in
+ let title = q#param "title" in
+ let longdesc = q#param "longdesc" in
+ let clazz = q#param "class" in
+
+ (* Check some ALT text was supplied. *)
+ if string_is_whitespace alt then (
+ error ~title:"Missing Alt text" ~back_button:true
+ q ("You must supply Alt text describing the image. This is required " ^
+ "by accessibility laws and to allow search engines to discover the " ^
+ "content of images.");
+ return ()
+ );
+
+ let title = if string_is_whitespace title then `Null else `String title in
+ let longdesc =
+ if string_is_whitespace longdesc then `Null else `String longdesc in
+ let clazz = if string_is_whitespace clazz then `Null else `String clazz in
+
+ (* Edit it. *)
+ let sth = dbh#prepare_cached "update images set alt = ?, title = ?,
+ longdesc = ?, class = ?
+ where hostid = ? and id = ?
+ and name is not null" in
+ sth#execute [`String alt; title; longdesc; clazz;
+ `Int hostid; `Int id];
+
+ (* Email notify. *)
+ let subject = "Description fields on image #" ^
+ string_of_int id ^ " where changed." in
+ let body = fun () -> "Page: http://" ^ hostname ^ "/_images" in
+
+ email_notify ~body ~subject ~user dbh hostid;
+
+ (* Done it. *)
+ dbh#commit ();
+
+ let buttons = [ ok_button "/_images" ] in
+ ok ~title:"Description fields updated" ~buttons
+ q "The description fields were updated."
+
+let () =
+ register_script ~restrict:[CanEdit] run
--- /dev/null
+(* COCANWIKI - a wiki written in Objective CAML.
+ * Written by Richard W.M. Jones <rich@merjis.com>.
+ * Copyright (C) 2004 Merjis Ltd.
+ * $Id: edit_image_form.ml,v 1.1 2004/11/01 17:05:14 rich Exp $
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *)
+
+open Apache
+open Registry
+open Cgi
+open Printf
+
+open Cocanwiki
+open Cocanwiki_template
+open Cocanwiki_date
+
+let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
+ let template = get_template dbh hostid "edit_image_form.html" in
+
+ let id = int_of_string (q#param "id") in
+
+ let sth = dbh#prepare_cached "select name, alt, coalesce (title, ''),
+ coalesce (longdesc, ''),
+ coalesce (class, ''),
+ mime_type,
+ coalesce (tn_width, 0),
+ coalesce (tn_height, 0),
+ upload_date
+ from images
+ where hostid = ? and id = ?" in
+ sth#execute [`Int hostid; `Int id];
+
+ let name, alt, title, longdesc, clazz, mime_type, tn_width, tn_height,
+ upload_date =
+ match sth#fetch1 () with
+ [ `String name; `String alt; `String title; `String longdesc;
+ `String clazz; `String mime_type; `Int tn_width; `Int tn_height;
+ `Timestamp upload_date ] ->
+ name, alt, title, longdesc, clazz, mime_type, tn_width, tn_height,
+ upload_date
+ | _ -> assert false in
+
+ template#set "id" (string_of_int id);
+ template#set "name" name;
+ template#set "alt" alt;
+ template#set "title" title;
+ template#set "longdesc" longdesc;
+ template#set "class" clazz;
+ template#set "mime_type" mime_type;
+ template#set "tn_width" (string_of_int tn_width);
+ template#set "tn_height" (string_of_int tn_height);
+ template#set "upload_date" (printable_date upload_date);
+
+ q#template template
+
+let () =
+ register_script ~restrict:[CanEdit] run
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: upload_file.ml,v 1.9 2004/11/01 16:24:50 rich Exp $
+ * $Id: upload_file.ml,v 1.10 2004/11/01 17:05:14 rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
open Cocanwiki_ok
open Cocanwiki_emailnotify
open Cocanwiki_images
-
-let is_ws_re = Pcre.regexp "^\\s*$"
-let is_whitespace str = Pcre.pmatch ~rex:is_ws_re str
+open Cocanwiki_strings
(* Valid file names. *)
let file_ok_re = Pcre.regexp "^[a-z0-9][-._a-z0-9]*$"
(* Identify the MIME type from the extension. *)
let mime_type = mime_type_of_filename name in
- let title = if is_whitespace title then `Null else `String title in
+ let title = if string_is_whitespace title then `Null else `String title in
(* Check if something with the same name already exists. If replace=1
* then we can replace it, otherwise we must present an error message.
(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: upload_image.ml,v 1.10 2004/11/01 16:24:50 rich Exp $
+ * $Id: upload_image.ml,v 1.11 2004/11/01 17:05:14 rich Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
open Cocanwiki_ok
open Cocanwiki_emailnotify
open Cocanwiki_images
-
-let is_ws_re = Pcre.regexp "^\\s*$"
-let is_whitespace str = Pcre.pmatch ~rex:is_ws_re str
+open Cocanwiki_strings
(* Valid image names. *)
let image_ok_re = Pcre.regexp "^[a-z0-9][-._a-z0-9]*\\.(jpg|jpeg|gif|ico|png)$"
);
(* Check some ALT text was supplied. *)
- if is_whitespace alt then (
+ if string_is_whitespace alt then (
error ~title:"Missing Alt text" ~back_button:true
q ("You must supply Alt text describing the image. This is required " ^
"by accessibility laws and to allow search engines to discover the " ^
return ()
);
- let title = if is_whitespace title then `Null else `String title in
- let longdesc = if is_whitespace longdesc then `Null else `String longdesc in
- let clazz = if is_whitespace clazz then `Null else `String clazz in
+ let title = if string_is_whitespace title then `Null else `String title in
+ let longdesc =
+ if string_is_whitespace longdesc then `Null else `String longdesc in
+ let clazz = if string_is_whitespace clazz then `Null else `String clazz in
(* Make a thumbnail of this image. *)
let thumbnail, tn_mime_type, tn_width, tn_height =
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>Edit description fields</title>
+<meta name="author" content="http://www.merjis.com/" />
+<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
+</head><body>
+
+<h1><span>Edit description fields</span></h1>
+
+<form method="post" action="edit_file.cmo">
+<input type="hidden" name="id" value="::id::"/>
+
+<table class="left_table">
+<tr>
+<th> File: </th>
+<td> <img src="/_graphics/file.png" border="0" width="20" height="22" alt="File icon" /> ::name_html:: </td>
+</tr>
+
+<tr>
+<th> Title: </th>
+<td> <input name="title" value="::title_html_tag::" size="70" /> </td>
+</tr>
+
+<tr>
+<td></td>
+<td><input type="submit" value="Save changes" /></td>
+</tr>
+
+</table>
+
+</form>
+
+::include(footer.html)::
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>Edit description fields</title>
+<meta name="author" content="http://www.merjis.com/" />
+<link rel="stylesheet" href="::theme_css_html_tag::" type="text/css" title="Standard"/>
+<link rel="alternate stylesheet" href="/_css/easytoread.css" type="text/css" title="High contrast, big fonts"/>
+</head><body>
+
+<h1><span>Edit description fields</span></h1>
+
+<form method="post" action="edit_image.cmo">
+<input type="hidden" name="id" value="::id::"/>
+
+<table class="left_table">
+<tr>
+<th> Image: </th>
+<td> <img src="/_image/::name_html_tag::?thumbnail=1&version=::id::" width="::tn_width::" height="::tn_height::" alt="::alt_html_tag::" title="Thumbnail of ::name_html_tag::."/> ::name_html:: </td>
+</tr>
+
+<tr>
+<th> Alt text: </th>
+<td> <input name="alt" value="::alt_html_tag::" size="70" /> </td>
+</tr>
+
+<tr>
+<th> Title: </th>
+<td> <input name="title" value="::title_html_tag::" size="70" /> </td>
+</tr>
+
+<tr>
+<th> Longdesc: </th>
+<td> <textarea name="longdesc" rows="5" cols="80">::longdesc_html_textarea::</textarea> </td>
+</tr>
+
+<tr>
+<th> Class: </th>
+<td> <input name="class" value="::class_html_tag::" size="20" /> </td>
+</tr>
+
+<tr>
+<td></td>
+<td><input type="submit" value="Save changes" /></td>
+</tr>
+
+</table>
+
+</form>
+
+::include(footer.html)::
+</body>
+</html>
\ No newline at end of file
::if(is_deleted)::
<li class="first"><a href="/_bin/undelete_file_form.cmo?id=::id_url::">Restore</a></li>
::else::
-<li class="first"><a href="/_bin/edit_file_form.cmo?id=::id_url::">Edit</a> </li>
-<li><a href="/_bin/upload_file_form.cmo?id=::id_url::&replace=1">Replace</a> </li>
+<li class="first"><a href="/_bin/edit_file_form.cmo?id=::id_url::">Edit description fields</a> </li>
+<li><a href="/_bin/upload_file_form.cmo?id=::id_url::&replace=1">Replace file</a> </li>
<li><a href="/_bin/delete_file_form.cmo?id=::id_url::">Delete</a></li>
::end::
</ul>
::if(is_deleted)::
<li class="first"><a href="/_bin/undelete_image_form.cmo?id=::id_url::">Restore</a></li>
::else::
-<li class="first"><a href="/_bin/edit_image_form.cmo?id=::id_url::">Edit</a></li>
-<li><a href="/_bin/upload_image_form.cmo?id=::id_url::&replace=1">Replace</a></li>
+<li class="first"><a href="/_bin/edit_image_form.cmo?id=::id_url::">Edit description fields</a></li>
+<li><a href="/_bin/upload_image_form.cmo?id=::id_url::&replace=1">Replace image</a></li>
<li><a href="/_bin/delete_image_form.cmo?id=::id_url::">Delete</a></li>
::end::
</ul>