summaryrefslogtreecommitdiffstats
path: root/templates/repo
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-06-22 13:14:03 -0400
committerUnknown <joe2010xtmf@163.com>2014-06-22 13:14:03 -0400
commit9924e65ca11770f247723b10fcbdb81dc9534b32 (patch)
tree23995a2838ac24c88ebfd9267b567ec7e4f1a05c /templates/repo
parentc280415e0b449b420f4540886b8e16ae3c9e6454 (diff)
downloadgitea-9924e65ca11770f247723b10fcbdb81dc9534b32.tar.gz
gitea-9924e65ca11770f247723b10fcbdb81dc9534b32.zip
In progress of name template name constant
Diffstat (limited to 'templates/repo')
-rw-r--r--templates/repo/issue/create.tmpl112
-rw-r--r--templates/repo/issue/list.tmpl116
-rw-r--r--templates/repo/issue/milestone.tmpl43
-rw-r--r--templates/repo/issue/milestone_edit.tmpl61
-rw-r--r--templates/repo/issue/milestone_new.tmpl62
-rw-r--r--templates/repo/issue/view.tmpl228
-rw-r--r--templates/repo/release/edit.tmpl70
-rw-r--r--templates/repo/release/list.tmpl62
-rw-r--r--templates/repo/release/new.tmpl70
9 files changed, 824 insertions, 0 deletions
diff --git a/templates/repo/issue/create.tmpl b/templates/repo/issue/create.tmpl
new file mode 100644
index 0000000000..34cecc78bd
--- /dev/null
+++ b/templates/repo/issue/create.tmpl
@@ -0,0 +1,112 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ <div id="issue">
+ <form class="form" action="{{.RepoLink}}/issues/new" method="post" id="issue-create-form">
+ {{.CsrfTokenHtml}}
+ {{template "base/alert" .}}
+ <div class="col-md-1">
+ <img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/>
+ </div>
+ <div class="col-md-8 panel panel-default">
+ <div class="form-group panel-body">
+ <input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" />
+ </div>
+ <div class="form-group panel-body">
+ <span><strong id="assigned" data-no-assigned="No one">No one</strong> will be assigned</span>
+ <input type="hidden" name="assigneeid" value="0" id="assignee"/>&nbsp;&nbsp;
+ <div style="display: inline-block;position: relative">
+ <button type="button" class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">
+ <i class="fa fa-group"></i>
+ <span class="caret"></span>
+ </button>
+ <div class="dropdown-menu assignee">
+ <ul class="list-unstyled">
+ <li data-uid="0" class="clear-assignee hidden"><i class="fa fa-times-circle-o"></i> Clear assignee</li>
+ {{range .Collaborators}}
+ <li data-uid="{{.Id}}"><img src="{{.AvatarLink}}"><strong>{{.Name}}</strong> {{.FullName}}</li>
+ {{end}}
+ </ul>
+ </div>
+ </div>
+ <span><strong id="milestone" data-no-milestone="No milestone">No milestone</strong></span>
+ <input type="hidden" name="milestoneid" value="0" id="milestone-id"/>
+ <div style="display: inline-block;position: relative">
+ <button type="button" class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">
+ <i class="fa fa-check-square-o"></i>
+ <span class="caret"></span>
+ </button>
+ <div class="dropdown-menu milestone">
+ <ul class="list-unstyled">
+ <li data-id="0" class="clear-milestone milestone-item hidden"><i class="fa fa-times-circle-o"></i> Clear milestone </li>
+ <li class="milestone-list">
+ <ul class="nav nav-tabs" data-init="tabs">
+ <li class="active"><a href="#milestone-open" data-toggle="tab">Open</a></li>
+ <li><a href="#milestone-close" data-toggle="tab">Closed</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active" id="milestone-open">
+ {{if not .OpenMilestones}}
+ <p class="milestone-item">Nothing to show</p>
+ {{else}}
+ <ul class="list-unstyled">
+ {{range .OpenMilestones}}
+ <li class="milestone-item" data-id="{{.Id}}">
+ <p><strong>{{.Name}}</strong></p>
+ <!-- <p>due to 3 days later</p> -->
+ </li>
+ {{end}}
+ </ul>
+ {{end}}
+ </div>
+
+ <div class="tab-pane" id="milestone-close">
+ {{if not .ClosedMilestones}}
+ <p class="milestone-item">Nothing to show</p>
+ {{else}}
+ <ul class="list-unstyled">
+ {{range .ClosedMilestones}}
+ <li class="milestone-item" data-id="{{.Id}}">
+ <p><strong>{{.Name}}</strong></p>
+ <p>Closed {{TimeSince .ClosedDate}}</p>
+ </li>
+ {{end}}
+ </ul>
+ {{end}}
+ </div>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div class="form-group panel-body">
+ <div class="md-help pull-right"><!-- todo help link -->
+ Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a>
+ </div>
+ <ul class="nav nav-tabs" data-init="tabs">
+ <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
+ <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane" id="issue-textarea">
+ <div class="form-group">
+ <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="text">{{.content}}</textarea>
+ </div>
+ </div>
+ <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
+ </div>
+ </div>
+ <div class="text-right panel-body">
+ <div class="form-group">
+ <input type="hidden" value="id" name="repo-id"/>
+ <button class="btn-success btn">Create new issue</button>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/list.tmpl b/templates/repo/issue/list.tmpl
new file mode 100644
index 0000000000..0fae3eb663
--- /dev/null
+++ b/templates/repo/issue/list.tmpl
@@ -0,0 +1,116 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ <div id="issue">
+ <div class="col-md-3 filters">
+ <div class="filter-list">
+ <ul class="list-unstyled">
+ <li><a href="{{.RepoLink}}/issues?state={{.State}}"{{if eq .ViewType "all"}} class="active"{{end}}>All Issues <strong class="pull-right">{{..IssueStats.AllCount}}</strong></a></li>
+ <li><a href="{{.RepoLink}}/issues?type=assigned&state={{.State}}"{{if eq .ViewType "assigned"}} class="active"{{end}}>Assigned to you <strong class="pull-right">{{.IssueStats.AssignCount}}</strong></a></li>
+ <li><a href="{{.RepoLink}}/issues?type=created_by&state={{.State}}"{{if eq .ViewType "created_by"}} class="active"{{end}}>Created by you <strong class="pull-right">{{.IssueStats.CreateCount}}</strong></a></li>
+ <li><a href="{{.RepoLink}}/issues?type=mentioned&state={{.State}}"{{if eq .ViewType "mentioned"}} class="active"{{end}}>Mentioning you <strong class="pull-right">{{.IssueStats.MentionCount}}</strong></a></li>
+ </ul>
+ </div>
+ <div class="label-filter">
+ <h4>Label</h4>
+ <ul class="list-unstyled" id="label-list" data-ajax="{{$.RepoLink}}/issues/labels/delete">
+ {{range .Labels}}
+ <li class="label-item{{if eq $.SelectLabels .Id}} label-selected{{end}}" id="label-{{.Id}}" data-id="{{.Id}}">
+ <a href="?type={{$.ViewType}}&state={{$.State}}{{if not (eq $.SelectLabels .Id)}}&labels={{.Id}}{{end}}">
+ <span class="pull-right count">{{if $.IsShowClosed}}{{.NumClosedIssues}}{{else}}{{.NumOpenIssues}}{{end}}</span>
+ <span class="color" style="background-color: {{.Color}}" data-color="{{.Color}}"></span>
+ <span class="name">{{.Name}}</span>
+ </a>
+ <a class="del pull-right" href="#" data-id="{{.Id}}"><i class="fa fa-times-circle-o"></i></a>
+ </li>
+ {{end}}
+ <li class="label-change-li" style="display: none">
+ <form id="label-change-form" action="{{$.RepoLink}}/issues/labels/edit" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="input-group label-change-color-picker form-group" style="margin-bottom: 2px">
+ <input type="text" class="form-control" name="title" required="required" id="label-name-change-ipt"/>
+ <input type="hidden" name="color" id="label-color-change-ipt" value="#444444"/>
+ <span class="input-group-addon"><i></i></span>
+ <input type="hidden" name="id" id="label-change-id-ipt" value="0"/>
+ </div>
+ <div class="form-group text-right">
+ <input class="form-control input-sm" type="text" id="label-color-change-ipt2" value="#444444"/>
+ <button class="btn btn-default btn-sm">Save</button>
+ </div>
+ </form>
+ </li>
+ </ul>
+ <button class="btn btn-default btn-block label-button" id="label-manage-btn">Manage Labels</button>
+ <hr/>
+ <form id="label-add-form" action="{{$.RepoLink}}/issues/labels/new" method="post">
+ {{.CsrfTokenHtml}}
+ <h5><strong>New Label</strong></h5>
+ <div class="input-group label-color-picker form-group">
+ <input type="text" class="form-control" name="title" required="required" id="label-name-ipt"/>
+ <input type="hidden" name="color" id="label-color-ipt" value="#444444"/>
+ <span class="input-group-addon"><i></i></span>
+ </div>
+ <div class="form-group text-right">
+ <input class="form-control input-sm" type="text" id="label-color-ipt2" value="#444444"/>
+ <button class="btn btn-default btn-sm">Create</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ <div class="col-md-9">
+ {{template "base/alert" .}}
+ <div class="filter-option">
+ <div class="btn-group">
+ <a class="btn btn-default issue-open{{if not .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}">{{.IssueStats.OpenCount}} Open</a>
+ <a class="btn btn-default issue-close{{if .IsShowClosed}} active{{end}}" href="{{.RepoLink}}/issues?type={{.ViewType}}&state=closed">{{.IssueStats.ClosedCount}} Closed</a>
+ </div>
+ </div>
+ <div class="issues list-group">
+ {{range .Issues}}{{if .Poster}}
+ <div class="list-group-item issue-item{{if not .IsRead}} unread{{end}}" id="issue-{{.Id}}">
+ <span class="number pull-right">#{{.Index}}</span>
+ <h5 class="title">
+ <a href="{{$.RepoLink}}/issues/{{.Index}}">{{.Name}}</a>
+ <span class="labels">
+ {{range .Labels}}
+ <span class="label" style="background-color: {{.Color}}">{{.Name}}</span>
+ {{end}}
+ </span>
+ </h5>
+ <p class="info">
+ <span class="author"><img class="avatar" src="{{.Poster.AvatarLink}}" alt="" width="20"/>
+ <a href="/user/{{.Poster.Name}}">{{.Poster.Name}}</a></span>
+ <span class="time">{{TimeSince .Created}}</span>
+ <span class="comment"><i class="fa fa-comments"></i> {{.NumComments}}</span>
+ </p>
+ </div>
+ {{end}}{{end}}
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<script src="/js/bootstrap-colorpicker.min.js"></script>
+<script>
+ $(function(){
+ $('.label-color-picker').colorpicker({
+ input: $('#label-color-ipt')
+ }).on('changeColor', function (ev) {
+ var $ipt = $('#label-color-ipt2');
+ if ($ipt.val().length != 4) {
+ $ipt.val(ev.color.toHex());
+ }
+ });
+ $('.label-change-color-picker').colorpicker({
+ input:$('#label-color-change-ipt')
+ }).on('changeColor', function (ev) {
+ var $ipt = $('#label-color-change-ipt2');
+ if ($ipt.val().length != 4) {
+ $ipt.val(ev.color.toHex());
+ }
+ });
+ });
+</script>
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/milestone.tmpl b/templates/repo/issue/milestone.tmpl
new file mode 100644
index 0000000000..8a5751c19b
--- /dev/null
+++ b/templates/repo/issue/milestone.tmpl
@@ -0,0 +1,43 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ <div id="issue">
+ <div class="col-md-3 filter-list">
+ <ul class="list-unstyled">
+ <li><a href="{{.RepoLink}}/issues/milestones"{{if eq .State "open"}} class="active"{{end}}>Open Milestones <strong class="pull-right">{{.Repository.NumOpenMilestones}}</strong></a></li>
+ <li><a href="{{.RepoLink}}/issues/milestones?state=closed"{{if eq .State "closed"}} class="active"{{end}}>Close Milestones <strong class="pull-right">{{.Repository.NumClosedMilestones}}</strong></a></li>
+ </ul>
+ <hr/>
+ <a href="{{.RepoLink}}/issues/milestones/new" class="text-center">
+ <button class="btn btn-default btn-block">Create new milestone</button>
+ </a>
+ </div>
+ <div class="col-md-9">
+ <div class="milestones list-group">
+ {{range .Milestones}}
+ <div class="list-group-item milestone-item">
+ <h4 class="title pull-left"><a href="{{$.RepoLink}}/issues?milestone={{.Index}}{{if .IsClosed}}&state=closed{{end}}">{{.Name}}</a></h4>
+ <span class="issue-open label label-success">{{.NumOpenIssues}}</span>
+ <span class="issue-close label label-warning">{{.NumClosedIssues}}</span>
+ <p class="actions pull-right">
+ <a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/edit">Edit</a>
+ {{if .IsClosed}}
+ <a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/open">Open</a>
+ {{else}}
+ <a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/close">Close</a>
+ {{end}}
+ <a class="text-danger" href="{{$.RepoLink}}/issues/milestones/{{.Index}}/delete">Delete</a>
+ <a href="{{$.RepoLink}}/issues?milestone={{.Index}}{{if .IsClosed}}&state=closed{{end}}">Issues</a>
+ </p>
+ <hr/>
+ <p class="description">{{.RenderedContent | str2html}}</p>
+ </div>
+ {{end}}
+ </div>
+ </div>
+ </div>
+</div>
+</div>
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/milestone_edit.tmpl b/templates/repo/issue/milestone_edit.tmpl
new file mode 100644
index 0000000000..8f1a05e012
--- /dev/null
+++ b/templates/repo/issue/milestone_edit.tmpl
@@ -0,0 +1,61 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ <div id="issue">
+ <form class="form" action="{{.RepoLink}}/issues/milestones/{{.Milestone.Index}}/edit" method="post" id="issue-create-form">
+ {{.CsrfTokenHtml}}
+ {{template "base/alert" .}}
+ <div class="col-md-1">
+ <img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/>
+ </div>
+ <div class="col-md-8 panel panel-default">
+ <div class="form-group panel-body">
+ <input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.Milestone.Name}}" />
+ </div>
+ <div class="form-group panel-body">
+ <div class="md-help pull-right"><!-- todo help link -->
+ Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a>
+ </div>
+ <ul class="nav nav-tabs" data-init="tabs">
+ <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
+ <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane" id="issue-textarea">
+ <div class="form-group">
+ <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="text">{{.Milestone.Content}}</textarea>
+ </div>
+ </div>
+ <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
+ </div>
+ </div>
+ <div class="text-right panel-body">
+ <div class="form-group">
+ <input type="hidden" value="id" name="repo-id"/>
+ <button class="btn-success btn">Update milestone</button>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-3">
+ <h4>Milestone Due Date</h4>
+ <div class="form-group">
+ <input name="due_date" type="text" class="form-control" id="milestone-due-date" value="{{.Milestone.DeadlineString}}">
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
+<script src="/js/bootstrap-datepicker.js"></script>
+<script>
+ $(function(){
+ $('#milestone-due-date').datepicker({
+ weekStart: 1,
+ todayBtn: "linked",
+ calendarWeeks: true,
+ todayHighlight: true
+ });
+ });
+</script>
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/milestone_new.tmpl b/templates/repo/issue/milestone_new.tmpl
new file mode 100644
index 0000000000..044b7d1061
--- /dev/null
+++ b/templates/repo/issue/milestone_new.tmpl
@@ -0,0 +1,62 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ <div id="issue">
+ <form class="form" action="{{.RepoLink}}/issues/milestones/new" method="post" id="issue-create-form">
+ {{.CsrfTokenHtml}}
+ {{template "base/alert" .}}
+ <div class="col-md-1">
+ <img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/>
+ </div>
+ <div class="col-md-8 panel panel-default">
+ <div class="form-group panel-body">
+ <input class="form-control input-lg" type="text" name="title" required="required" placeholder="Title" value="{{.title}}" />
+ </div>
+ <div class="form-group panel-body">
+ <div class="md-help pull-right"><!-- todo help link -->
+ Content with <a href="https://help.github.com/articles/markdown-basics">Markdown</a>
+ </div>
+ <ul class="nav nav-tabs" data-init="tabs">
+ <li class="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
+ <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane" id="issue-textarea">
+ <div class="form-group">
+ <textarea class="form-control" name="content" id="issue-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="text">{{.content}}</textarea>
+ </div>
+ </div>
+ <div class="tab-pane issue-preview-content" id="issue-preview">loading...</div>
+ </div>
+ </div>
+ <div class="text-right panel-body">
+ <div class="form-group">
+ <input type="hidden" value="id" name="repo-id"/>
+ <button class="btn-success btn">Create new milestone</button>
+ </div>
+ </div>
+ </div>
+ <div class="col-md-3">
+ <h4>Milestone Due Date</h4>
+
+ <div class="form-group">
+ <input name="due_date" type="text" class="form-control" id="milestone-due-date">
+ </div>
+ </div>
+ </form>
+ </div>
+</div>
+<script src="/js/bootstrap-datepicker.js"></script>
+<script>
+ $(function(){
+ $('#milestone-due-date').datepicker({
+ weekStart: 1,
+ todayBtn: "linked",
+ calendarWeeks: true,
+ todayHighlight: true
+ });
+ });
+</script>
+{{template "base/footer" .}}
diff --git a/templates/repo/issue/view.tmpl b/templates/repo/issue/view.tmpl
new file mode 100644
index 0000000000..ba1fe16b79
--- /dev/null
+++ b/templates/repo/issue/view.tmpl
@@ -0,0 +1,228 @@
+{{template "base/head" .}}
+{{template "base/navbar" .}}
+{{template "repo/nav" .}}
+{{template "repo/toolbar" .}}
+<div id="body" class="container">
+ <div id="issue" data-id="{{.Issue.Id}}">
+ <div id="issue-{{.Issue.Id}}" class="issue-whole issue-is-opening">
+ <div class="issue-wrap col-md-10">
+ <div class="issue-head clearfix">
+ <div class="number pull-right">#{{.Issue.Index}}</div>
+ <a class="author pull-left" href="/user/{{.Issue.Poster.Name}}"><img class="avatar" src="{{.Issue.Poster.AvatarLink}}" alt="" width="30"/></a>
+ <h1 class="title pull-left">{{.Issue.Name}}</h1>
+ <input id="issue-edit-title" class="form-control input-lg pull-left hidden" type="text" value="{{.Issue.Name}}" data-ajax-rel="issue-edit-save" data-ajax-val="val" data-ajax-field="title"/>
+ <input type="hidden" value="{{.Issue.Id}}" data-ajax-rel="issue-edit-save" data-ajax-val="val" data-ajax-field="issue_id"/>
+ <p class="info pull-left">
+ {{if .IsIssueOwner}}<a class="btn btn-default pull-right issue-edit" href="#" id="issue-edit-btn">Edit</a>
+ <a class="btn btn-danger pull-right issue-edit-cancel hidden" href="#">Cancel</a>
+ <a class="btn btn-primary pull-right issue-edit-save hidden" href="#" data-ajax="{{.RepoLink}}/issues/{{.Issue.Index}}" data-ajax-name="issue-edit-save" data-ajax-method="post">Save</a>{{end}}
+ <span class="status label label-{{if .Issue.IsClosed}}danger{{else}}success{{end}}">{{if .Issue.IsClosed}}Closed{{else}}Open{{end}}</span>
+ <a href="/user/{{.Issue.Poster.Name}}" class="author"><strong>{{.Issue.Poster.Name}}</strong></a> opened this issue
+ <span class="time">{{TimeSince .Issue.Created}}</span> · {{.Issue.NumComments}} comments
+ </p>
+ </div>
+ <div class="issue-main">
+ <div class="panel panel-default issue-content">
+ <div class="panel-body">
+ <div class="content markdown">
+ {{str2html .Issue.RenderedContent}}
+ </div>
+ <div class="issue-edit-content hidden">
+ <div class="form-group">
+ <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="issue-write active"><a href="#issue-edit-textarea" data-toggle="tab">Write</a></li>
+ <li class="issue-preview"><a href="#issue-edit-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-edit-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-edit-preview">Preview</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active" id="issue-edit-textarea">
+ <div class="form-group">
+ <input type="hidden" value="1" name="issueIndex">
+ <textarea class="form-control" name="content" id="issue-edit-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-edit-preview" data-ajax-val="val" data-ajax-field="text">{{.Issue.Content}}</textarea>
+ </div>
+ </div>
+ <div class="tab-pane issue-preview-content" id="issue-edit-preview">Loading...</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {{range .Comments}}
+ {{if eq .Type 0}}
+ <div class="issue-child" id="issue-comment-{{.Id}}">
+ <a class="user pull-left" href="/user/{{.Poster.Name}}"><img class="avatar" src="{{.Poster.AvatarLink}}" alt=""/></a>
+ <div class="issue-content panel panel-default">
+ <div class="panel-heading">
+ <a href="/user/{{.Poster.Name}}" class="user">{{.Poster.Name}}</a> commented <span class="time">{{TimeSince .Created}}</span>
+ <!-- <a class="issue-comment-del pull-right issue-action" href="#" title="Edit Comment"><i class="fa fa-times-circle"></i></a>
+ <a class="issue-comment-edit pull-right issue-action" href="#" title="Remove Comment" data-url="{remove-link}"><i class="fa fa-edit"></i></a> -->
+ <span class="role label label-default pull-right">Owner</span>
+ </div>
+ <div class="panel-body markdown">
+ {{str2html .Content}}
+ </div>
+ </div>
+ </div>
+ {{else if eq .Type 1}}
+ <div class="issue-child issue-opened">
+ <a class="user pull-left" href="/user/{{.Poster.Name}}"><img class="avatar" src="{{.Poster.AvatarLink}}" alt="" /></a>
+ <div class="issue-content">
+ <a class="user pull-left" href="/user/{{.Poster.Name}}">{{.Poster.Name}}</a> <span class="label label-success">Reopened</span> this issue <span class="time">{{TimeSince .Created}}</span>
+ </div>
+ </div>
+ {{else if eq .Type 2}}
+ <div class="issue-child issue-closed">
+ <a class="user pull-left" href="/user/{{.Poster.Name}}"><img class="avatar" src="{{.Poster.AvatarLink}}" alt=""/></a>
+ <div class="issue-content">
+ <a class="user pull-left" href="/user/{{.Poster.Name}}">{{.Poster.Name}}</a> <span class="label label-danger">Closed</span> this issue <span class="time">{{TimeSince .Created}}</span>
+ </div>
+ </div>
+ {{end}}
+ {{end}}
+ <hr class="issue-line"/>
+ {{if .SignedUser}}<div class="issue-child issue-reply">
+ <a class="user pull-left" href="/user/{{.SignedUser.Name}}"><img class="avatar" src="{{.SignedUser.AvatarLink}}" alt=""/></a>
+ <form class="panel panel-default issue-content" action="{{.RepoLink}}/comment/new" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="panel-body">
+ <div class="form-group">
+ <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="active issue-write"><a href="#issue-textarea" data-toggle="tab">Write</a></li>
+ <li class="issue-preview"><a href="#issue-preview" data-toggle="tab" data-ajax="/api/v1/markdown" data-ajax-name="issue-preview" data-ajax-context="{{.RepoLink}}" data-ajax-method="post" data-preview="#issue-preview">Preview</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane" id="issue-textarea">
+ <div class="form-group">
+ <input type="hidden" value="{{.Issue.Index}}" name="issueIndex"/>
+ <textarea class="form-control" name="content" id="issue-reply-content" rows="10" placeholder="Write some content" data-ajax-rel="issue-preview" data-ajax-val="val" data-ajax-field="text">{{.content}}</textarea>
+ </div>
+ </div>
+ <div class="tab-pane issue-preview-content" id="issue-preview">Loading...</div>
+ </div>
+ </div>
+ <div class="text-right">
+ <div class="form-group">
+ {{if .IsIssueOwner}}{{if .Issue.IsClosed}}
+ <input type="submit" class="btn-default btn issue-open" id="issue-open-btn" data-origin="Reopen" data-text="Reopen & Comment" name="change_status" value="Reopen"/>{{else}}
+ <input type="submit" class="btn-default btn issue-close" id="issue-close-btn" data-origin="Close" data-text="Close & Comment" name="change_status" value="Close"/>{{end}}{{end}}&nbsp;&nbsp;
+ <button class="btn-success btn" id="issue-reply-btn">Comment</button>
+ </div>
+ </div>
+ </div>
+ </form>
+ </div>{{else}}<div class="alert alert-warning"><a class="btn btn-success btn-lg" href="/user/sign_up">Sign up for free</a> to join this conversation. Already have an account? <a href="/user/login">Sign in to comment</a></div>{{end}}
+ </div>
+ </div>
+
+ <div class="issue-bar col-md-2">
+ <div class="labels" data-ajax="{{.Issue.Index}}/label">
+ <div class="pull-right action">
+ <button class="btn btn-default btn-sm" data-toggle="dropdown">
+ <i class="fa fa-tags"></i>
+ <span class="caret"></span>
+ </button>
+ <div class="dropdown-menu dropdown-menu-right no">
+ <ul class="list-unstyled">
+ {{range .Labels}}
+ <li class="{{if not .IsChecked}}no-{{end}}checked" data-id="{{.Id}}">
+ {{if .IsChecked}}<span class="check pull-left"><i class="fa fa-check"></i></span>{{end}}
+ <span class="color" style="background-color: {{.Color}}"></span>
+ <span class="name">{{.Name}}</span>
+ </li>
+ {{end}}
+ </ul>
+ </div>
+ </div>
+ <h4>Labels</h4>
+ {{if .Issue.Labels}}
+ {{range .Issue.Labels}}
+ <p id="label-{{.Id}}" class="label-item label-white" style="background-color: {{.Color}}"><strong>{{.Name}}</strong></p>
+ {{end}}
+ {{else}}
+ <p>None yet</p>
+ {{end}}
+ </div>
+ <div class="milestone" data-milestone="{{.Milestone.Id}}" data-ajax="{{.Issue.Index}}/milestone">
+ <div class="pull-right action">
+ <button class="btn btn-default btn-sm" data-toggle="dropdown">
+ <i class="fa fa-check-square-o"></i>
+ <span class="caret"></span>
+ </button>
+ <div class="dropdown-menu dropdown-menu-right">
+ <ul class="list-unstyled">
+ <li data-id="0" class="clear-milestone milestone-item hidden"><i class="fa fa-times-circle-o"></i> Clear milestone </li>
+ <li class="milestone-list">
+ <ul class="nav nav-tabs" data-init="tabs">
+ <li class="active"><a href="#milestone-open" data-toggle="tab">Open</a></li>
+ <li><a href="#milestone-close" data-toggle="tab">Closed</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active" id="milestone-open">
+ {{if not .OpenMilestones}}
+ <p class="milestone-item">Nothing to show</p>
+ {{else}}
+ <ul class="list-unstyled">
+ {{range .OpenMilestones}}
+ <li class="milestone-item" data-id="{{.Id}}">
+ <p><strong>{{.Name}}</strong></p>
+ <!-- <p>due to 3 days later</p> -->
+ </li>
+ {{end}}
+ </ul>
+ {{end}}
+ </div>
+
+ <div class="tab-pane" id="milestone-close">
+ {{if not .ClosedMilestones}}
+ <p class="milestone-item">Nothing to show</p>
+ {{else}}
+ <ul class="list-unstyled">
+ {{range .ClosedMilestones}}
+ <li class="milestone-item" data-id="{{.Id}}">
+ <p><strong>{{.Name}}</strong></p>
+ <p>Closed {{TimeSince .ClosedDate}}</p>
+ </li>
+ {{end}}
+ </ul>
+ {{end}}
+ </div>
+ </div>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <h4>Milestone</h4>
+ {{if .Milestone}}
+ <p class="completion{{if eq .Milestone.Completeness 0}} hidden{{end}}"><span style="width:{{.Milestone.Completeness}}%">&nbsp;</span></p>
+ <p class="name"><strong><a href="{{$.RepoLink}}/issues?milestone={{.Milestone.Index}}{{if $.Issue.IsClosed}}&state=closed{{end}}">{{.Milestone.Name}}</a></strong></p>
+ {{else}}
+ <p class="name">No milestone</p>
+ {{end}}
+ </div>
+
+ <div class="assignee" data-assigned="{{if .Issue.Assignee}}{{.Issue.Assignee.Id}}{{else}}0{{end}}" data-ajax="{{.Issue.Index}}/assignee">{{if .IsRepositoryOwner}}
+ <div class="pull-right action">
+ <button type="button" class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">
+ <i class="fa fa-group"></i>
+ <span class="caret"></span>
+ </button>
+ <div class="dropdown-menu dropdown-menu-right">
+ <ul class="list-unstyled">
+ <li data-uid="0" class="clear-assignee hidden"><i class="fa fa-times-circle-o"></i> Clear assignee</li>
+ {{range .Collaborators}}
+ <li data-uid="{{.Id}}"><img src="{{.AvatarLink}}"><strong>{{.Name}}</strong></li>
+ {{end}}
+ </ul>
+ </div>
+ </div>{{end}}
+ <h4>Assignee</h4>
+ <p>{{if .Issue.Assignee}}<img src="{{.Issue.Assignee.AvatarLink}}"><strong>{{.Issue.Assignee.Name}}</strong>{{else}}No one assigned{{end}}</p>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{{template "base/footer" .}}
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">&nbsp;&nbsp;
+ <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">&nbsp;</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">&nbsp;</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