Fix milestone list and progress bar

This commit is contained in:
Naoki Takezoe
2015-12-10 12:03:15 +09:00
parent 4d8b47732e
commit 1c639474d3
4 changed files with 85 additions and 80 deletions

View File

@@ -13,7 +13,7 @@
@import gitbucket.core.view.helpers._
@import gitbucket.core.service.IssuesService.IssueInfo
@if(condition.nonEmpty){
<div>
<div style="width: 100%; display: inline-block;">
<a href="@gitbucket.core.service.IssuesService.IssueSearchCondition().toURL" class="header-link">
<i class="octicon octicon-x" ></i>
<span class="strong">Clear current search query, filters, and sorts</span>

View File

@@ -9,6 +9,7 @@
@issues.html.navigation("milestones", hasWritePermission, repository)
<br>
<table class="table table-bordered table-hover table-issues">
<thead>
<tr>
<th style="background-color: #eee;">
<span class="small">
@@ -23,16 +24,18 @@
</span>
</th>
</tr>
</thead>
<tbody>
@defining(milestones.filter { case (milestone, _, _) =>
milestone.closedDate.map(_ => state == "closed").getOrElse(state == "open")
}){ milestones =>
@milestones.map { case (milestone, openCount, closedCount) =>
<tr>
<td style="padding-top: 15px; padding-bottom: 15px;">
<div class="milestone row-fluid">
<div class="span4">
<div class="milestone row">
<div class="col-md-4">
<a href="@url(repository)/issues?milestone=@milestone.title&state=open" class="milestone-title">@milestone.title</a>
<div style="margin-top: 6px">
<div>
@if(milestone.closedDate.isDefined){
<span class="muted">Closed @helper.html.datetimeago(milestone.closedDate.get)</span>
} else {
@@ -48,7 +51,7 @@
}
</div>
</div>
<div class="span8">
<div class="col-md-8">
@progress(openCount + closedCount, closedCount)
<div>
<div>
@@ -92,6 +95,7 @@
</td>
</tr>
}
</tbody>
}
</table>
}

View File

@@ -1,6 +1,5 @@
@(total: Int, progress: Int)
<div class="milestone-progress">
@if(progress > 0){
<span class="milestone-progress" style="width: @((progress.toDouble / total.toDouble * 100).toInt)%;"></span>
}
<div class="progress" style="height: 12px; margin-bottom: 8px;">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="@((progress.toDouble / total.toDouble * 100).toInt)" aria-valuemin="0" aria-valuemax="100" style="width: @((progress.toDouble / total.toDouble * 100).toInt)%">
</div>
</div>

View File

@@ -1114,6 +1114,7 @@ div.milestone-menu a.delete {
color: #b00;
}
/*
div#milestone-progress-area {
display: inline-block;
}
@@ -1152,6 +1153,7 @@ div.issue-header {
padding-top: 12px;
padding-bottom: 12px;
}
*/
div.issue-info {
border-top: 1px solid #e5e5e5;