Hide branch pulldown at Tags tab.

This commit is contained in:
takezoe
2013-07-11 12:50:05 +09:00
parent 7e4a295ef0
commit 88b8567d2b
2 changed files with 10 additions and 3 deletions

View File

@@ -1,15 +1,21 @@
@(id: String, repository: service.RepositoryService.RepositoryInfo, active: String)(implicit context: app.Context)
@(id: String, repository: service.RepositoryService.RepositoryInfo, active: String,
hideBranchPulldown: Boolean = false)(implicit context: app.Context)
@import context._
@import view.helpers._
<ul class="nav nav-tabs">
@if(!hideBranchPulldown){
<li>
<div class="btn-group" style="margin-right: 20px;">
<button class="btn dropdown-toggle" data-toggle="dropdown">
@if(id.length == 40){
tree: <strong>@id.substring(0, 10)</strong>
} else {
}
@if(repository.branchList.contains(id)){
branch: <strong>@id</strong>
}
@if(repository.tags.exists(_.name == id)){
tag: <strong>@id</strong>
}
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
@@ -19,6 +25,7 @@
</ul>
</div>
</li>
}
<li@if(active=="files"){ class="active"}><a href="@url(repository)/tree/@id">Files</a></li>
<li@if(active=="commits"){ class="active"}><a href="@url(repository)/commits/@id">Commits</a></li>
<li@if(active=="tags"){ class="active"}><a href="@url(repository)/tags">Tags@if(repository.tags.length > 0){ <span class="badge">@repository.tags.length</span>}</a></li>

View File

@@ -3,7 +3,7 @@
@import view.helpers._
@html.main(repository.owner + "/" + repository.name) {
@html.header("code", repository)
@tab("master", repository, "tags") @* TODO DON'T display branch pulldown *@
@tab(repository.repository.defaultBranch, repository, "tags", true)
<h1>Tags</h1>
<table class="table table-bordered">
<tr>