Show icons when sidebar is collapsed.

This commit is contained in:
KOUNOIKE Yuusuke
2017-04-24 21:44:24 +09:00
committed by Naoki Takezoe
parent 150531a1e2
commit 6c5777801f
7 changed files with 91 additions and 19 deletions

View File

@@ -6,14 +6,16 @@
@import gitbucket.core.view.helpers
@menuitem(path: String, name: String, label: String, icon: String, count: Int = 0) = {
<li @if(active == name){class="active"}>
<li class = "treeview @if(active == name){active}">
@if(path.startsWith("http")){
<a href="@path" target="_blank">
<i class="menu-icon octicon octicon-@icon"></i> @label @if(count > 0) { <span class="label label-primary pull-right-container">@count</span> }
@helpers.menuicon(icon)
<span>@label</span> @if(count > 0){ <span class="label label-primary pull-right-container">@count</span> }
</a>
} else {
<a href="@helpers.url(repository)@path">
<i class="menu-icon octicon octicon-@icon"></i> @label @if(count > 0) { <span class="label label-primary pull-right-container">@count</span> }
@helpers.menuicon(icon)
<span>@label</span> @if(count > 0) { <span class="label label-primary pull-right-container">@count</span> }
</a>
}
</li>