@(state: String, issues: List[(gitbucket.core.service.IssuesService.IssueInfo, Option[(gitbucket.core.model.CommitState, List[gitbucket.core.model.CommitStatus])])], page: Int, collaborators: List[String], priorities: List[gitbucket.core.model.Priority], labels: List[gitbucket.core.model.Label], condition: gitbucket.core.service.IssuesService.IssueSearchCondition, milestones: List[(gitbucket.core.model.Milestone, Int, Int)], repository: gitbucket.core.service.RepositoryService.RepositoryInfo, hasWritePermission: Boolean)(implicit context: gitbucket.core.controller.Context) @import gitbucket.core.view.helpers @gitbucket.core.html.main(s"Milestones - ${repository.owner}/${repository.name}"){ @gitbucket.core.html.menu("milestones", repository){ @milestones.map { case (milestone, openCount, closedCount) =>

@milestone.title @if(milestone.closedDate.isDefined){ Closed @gitbucket.core.helper.html.datetimeago(milestone.closedDate.get) } else { @milestone.dueDate.map { dueDate => @if(helpers.isPast(dueDate)){ Due by @helpers.date(dueDate) } else { Due by @helpers.date(dueDate) } }.getOrElse { No due date } } @gitbucket.core.issues.milestones.html.progress(openCount + closedCount, closedCount) @if(closedCount == 0){ 0% } else { @((closedCount.toDouble / (openCount + closedCount).toDouble * 100).toInt)% } complete @openCount open @closedCount closed @milestone.description.map { description => @helpers.markdown( markdown = description, repository = repository, branch = repository.repository.defaultBranch, enableWikiLink = false, enableRefsLink = false, enableLineBreaks = true ) }

@gitbucket.core.issues.milestones.html.listparts(issues, page, openCount, closedCount, condition, collaborators, milestones.map(p => p._1), priorities, labels, Some(repository), hasWritePermission) @if(hasWritePermission){ } } } } @if(hasWritePermission){
}