Newer
Older
GitBucket / src / main / twirl / gitbucket / core / issues / navigation.scala.html
@Naoki Takezoe Naoki Takezoe on 22 Mar 2016 1 KB Separate labels and milestones from issues
@(active: String,
  newButton: Boolean,
  repository: gitbucket.core.service.RepositoryService.RepositoryInfo,
  openCount: Int,
  closedCount: Int,
  condition: gitbucket.core.service.IssuesService.IssueSearchCondition)(implicit context: gitbucket.core.controller.Context)
@import context._
@import gitbucket.core.view.helpers._

<ul class="nav nav-pills pull-left" style="line-height: 14px; margin-bottom: 10px;">
  <li class="@if(condition.state == "open"){active}">
    <a href="@condition.copy(state = "open").toURL">Open <span class="badge">@openCount</span></a>
  </li>
  <li class="@if(condition.state == "closed"){active}">
    <a href="@condition.copy(state = "closed").toURL">Closed <span class="badge">@closedCount</span></a>
  </li>
</ul>
<form method="GET" id="search-filter-form" class="form-inline pull-right">
  @if(loginAccount.isDefined){
    @if(newButton){
      @if(active == "issues"){
        <a class="btn btn-success" href="@url(repository)/issues/new">New issue</a>
      }
      @if(active == "pulls"){
        <a class="btn btn-success" href="@url(repository)/compare">New pull request</a>
      }
      @if(active == "labels"){
        <a class="btn btn-success" href="javascript:void(0);" id="new-label-button">New label</a>
      }
      @if(active == "milestones"){
        <a class="btn btn-success" href="@url(repository)/issues/milestones/new">New milestone</a>
      }
    }
  }
</form>