aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/wiki/new.tmpl
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-11-27 01:50:38 -0500
committerUnknwon <u@gogs.io>2015-11-27 01:50:38 -0500
commite42fcb033d4a7ee44fe397be3e933d7031b7d8f7 (patch)
treea203fff39c92f947c4585a746e2345b3ebc67b3c /templates/repo/wiki/new.tmpl
parent392f3ee21016476fb9794f78882d6c447acb8449 (diff)
downloadgitea-e42fcb033d4a7ee44fe397be3e933d7031b7d8f7.tar.gz
gitea-e42fcb033d4a7ee44fe397be3e933d7031b7d8f7.zip
wiki: finish edit
Diffstat (limited to 'templates/repo/wiki/new.tmpl')
-rw-r--r--templates/repo/wiki/new.tmpl11
1 files changed, 9 insertions, 2 deletions
diff --git a/templates/repo/wiki/new.tmpl b/templates/repo/wiki/new.tmpl
index fc556e491d..6a2ce43a58 100644
--- a/templates/repo/wiki/new.tmpl
+++ b/templates/repo/wiki/new.tmpl
@@ -3,16 +3,23 @@
{{template "repo/header" .}}
<div class="ui container">
{{template "repo/sidebar" .}}
+ {{template "base/alert" .}}
<div class="ui header">
{{.i18n.Tr "repo.wiki.new_page"}}
+ {{if .PageIsWikiEdit}}
+ <div class="ui right">
+ <a class="ui green small button" href="{{.RepoLink}}/wiki/_new">{{.i18n.Tr "repo.wiki.new_page_button"}}</a>
+ </div>
+ {{end}}
</div>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
- <div class="field">
+ <input type="hidden" name="old_title" value="{{.old_title}}">
+ <div class="field {{if .Err_Title}}error{{end}}">
<input name="title" value="{{.title}}" autofocus required>
</div>
<div class="field">
- <textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{.i18n.Tr "repo.wiki.welcome"}}</textarea required>
+ <textarea id="edit-area" name="content" data-url="{{AppSubUrl}}/api/v1/markdown" data-context="{{.RepoLink}}">{{if .PageIsWikiEdit}}{{.content}}{{else}}{{.i18n.Tr "repo.wiki.welcome"}}{{end}}</textarea required>
</div>
<div class="field">
<input name="message" placeholder="{{.i18n.Tr "repo.wiki.default_commit_message"}}">