summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorSandro Santilli <strk@kbt.io>2016-11-14 17:30:22 +0100
committerSandro Santilli <strk@kbt.io>2016-11-14 18:02:21 +0100
commitcd339263d91ee9fc2ae9d52d17ae7f82e3dac839 (patch)
treea36f81de27d069a2960f7f0d74d317d584055995 /templates
parent81f227eace297269381d80b77ec0e470c5e7902d (diff)
downloadgitea-cd339263d91ee9fc2ae9d52d17ae7f82e3dac839.tar.gz
gitea-cd339263d91ee9fc2ae9d52d17ae7f82e3dac839.zip
Allow updating draft releases while keeping them as draft
Closes #162
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/release/new.tmpl13
1 files changed, 10 insertions, 3 deletions
diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl
index 9f947fa26a..3a9e6fadd8 100644
--- a/templates/repo/release/new.tmpl
+++ b/templates/repo/release/new.tmpl
@@ -64,9 +64,16 @@
<a class="ui blue basic button" href="{{.RepoLink}}/releases">
{{.i18n.Tr "repo.release.cancel"}}
</a>
- <button class="ui green button">
- {{.i18n.Tr "repo.release.edit_release"}}
- </button>
+ {{if .IsDraft}}
+ <input class="ui grey button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
+ <button class="ui green button">
+ {{.i18n.Tr "repo.release.publish"}}
+ </button>
+ {{else}}
+ <button class="ui green button">
+ {{.i18n.Tr "repo.release.edit_release"}}
+ </button>
+ {{end}}
<a class="ui red button delete-button" data-url="{{$.RepoLink}}/releases/delete" data-id="{{.ID}}">
{{$.i18n.Tr "repo.release.delete_release"}}
</a>