mirror of https://github.com/gogits/gogs.git
Unknwon
9 years ago
15 changed files with 416 additions and 277 deletions
File diff suppressed because one or more lines are too long
@ -1,59 +0,0 @@ |
|||||||
{{template "ng/base/head" .}} |
|
||||||
{{template "ng/base/header" .}} |
|
||||||
<div id="repo-wrapper"> |
|
||||||
{{template "repo/header_old" .}} |
|
||||||
<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> |
|
||||||
</div> |
|
||||||
<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> |
|
||||||
<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"> |
|
||||||
<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> |
|
||||||
<div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}</div> |
|
||||||
<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}} |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</form> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
{{template "repo/sidebar" .}} |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
{{template "ng/base/footer" .}} |
|
@ -1,73 +1,80 @@ |
|||||||
{{template "ng/base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "ng/base/header" .}} |
<div class="repository release"> |
||||||
<div id="repo-wrapper"> |
{{template "repo/header" .}} |
||||||
{{template "repo/header_old" .}} |
<div class="ui container"> |
||||||
<div id="repo-content" class="clear container"> |
{{template "repo/sidebar" .}} |
||||||
<div id="repo-main" class="left grid-5-6"> |
<h2 class="ui header"> |
||||||
<div id="release"> |
{{.i18n.Tr "repo.release.releases"}} |
||||||
<h4 id="release-head"> |
|
||||||
<span class="release"><strong>{{.i18n.Tr "repo.release.releases"}}</strong></span><!-- / |
|
||||||
<a class="tag" href="{{AppSubUrl}}/{tag_link}">Tags</a> --> |
|
||||||
<!-- comment : if in tag page, show a.release and span.tag please --> |
|
||||||
{{if .IsRepositoryAdmin}} |
{{if .IsRepositoryAdmin}} |
||||||
<a class="btn" href="{{$.RepoLink}}/releases/new"> |
<div class="ui right"> |
||||||
<button class="btn btn-medium btn-blue btn-radius"> |
<a class="ui small green button" href="{{$.RepoLink}}/releases/new"> |
||||||
{{.i18n.Tr "repo.release.new_release"}} |
{{.i18n.Tr "repo.release.new_release"}} |
||||||
</button> |
|
||||||
</a> |
</a> |
||||||
|
</div> |
||||||
{{end}} |
{{end}} |
||||||
</h4> |
</h2> |
||||||
<ul id="release-list" class="list-unstyled"> |
<ul id="release-list"> |
||||||
{{range .Releases}} |
{{range .Releases}} |
||||||
<li class="release-item clearfix" id="release-{{.Sha1}}"> |
<li class="ui grid"> |
||||||
{{if .PublisherId}} |
<div class="ui four wide column meta"> |
||||||
<div class="grid-1-6 text-right release-meta"> |
{{if .PublisherID}} |
||||||
{{if .IsDraft}} |
{{if .IsDraft}} |
||||||
<span class="label label-blue label-radius">{{$.i18n.Tr "repo.release.draft"}}</span> |
<span class="ui yellow label">{{$.i18n.Tr "repo.release.draft"}}</span> |
||||||
{{else if .IsPrerelease}} |
{{else if .IsPrerelease}} |
||||||
<span class="label label-orange label-radius">{{$.i18n.Tr "repo.release.prerelease"}}</span> |
<span class="ui orange label">{{$.i18n.Tr "repo.release.prerelease"}}</span> |
||||||
{{else}} |
{{else}} |
||||||
<span class="label label-green label-radius">{{$.i18n.Tr "repo.release.stable"}}</span> |
<span class="ui green label">{{$.i18n.Tr "repo.release.stable"}}</span> |
||||||
|
{{end}} |
||||||
|
<span class="tag text blue"> |
||||||
|
<a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a> |
||||||
|
</span> |
||||||
{{end}} |
{{end}} |
||||||
<a class="tag" href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="fa fa-tag"></i> {{.TagName}}</a> |
<span class="commit"> |
||||||
<a class="commit" href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="fa fa-code"></i> {{ShortSha .Sha1}}</a> |
<a href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="code icon"></i> {{ShortSha .Sha1}}</a> |
||||||
|
</span> |
||||||
</div> |
</div> |
||||||
<div class="grid-9-12 release-detail left"> |
<div class="ui twelve wide column detail"> |
||||||
<h4 class="title"><a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a> <small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small></h4> |
{{if .PublisherID}} |
||||||
<p class="info"> |
<h3> |
||||||
<span class="author"><img class="avatar-20" src="{{.Publisher.AvatarLink}}"> |
<a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a> |
||||||
<a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a></span> |
<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small> |
||||||
|
</h3> |
||||||
|
<p class="text grey"> |
||||||
|
<span class="author"> |
||||||
|
<img class="img-10" src="{{.Publisher.AvatarLink}}"> |
||||||
|
<a href="{{AppSubUrl}}/{{.Publisher.Name}}">{{.Publisher.Name}}</a> |
||||||
|
</span> |
||||||
{{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}} |
{{if .Created}}<span class="time">{{TimeSince .Created $.Lang}}</span>{{end}} |
||||||
<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span> |
<span class="ahead">{{$.i18n.Tr "repo.release.ahead" .NumCommitsBehind .Target | Str2html}}</span> |
||||||
</p> |
</p> |
||||||
<div class="markdown desc"> |
<div class="markdown desc"> |
||||||
{{Str2html .Note}} |
{{Str2html .Note}} |
||||||
</div> |
</div> |
||||||
<p class="download"> |
<div class="download"> |
||||||
<a class="btn btn-gray btn-large btn-radius" href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="fa fa-download"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a> |
<h2>{{$.i18n.Tr "repo.release.downloads"}}</h2> |
||||||
<a class="btn btn-gray btn-large btn-radius" href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="fa fa-download"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a> |
<ul class="list"> |
||||||
</p> |
<li> |
||||||
<span class="dot"> </span> |
<a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (ZIP)</a> |
||||||
|
</li> |
||||||
|
<li> |
||||||
|
<a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="icon octicon octicon-file-zip"></i> {{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</a> |
||||||
|
</li> |
||||||
|
</ul> |
||||||
</div> |
</div> |
||||||
{{else}} |
{{else}} |
||||||
<div class="grid-1-6 text-right release-meta"> |
<h4> |
||||||
<a class="commit" href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="fa fa-code"></i> {{ShortSha .Sha1}}</a> |
<a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="tag icon"></i> {{.TagName}}</a> |
||||||
|
</h4> |
||||||
|
<div class="download"> |
||||||
|
<a href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="octicon octicon-file-zip"></i> ZIP</a> |
||||||
|
<a href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a> |
||||||
</div> |
</div> |
||||||
<div class="grid-9-12 release-detail left"> |
{{end}} |
||||||
<h5 class="title"><a href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow">{{.TagName}}</a> <i class="fa fa-tag"></i></h5> |
|
||||||
<p class="download"> |
|
||||||
<a class="download-link" href="{{$.RepoLink}}/archive/{{.TagName}}.zip" rel="nofollow"><i class="fa fa-download"></i> ZIP</a> |
|
||||||
<a class="download-link" href="{{$.RepoLink}}/archive/{{.TagName}}.tar.gz"><i class="fa fa-download"></i> TAR.GZ</a> |
|
||||||
</p> |
|
||||||
<span class="dot"> </span> |
<span class="dot"> </span> |
||||||
</div> |
</div> |
||||||
{{end}} |
|
||||||
</li> |
</li> |
||||||
{{end}} |
{{end}} |
||||||
</ul> |
</ul> |
||||||
</div> |
</div> |
||||||
</div> |
|
||||||
{{template "repo/sidebar" .}} |
|
||||||
</div> |
|
||||||
</div> |
</div> |
||||||
{{template "ng/base/footer" .}} |
{{template "base/footer" .}} |
@ -1,68 +1,83 @@ |
|||||||
{{template "ng/base/head" .}} |
{{template "base/head" .}} |
||||||
{{template "ng/base/header" .}} |
<div class="repository new release"> |
||||||
<div id="repo-wrapper"> |
{{template "repo/header" .}} |
||||||
{{template "repo/header_old" .}} |
<div class="ui container"> |
||||||
<div id="repo-content" class="clear container"> |
{{template "repo/sidebar" .}} |
||||||
<div id="repo-main" class="left grid-5-6"> |
<h2 class="ui dividing header"> |
||||||
{{template "ng/base/alert" .}} |
{{if .PageIsEditRelease}} |
||||||
<div id="release"> |
{{.i18n.Tr "repo.release.edit_release"}} |
||||||
<h4 id="release-head">{{.i18n.Tr "repo.release.new_release"}}</h4> |
<div class="sub header">{{.i18n.Tr "repo.release.edit_subheader"}}</div> |
||||||
<form class="form" id="release-new-form" action="{{.RepoLink}}/releases/new" method="post"> |
{{else}} |
||||||
|
{{.i18n.Tr "repo.release.new_release"}} |
||||||
|
<div class="sub header">{{.i18n.Tr "repo.release.new_subheader"}}</div> |
||||||
|
{{end}} |
||||||
|
</h2> |
||||||
|
{{template "base/alert" .}} |
||||||
|
<form class="ui form grid" action="{{.Link}}" method="post"> |
||||||
{{.CsrfTokenHtml}} |
{{.CsrfTokenHtml}} |
||||||
<div class="field"> |
<div class="ui seven wide column target"> |
||||||
<input class="ipt ipt-large ipt-radius" name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" required> |
<div class="inline field {{if .Err_TagName}}error{{end}}"> |
||||||
<span class="target-at">@</span> |
{{if .PageIsEditRelease}} |
||||||
<div class="inline-block drop"> |
<b>{{.tag_name}}</b><span class="at">@</span><strong>{{.tag_target}}</strong> |
||||||
<button class="btn btn-gray btn-medium btn-radius drop-bottom"> |
{{else}} |
||||||
<i class="octicon octicon-git-branch"></i> {{.i18n.Tr "repo.release.target"}} : |
<input name="tag_name" value="{{.tag_name}}" placeholder="{{.i18n.Tr "repo.release.tag_name"}}" autofocus required> |
||||||
|
<span class="at">@</span> |
||||||
|
<div class="ui selection dropdown"> |
||||||
|
<input type="hidden" name="tag_target" value="{{.tag_target}}"/> |
||||||
|
<i class="octicon octicon-git-branch"></i> |
||||||
|
<div class="text"> |
||||||
|
{{.i18n.Tr "repo.release.target"}} : |
||||||
<strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong> |
<strong id="repo-branch-current">{{.Repository.DefaultBranch}}</strong> |
||||||
</button> |
</div> |
||||||
<ul class="drop-down menu menu-vertical menu-radius switching-list" id="release-new-target-branch-list"> |
<i class="dropdown icon"></i> |
||||||
|
<div class="menu"> |
||||||
{{range .Branches}} |
{{range .Branches}} |
||||||
<li {{if eq . $.tag_target}}class="checked"{{end}}><a><i class="octicon octicon-check"></i>{{.}}</a></li> |
<div class="item" data-value="{{.}}">{{.}}</div> |
||||||
{{end}} |
{{end}} |
||||||
</ul> |
|
||||||
</div> |
</div> |
||||||
<input id="tag-target" type="hidden" name="tag_target" value="{{.tag_target}}"/> |
|
||||||
</div> |
</div> |
||||||
<p class="help">{{.i18n.Tr "repo.release.tag_helper"}}</p> |
<span class="help">{{.i18n.Tr "repo.release.tag_helper"}}</span> |
||||||
<div class="field"> |
{{end}} |
||||||
<input class="ipt ipt-large ipt-radius grid-4-5" id="release-new-title" name="title" placeholder="{{.i18n.Tr "repo.release.release_title"}}" value="{{.title}}" required> |
</div> |
||||||
</div> |
</div> |
||||||
<br> |
<div class="eleven wide column"> |
||||||
<div class="field grid-4-5"> |
<div class="field {{if .Err_Title}}error{{end}}"> |
||||||
<div class="md-help pull-right"> |
<label>{{.i18n.Tr "repo.release.title"}}</label> |
||||||
{{.i18n.Tr "repo.release.content_with_md" "https://help.github.com/articles/markdown-basics" | Str2html}} |
<input name="title" placeholder="{{.i18n.Tr "repo.release.title"}}" value="{{.title}}" autofocus required> |
||||||
</div> |
</div> |
||||||
<div class="clear"> |
<div class="field"> |
||||||
<ul class="tab-nav list-unstyled"> |
<label>{{.i18n.Tr "repo.release.content"}}</label> |
||||||
<li class="js-tab-nav js-tab-nav-show left" data-tab-target="#release-textarea"> |
<textarea name="content">{{.content}}</textarea> |
||||||
<button class="btn btn-medium btn-gray btn-left-radius">{{.i18n.Tr "repo.release.write"}}</button> |
|
||||||
</li> |
|
||||||
<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"> |
|
||||||
<button class="btn btn-medium btn-gray btn-right-radius">{{.i18n.Tr "repo.release.preview"}}</button> |
|
||||||
</li> |
|
||||||
</ul> |
|
||||||
</div> |
</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>{{.content}}</textarea> |
|
||||||
</div> |
</div> |
||||||
|
<div class="ui container"> |
||||||
|
<div class="ui divider"></div> |
||||||
|
<div class="ui text right"> |
||||||
|
<div class="prerelease field"> |
||||||
|
<div class="ui checkbox"> |
||||||
|
<input type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}> |
||||||
|
<label><strong>{{.i18n.Tr "repo.release.prerelease_desc"}}</strong></label> |
||||||
</div> |
</div> |
||||||
<div class="markdown hide" id="release-preview">{{.i18n.Tr "repo.release.loading"}}</div> |
|
||||||
<hr> |
|
||||||
<div class="text-right"> |
|
||||||
<input class="ipt-chk" name="prerelease" type="checkbox" {{if .prerelease}}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">{{.i18n.Tr "repo.release.publish"}}</button> |
|
||||||
<input class="btn btn-large btn-gary btn-radius" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/> |
|
||||||
</div> |
</div> |
||||||
|
<span class="help">{{.i18n.Tr "repo.release.prerelease_helper"}}</span> |
||||||
|
<div class="field"> |
||||||
|
{{if .PageIsEditRelease}} |
||||||
|
<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> |
||||||
|
{{else}} |
||||||
|
<button class="ui green button"> |
||||||
|
{{.i18n.Tr "repo.release.publish"}} |
||||||
|
</button> |
||||||
|
<input class="ui grey button" type="submit" name="draft" value="{{.i18n.Tr "repo.release.save_draft"}}"/> |
||||||
|
{{end}} |
||||||
</div> |
</div> |
||||||
</form> |
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
{{template "repo/sidebar" .}} |
</form> |
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
{{template "ng/base/footer" .}} |
{{template "base/footer" .}} |
Loading…
Reference in new issue