forgejo-federation/templates/repo/release/edit.tmpl

59 lines
3.8 KiB
Cheetah
Raw Normal View History

2014-12-11 03:07:54 +05:30
{{template "ng/base/head" .}}
{{template "ng/base/header" .}}
<div id="repo-wrapper">
2015-07-24 02:20:05 +05:30
{{template "repo/header_old" .}}
2014-12-11 03:07:54 +05:30
<div id="repo-content" class="clear container">
<div id="repo-main" class="left grid-5-6">
{{template "ng/base/alert" .}}
<div id="release">
<h4 id="release-head">{{.i18n.Tr "repo.release.edit_release"}}</h4>
<form class="form" id="release-new-form" action="{{.RepoLink}}/releases/edit/{{.Release.TagName}}" method="post">
{{.CsrfTokenHtml}}
<div class="field">
<b>{{.Release.TagName}}</b>
<span class="target-at">@</span>
<strong>{{.Repository.DefaultBranch}}</strong>
2014-06-13 03:17:23 +05:30
</div>
2014-12-11 03:07:54 +05:30
<div class="field">
<input class="ipt ipt-large ipt-radius grid-4-5" id="release-new-title" name="title" placeholder="{{.i18n.Tr "repo.release.release_title"}}" value="{{.Release.Title}}" required>
</div>
<br>
<div class="field grid-4-5">
<div class="md-help pull-right">
{{.i18n.Tr "repo.release.content_with_md" "https://help.github.com/articles/markdown-basics" | Str2html}}
</div>
<div class="clear">
<ul class="tab-nav list-unstyled">
<li class="js-tab-nav js-tab-nav-show left" data-tab-target="#release-textarea">
<button class="btn btn-medium btn-gray btn-left-radius">{{.i18n.Tr "repo.release.write"}}</button>
</li>
2015-09-08 19:35:57 +05:30
<li class="js-tab-nav left markdown-preview" id="release-preview-btn" data-tab-target="#release-preview" data-ajax="{{AppSubUrl}}/api/v1/markdown" data-ajax-name="release-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#release-preview">
2014-12-11 03:07:54 +05:30
<button class="btn btn-medium btn-gray btn-right-radius">{{.i18n.Tr "repo.release.preview"}}</button>
</li>
</ul>
</div>
<div id="release-textarea">
<div class="form-group">
<textarea class="ipt ipt-large ipt-radius" name="content" id="release-new-content" rows="10" placeholder="{{.i18n.Tr "repo.release.content_placeholder"}}" data-ajax-rel="release-preview" data-ajax-val="val" data-ajax-field="text" required>{{.Release.Note}}</textarea>
</div>
</div>
2014-12-12 11:59:36 +05:30
<div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}</div>
2014-12-11 03:07:54 +05:30
<br>
<hr>
<div class="text-right">
<input class="ipt-chk" name="prerelease" type="checkbox" {{if .Release.IsPrerelease}}checked{{end}}/>
<span><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></span>
<p>{{.i18n.Tr "repo.release.prerelease_helper"}}</p>
<button class="btn btn-large btn-green btn-radius">Publish release</button>
{{if .Release.IsDraft}}
<input class="btn btn-large btn-gary btn-radius" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/>
{{end}}
2014-06-13 03:17:23 +05:30
</div>
</div>
2014-12-11 03:07:54 +05:30
</form>
2014-06-13 03:17:23 +05:30
</div>
2014-12-11 03:07:54 +05:30
</div>
{{template "repo/sidebar" .}}
2014-06-13 03:17:23 +05:30
</div>
</div>
2014-12-11 03:07:54 +05:30
{{template "ng/base/footer" .}}