From 0114fdcba40270731d59fe24e8fa6c6147d69e01 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sun, 28 Aug 2016 01:41:44 -0700 Subject: Web editor: improve delete file process --- templates/repo/editor/commit_form.tmpl | 43 +++++++++++++++++++++++++++++++++ templates/repo/editor/delete.tmpl | 12 ++++++++++ templates/repo/editor/edit.tmpl | 44 +--------------------------------- 3 files changed, 56 insertions(+), 43 deletions(-) create mode 100644 templates/repo/editor/commit_form.tmpl create mode 100644 templates/repo/editor/delete.tmpl (limited to 'templates/repo/editor') diff --git a/templates/repo/editor/commit_form.tmpl b/templates/repo/editor/commit_form.tmpl new file mode 100644 index 0000000000..74126ac018 --- /dev/null +++ b/templates/repo/editor/commit_form.tmpl @@ -0,0 +1,43 @@ +
+ +
+

{{.i18n.Tr "repo.editor.commit_changes"}}

+
+ +
+
+ +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + + +
+
+
+
+ + {{.i18n.Tr "repo.editor.cancel"}} +
\ No newline at end of file diff --git a/templates/repo/editor/delete.tmpl b/templates/repo/editor/delete.tmpl new file mode 100644 index 0000000000..a874253079 --- /dev/null +++ b/templates/repo/editor/delete.tmpl @@ -0,0 +1,12 @@ +{{template "base/head" .}} +
+ {{template "repo/header" .}} +
+ {{template "base/alert" .}} +
+ {{.CsrfTokenHtml}} + {{template "repo/editor/commit_form" .}} +
+
+
+{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/repo/editor/edit.tmpl b/templates/repo/editor/edit.tmpl index f6a2393110..377c00bf01 100644 --- a/templates/repo/editor/edit.tmpl +++ b/templates/repo/editor/edit.tmpl @@ -50,49 +50,7 @@ {{.i18n.Tr "repo.release.loading"}} -
- -
-

{{.i18n.Tr "repo.commit_changes"}}

-
- '{{else}}{{.i18n.Tr "repo.update"}} '{{.TreePath}}'{{end}}" value="{{.commit_summary}}"> -
-
- -
-
-
-
- - -
-
-
-
- - -
-
-
-
- - - -
-
-
-
- - {{.i18n.Tr "repo.cancel"}} -
+ {{template "repo/editor/commit_form" .}} -- cgit v1.2.3