diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-22 13:14:03 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-22 13:14:03 -0400 |
commit | 9924e65ca11770f247723b10fcbdb81dc9534b32 (patch) | |
tree | 23995a2838ac24c88ebfd9267b567ec7e4f1a05c /templates/repo/release | |
parent | c280415e0b449b420f4540886b8e16ae3c9e6454 (diff) | |
download | gitea-9924e65ca11770f247723b10fcbdb81dc9534b32.tar.gz gitea-9924e65ca11770f247723b10fcbdb81dc9534b32.zip |
In progress of name template name constant
Diffstat (limited to 'templates/repo/release')
-rw-r--r-- | templates/repo/release/edit.tmpl | 70 | ||||
-rw-r--r-- | templates/repo/release/list.tmpl | 62 | ||||
-rw-r--r-- | templates/repo/release/new.tmpl | 70 |
3 files changed, 202 insertions, 0 deletions
diff --git a/templates/repo/release/edit.tmpl b/templates/repo/release/edit.tmpl new file mode 100644 index 0000000000..e437092c8c --- /dev/null +++ b/templates/repo/release/edit.tmpl @@ -0,0 +1,70 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +<div id="body" class="container"> + <div id="release"> + <h4 id="release-head">Edit Release</h4> + {{template "base/alert" .}} + <form id="release-new-form" action="{{.RepoLink}}/releases/edit/{{.Release.TagName}}" method="post" class="form form-inline"> + {{.CsrfTokenHtml}} + <div class="form-group"> + <b>{{.Release.TagName}}</b> + <span class="target-at">@</span> + <div class="btn-group" id="release-new-target-select"> + <button type="button" class="btn btn-default"><i class="fa fa-code-fork fa-lg fa-m"></i> + <span class="target-text">Target : </span> + <strong id="release-new-target-name"> {{.Release.Target}}</strong> + </button> + <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> + <span class="caret"></span> + </button> + <div class="dropdown-menu clone-group-btn" id="release-new-target-branch-list"> + <ul class="list-group"> + {{range .Branches}} + <li class="list-group-item"> + <a href="#" rel="{{.}}"><i class="fa fa-code-fork"></i>{{.}}</a> + </li> + {{end}} + </ul> + </div> + <input id="tag-target" type="hidden" name="tag_target" value="{{.Release.Target}}"/> + </div> + <p class="help-block">Choose an existing tag, or create a new tag on publish</p> + </div> + <div class="form-group" style="display: block"> + <input class="form-control input-lg" id="release-new-title" name="title" type="text" placeholder="release title" value="{{.Release.Title}}" /> + </div> + <div class="form-group col-md-8" style="display: block" id="release-new-content-div"> + <div class="md-help pull-right"> + Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a> + </div> + <ul class="nav nav-tabs" data-init="tabs"> + <li class="release-write active"><a href="#release-textarea" data-toggle="tab">Write</a></li> + <li class="release-preview"><a href="#release-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="release-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#release-preview">Preview</a></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="release-textarea"> + <div class="form-group"> + <textarea class="form-control" name="content" id="release-new-content" rows="10" placeholder="Write some content" data-ajax-rel="release-preview" data-ajax-val="val" data-ajax-field="text">{{.Release.Note}}</textarea> + </div> + </div> + <div class="tab-pane release-preview-content" id="release-preview">loading...</div> + </div> + </div> + <div class="text-right form-group col-md-8" style="display: block"> + <hr/> + <label for="release-new-pre-release"> + <input id="release-new-pre-release" type="checkbox" name="prerelease" {{if .Release.IsPrerelease}}checked{{end}}/> + <strong>This is a pre-release</strong> + </label> + <p class="help-block">We’ll point out that this release is identified as non-production ready.</p> + </div> + <div class="text-right form-group col-md-8" style="display: block"> + <button class="btn-success btn">Publish release</button> + <input class="btn btn-default" type="submit" name="draft" value="Save draft"/> + </div> + </form> + </div> +</div> +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl new file mode 100644 index 0000000000..0f02508fb9 --- /dev/null +++ b/templates/repo/release/list.tmpl @@ -0,0 +1,62 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +<div id="body" class="container"> + <div id="release"> + <h4 id="release-head"> + <span class="release"><strong>Releases</strong></span><!-- / + <a class="tag" href="/{tag_link}">Tags</a> --> + <!-- comment : if in tag page, show a.release and span.tag please --> + </h4> + <ul id="release-list" class="list-unstyled"> + {{range .Releases}} + <li class="release-item clearfix" id="release-{{.Sha1}}"> + {{if .PublisherId}} + <div class="col-md-2 text-right"> + {{if .IsDraft}} + <span class="btn btn-primary status pre-release">Draft</span> + {{else if .IsPrerelease}} + <span class="btn btn-warning status pre-release">Pre-Release</span> + {{else}} + <span class="btn btn-success status stable">Stable</span> + {{end}} + <a class="tag" href="{{$.RepoLink}}/src/{{.TagName}}" rel="nofollow"><i class="fa fa-tag"></i>{{.TagName}}</a> + <a class="commit" href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="fa fa-code"></i>{{ShortSha .Sha1}}</a> + </div> + <div class="col-md-10"> + <h4 class="title"><a href="{{$.RepoLink}}/src/{{.TagName}}">{{.Title}}</a> <small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName}}" rel="nofollow">edit</a>)</small></h4> + <p class="info"> + <span class="author"><img class="avatar" src="{{.Publisher.AvatarLink}}" alt="" width="20"> + <a href="/user/{{.Publisher.Name}}">{{.Publisher.Name}}</a></span> + {{if .Created}}<span class="time">{{TimeSince .Created}}</span>{{end}} + <span class="ahead"><strong>{{.NumCommitsBehind}}</strong> commits to {{.Target}} since this release</span> + </p> + <div class="markdown desc"> + {{str2html .Note}} + </div> + <p class="download"> + <a class="btn btn-default" href="{{$.RepoLink}}/archive/{{.TagName}}/{{$.Repository.Name}}.zip" rel="nofollow"><i class="fa fa-download"></i>Source Code (ZIP)</a> + <a class="btn btn-default" href="{{$.RepoLink}}/archive/{{.TagName}}/{{$.Repository.Name}}.tar.gz"><i class="fa fa-download"></i>Source Code (TAR.GZ)</a> + </p> + <span class="dot"> </span> + </div> + {{else}} + <div class="col-md-2 text-right"> + <a class="commit" href="{{$.RepoLink}}/src/{{.Sha1}}" rel="nofollow"><i class="fa fa-code"></i>{{ShortSha .Sha1}}</a> + </div> + <div class="col-md-10"> + <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}}/{{$.Repository.Name}}.zip" rel="nofollow"><i class="fa fa-download"></i>zip</a> + <a class="download-link" href="{{$.RepoLink}}/archive/{{.TagName}}/{{$.Repository.Name}}.tar.gz"><i class="fa fa-download"></i>tar.gz</a> + </p> + <span class="dot"> </span> + </div> + {{end}} + </li> + {{end}} + </ul> + </div> +</div> +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/repo/release/new.tmpl b/templates/repo/release/new.tmpl new file mode 100644 index 0000000000..6c5cf40ceb --- /dev/null +++ b/templates/repo/release/new.tmpl @@ -0,0 +1,70 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +{{template "repo/nav" .}} +{{template "repo/toolbar" .}} +<div id="body" class="container"> + <div id="release"> + <h4 id="release-head">New Release</h4> + {{template "base/alert" .}} + <form id="release-new-form" action="{{.RepoLink}}/releases/new" method="post" class="form form-inline"> + {{.CsrfTokenHtml}} + <div class="form-group"> + <input id="tag-name" name="tag_name" type="text" class="form-control" placeholder="tag name" value="{{.tag_name}}" /> + <span class="target-at">@</span> + <div class="btn-group" id="release-new-target-select"> + <button type="button" class="btn btn-default"><i class="fa fa-code-fork fa-lg fa-m"></i> + <span class="target-text">Target : </span> + <strong id="release-new-target-name"> {{.Repository.DefaultBranch}}</strong> + </button> + <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> + <span class="caret"></span> + </button> + <div class="dropdown-menu clone-group-btn" id="release-new-target-branch-list"> + <ul class="list-group"> + {{range .Branches}} + <li class="list-group-item"> + <a href="#" rel="{{.}}"><i class="fa fa-code-fork"></i>{{.}}</a> + </li> + {{end}} + </ul> + </div> + <input id="tag-target" type="hidden" name="tag_target" value="{{.Repository.DefaultBranch}}"/> + </div> + <p class="help-block">Choose an existing tag, or create a new tag on publish</p> + </div> + <div class="form-group" style="display: block"> + <input class="form-control input-lg" id="release-new-title" name="title" type="text" placeholder="release title" value="{{.title}}" /> + </div> + <div class="form-group col-md-8" style="display: block" id="release-new-content-div"> + <div class="md-help pull-right"> + Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a> + </div> + <ul class="nav nav-tabs" data-init="tabs"> + <li class="release-write active"><a href="#release-textarea" data-toggle="tab">Write</a></li> + <li class="release-preview"><a href="#release-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="release-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#release-preview">Preview</a></li> + </ul> + <div class="tab-content"> + <div class="tab-pane active" id="release-textarea"> + <div class="form-group"> + <textarea class="form-control" name="content" id="release-new-content" rows="10" placeholder="Write some content" data-ajax-rel="release-preview" data-ajax-val="val" data-ajax-field="text">{{.content}}</textarea> + </div> + </div> + <div class="tab-pane release-preview-content" id="release-preview">loading...</div> + </div> + </div> + <div class="text-right form-group col-md-8" style="display: block"> + <hr/> + <label for="release-new-pre-release"> + <input id="release-new-pre-release" type="checkbox" name="prerelease" {{if .prerelease}}checked{{end}}/> + <strong>This is a pre-release</strong> + </label> + <p class="help-block">We’ll point out that this release is identified as non-production ready.</p> + </div> + <div class="text-right form-group col-md-8" style="display: block"> + <button class="btn-success btn">Publish release</button> + <input class="btn btn-default" type="submit" name="draft" value="Save draft"/> + </div> + </form> + </div> +</div> +{{template "base/footer" .}}
\ No newline at end of file |