diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-14 11:14:51 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-14 11:14:51 -0400 |
commit | 16bddd593a9c4cd075d5e4ad8ed69c049223aef1 (patch) | |
tree | 5d368c6eca7ffb9fbe5b13bc4de9f6cd190b9948 /templates | |
parent | e880a2fa48e1b5d9fc850a507cd7dcc605e47458 (diff) | |
download | gitea-16bddd593a9c4cd075d5e4ad8ed69c049223aef1.tar.gz gitea-16bddd593a9c4cd075d5e4ad8ed69c049223aef1.zip |
Finish change issue’s milestone
Diffstat (limited to 'templates')
-rw-r--r-- | templates/issue/create.tmpl | 28 | ||||
-rw-r--r-- | templates/issue/view.tmpl | 6 |
2 files changed, 21 insertions, 13 deletions
diff --git a/templates/issue/create.tmpl b/templates/issue/create.tmpl index 4b43116cca..34cecc78bd 100644 --- a/templates/issue/create.tmpl +++ b/templates/issue/create.tmpl @@ -48,25 +48,33 @@ </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"> - <li class="milestone-item" data-id="1"> - <p><strong>Milestone name</strong></p> - <p>due to 3 days later</p> - </li> - <li class="milestone-item" data-id="1"> - <p><strong>Milestone name</strong></p> - <p>due to 3 days later</p> + {{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"> - <li class="milestone-item" data-id="1"> - <p><strong>Milestone name</strong></p> - <p>closed 3 days ago</p> + {{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> diff --git a/templates/issue/view.tmpl b/templates/issue/view.tmpl index 5aeb9409e1..18ec5faf0e 100644 --- a/templates/issue/view.tmpl +++ b/templates/issue/view.tmpl @@ -100,7 +100,7 @@ </div> <div class="issue-bar col-md-2"> - <div class="milestone" data-milestone="0" data-ajax="{{.Issue.Index}}/milestone"> + <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> @@ -108,7 +108,7 @@ </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 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> @@ -138,7 +138,7 @@ {{range .ClosedMilestones}} <li class="milestone-item" data-id="{{.Id}}"> <p><strong>{{.Name}}</strong></p> - <p>{{TimeSince .ClosedDate}}</p> + <p>Closed {{TimeSince .ClosedDate}}</p> </li> {{end}} </ul> |