summaryrefslogtreecommitdiffstats
path: root/templates/issue
diff options
context:
space:
mode:
Diffstat (limited to 'templates/issue')
-rw-r--r--templates/issue/milestone.tmpl40
-rw-r--r--templates/issue/milestone_new.tmpl2
2 files changed, 14 insertions, 28 deletions
diff --git a/templates/issue/milestone.tmpl b/templates/issue/milestone.tmpl
index 0b69a75deb..3c2cf93a6c 100644
--- a/templates/issue/milestone.tmpl
+++ b/templates/issue/milestone.tmpl
@@ -6,10 +6,8 @@
<div id="issue">
<div class="col-md-3 filter-list">
<ul class="list-unstyled">
- <li><a href="{{.RepoLink}}/issues/milestones" class="active">Open Milestones <strong class="pull-right">1</strong></a></li>
- <!-- <li><a href="#">Assigned to you</a></li> -->
- <li><a href="{{.RepoLink}}/issues/milestones">Close Milestones <strong class="pull-right">0</strong></a></li>
- <!-- <li><a href="#">Mentioned</a></li> -->
+ <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">
@@ -18,34 +16,22 @@
</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="#">Milestone Title</a></h4>
- <span class="issue-open label label-success">12</span>
- <span class="issue-close label label-warning">2</span>
+ <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">{{.NumClosedIssues}}</span>
+ <span class="issue-close label label-warning">{{.NumOpenIssues}}</span>
<p class="actions pull-right">
- <a href="{{.RepoLink}}/issues/milestones/edit">Edit</a>
- <a href="#">Open</a>
- <a href="#">Close</a>
- <a class="text-danger" href="#">Delete</a>
- <a href="#">Issues</a>
+ <!-- <a href="{{$.RepoLink}}/issues/milestones/{{.Index}}/edit">Edit</a> -->
+ <!-- <a href="#">Open</a>
+ <a href="#">Close</a> -->
+ <!-- <a class="text-danger" href="#">Delete</a> -->
+ <a href="{{$.RepoLink}}/issues?milestone={{.Index}}{{if .IsClosed}}&state=closed{{end}}">Issues</a>
</p>
<hr/>
- <p class="description">In this version of release, users are able to register and log in/out on Gogs, setting up SSH keys and do most of Git operations through SSH with public repositories. And Web UI only for view of Git data, no extra features are supported.</p>
- </div>
- <div class="list-group-item milestone-item">
- <h4 class="title pull-left"><a href="#">Milestone Title</a></h4>
- <span class="issue-open label label-success">12</span>
- <span class="issue-close label label-warning">2</span>
- <p class="actions pull-right">
- <a href="{{.RepoLink}}/issues/milestones/edit">Edit</a>
- <a href="#">Open</a>
- <a href="#">Close</a>
- <a class="text-danger" href="#">Delete</a>
- <a href="#">Issues</a>
- </p>
- <hr/>
- <p class="description">In this version of release, users are able to register and log in/out on Gogs, setting up SSH keys and do most of Git operations through SSH with public repositories. And Web UI only for view of Git data, no extra features are supported.</p>
+ <p class="description">{{.RenderedContent | str2html}}</p>
</div>
+ {{end}}
</div>
</div>
</div>
diff --git a/templates/issue/milestone_new.tmpl b/templates/issue/milestone_new.tmpl
index 2db55ae91b..044b7d1061 100644
--- a/templates/issue/milestone_new.tmpl
+++ b/templates/issue/milestone_new.tmpl
@@ -34,7 +34,7 @@
<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>
+ <button class="btn-success btn">Create new milestone</button>
</div>
</div>
</div>