aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-05-12 14:06:42 -0400
committerUnknown <joe2010xtmf@163.com>2014-05-12 14:06:42 -0400
commit54e95fa367d8f9394522ce1fa6905a38974cbd23 (patch)
tree9318f670716cad34fe0b7e05e510b492fd4e0839 /templates
parentf1130ce5e9fa63df5e472a9c5fbd3e875f1ba9f5 (diff)
Finish add new milestone
Diffstat (limited to 'templates')
-rw-r--r--templates/admin/dashboard.tmpl2
-rw-r--r--templates/issue/milestone.tmpl40
-rw-r--r--templates/issue/milestone_new.tmpl2
3 files changed, 15 insertions, 29 deletions
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index 2de10b34..f709cb3f 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -10,7 +10,7 @@
</div>
<div class="panel-body">
- Gogs database has <b>{{.Stats.Counter.User}}</b> users, <b>{{.Stats.Counter.PublicKey}}</b> SSH keys, <b>{{.Stats.Counter.Repo}}</b> repositories, <b>{{.Stats.Counter.Watch}}</b> watches, <b>{{.Stats.Counter.Action}}</b> actions, <b>{{.Stats.Counter.Access}}</b> accesses, <b>{{.Stats.Counter.Issue}}</b> issues, <b>{{.Stats.Counter.Comment}}</b> comments, <b>{{.Stats.Counter.Mirror}}</b> mirrors, <b>{{.Stats.Counter.Oauth}}</b> oauthes, <b>{{.Stats.Counter.Release}}</b> releases, <b>{{.Stats.Counter.LoginSource}}</b> login sources, <b>{{.Stats.Counter.Webhook}}</b> webhooks.
+ Gogs database has <b>{{.Stats.Counter.User}}</b> users, <b>{{.Stats.Counter.PublicKey}}</b> SSH keys, <b>{{.Stats.Counter.Repo}}</b> repositories, <b>{{.Stats.Counter.Watch}}</b> watches, <b>{{.Stats.Counter.Action}}</b> actions, <b>{{.Stats.Counter.Access}}</b> accesses, <b>{{.Stats.Counter.Issue}}</b> issues, <b>{{.Stats.Counter.Comment}}</b> comments, <b>{{.Stats.Counter.Mirror}}</b> mirrors, <b>{{.Stats.Counter.Oauth}}</b> oauthes, <b>{{.Stats.Counter.Release}}</b> releases, <b>{{.Stats.Counter.LoginSource}}</b> login sources, <b>{{.Stats.Counter.Webhook}}</b> webhooks, <b>{{.Stats.Counter.Milestone}}</b> milestones.
</div>
</div>
diff --git a/templates/issue/milestone.tmpl b/templates/issue/milestone.tmpl
index 0b69a75d..3c2cf93a 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 2db55ae9..044b7d10 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>