Newer
Older
gitbucket_jkp / src / main / twirl / dashboard / pulls.scala.html
@Naoki Takezoe Naoki Takezoe on 14 Aug 2014 1 KB (refs #464)Switch to play-twirl
@(listparts: play.twirl.api.Html,
  counts: List[service.PullRequestService.PullRequestCount],
  repositories: List[(String, String, Int)],
  condition: service.IssuesService.IssueSearchCondition,
  filter: String)(implicit context: app.Context)
@import context._
@import view.helpers._
@html.main("Your Issues"){
<div class="container">
  @dashboard.html.tab("pulls")
  <div class="row-fluid">
    <div class="span3">
      <ul class="nav nav-pills nav-stacked">
        <li@if(filter == "created_by"){ class="active"}>
          <a href="@path/dashboard/pulls/owned@condition.toURL">
            <span class="count-right">@counts.find(_.userName == loginAccount.get.userName).map(_.count).getOrElse(0)</span>
            Yours
          </a>
        </li>
        <li@if(filter == "not_created_by"){ class="active"}>
          <a href="@path/dashboard/pulls/public@condition.toURL">
            <span class="count-right">@counts.filter(_.userName != loginAccount.get.userName).map(_.count).sum</span>
            Public
          </a>
        </li>
      </ul>
      <hr/>
      <ul class="nav nav-pills nav-stacked small">
        @repositories.map { case (owner, name, count) =>
        <li@if(condition.repo == Some(owner + "/" + name)){ class="active"}>
          <a href="@path/dashboard/pulls/for/@owner/@name">
            <span class="count-right">@count</span>
            @owner/@name
          </a>
        </li>
        }
      </ul>
    </div>
    @listparts
  </div>
</div>
}