add 'delete' option to the edit gui
authorChristian Thaeter <ct@pipapo.org>
Wed, 13 Feb 2008 11:25:24 +0000 (12:25 +0100)
committerChristian Thaeter <ct@pipapo.org>
Wed, 13 Feb 2008 11:25:24 +0000 (12:25 +0100)
src/edit.c

index f8b5b4f..772040c 100644 (file)
@@ -59,7 +59,7 @@ webgit_edit_blob_content_action (struct webgit_repo_info* repo, unsigned char* s
                                html_attr ("method", "post"),
                                html_attr ("action", query->request->script_name)
                                ),
                                html_attr ("method", "post"),
                                html_attr ("action", query->request->script_name)
                                ),
-                     html (html_tag ("p"), "File: (change this for renaming or copying)",
+                     html (html_tag ("p"), "File: (change this for renaming, copying or deleting)<br />",
                            html_hidden ("repo", query->repo),
                            html_hidden ("ref", query->head),
                            html_hidden ("commit", query->commit),
                            html_hidden ("repo", query->repo),
                            html_hidden ("ref", query->head),
                            html_hidden ("commit", query->commit),
@@ -69,7 +69,7 @@ webgit_edit_blob_content_action (struct webgit_repo_info* repo, unsigned char* s
                                            html_attr ("name", "path"),
                                            html_attr ("type", "text"),
                                            html_attr ("maxlen", html_fmt ("%d", PATH_MAX)),
                                            html_attr ("name", "path"),
                                            html_attr ("type", "text"),
                                            html_attr ("maxlen", html_fmt ("%d", PATH_MAX)),
-                                           html_attr ("size", "80"),
+                                           html_attr ("size", "60"),
                                            html_attr ("value", query->path)
                                            )
                                  ),
                                            html_attr ("value", query->path)
                                            )
                                  ),
@@ -88,6 +88,13 @@ webgit_edit_blob_content_action (struct webgit_repo_info* repo, unsigned char* s
                                            )
                                  ),
                            "copy",
                                            )
                                  ),
                            "copy",
+                           html (html_tag ("input",
+                                           html_attr ("name", "mode"),
+                                           html_attr ("type", "radio"),
+                                           html_attr ("value", "delete")
+                                           )
+                                 ),
+                           "delete",
                            !memchr(buf, 0, size>8192 ? 8192 : size) ?
                            html (
 #ifndef ENABLE_CODEPRESS
                            !memchr(buf, 0, size>8192 ? 8192 : size) ?
                            html (
 #ifndef ENABLE_CODEPRESS