mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 14:05:52 +01:00
Moved to octicon
This commit is contained in:
@@ -9,16 +9,11 @@
|
||||
@import context._
|
||||
@import gitbucket.core.view.helpers._
|
||||
|
||||
@sidemenu(path: String, name: String, label: String, count: Int = 0) = {
|
||||
@sidemenu(path: String, name: String, icon: String, label: String, count: Int = 0) = {
|
||||
<li @if(active == name){class="active"} @if(!expand){data-toggle="tooltip" data-placement="left" data-original-title="@label"}>
|
||||
<div class="@if(active == name){margin} else {gradient} pull-left"></div>
|
||||
<a href="@url(repository)@path">
|
||||
@if(active == name){
|
||||
<img src="@assets/common/images/menu-@{name}-active.png">
|
||||
} else {
|
||||
<img src="@assets/common/images/menu-@{name}-active.png" class="menu-icon-active" style="display:none;">
|
||||
<img src="@assets/common/images/menu-@{name}.png" class="menu-icon">
|
||||
}
|
||||
<i class="menu-icon @if(active == name){menu-icon-active} octicon octicon-@{icon} "></i>
|
||||
@if(expand){ @label}
|
||||
@if(expand && count > 0){
|
||||
<div class="pull-right"><span class="label">@count</span></div>
|
||||
@@ -71,12 +66,12 @@
|
||||
<div style="width: @if(expand){170px} else {40px};" class="pull-right">
|
||||
<ul class="sidemenu">
|
||||
<li style="height: 12px"><div class="gradient pull-left" style="height: 12px"></div></li>
|
||||
@sidemenu("" , "code" , "Code")
|
||||
@sidemenu("/issues", "issues", "Issues", repository.issueCount)
|
||||
@sidemenu("/pulls" , "pulls" , "Pull Requests", repository.pullCount)
|
||||
@sidemenu("/wiki" , "wiki" , "Wiki")
|
||||
@sidemenu("" , "code" , "code" , "Code")
|
||||
@sidemenu("/issues", "issues" , "issue-opened" , "Issues", repository.issueCount)
|
||||
@sidemenu("/pulls" , "pulls" , "git-pull-request" , "Pull Requests", repository.pullCount)
|
||||
@sidemenu("/wiki" , "wiki" , "book" , "Wiki")
|
||||
@if(loginAccount.isDefined && (loginAccount.get.isAdmin || repository.managers.contains(loginAccount.get.userName))){
|
||||
@sidemenu("/settings", "settings", "Settings")
|
||||
@sidemenu("/settings" , "settings" , "tools", "Settings")
|
||||
}
|
||||
<li style="height: 12px"><div class="gradient pull-left" style="height: 12px"></div></li>
|
||||
</ul>
|
||||
@@ -94,10 +89,10 @@
|
||||
}
|
||||
@id.map { id =>
|
||||
<div style="margin-top: 10px;">
|
||||
<a href="@{url(repository)}/archive/@{encodeRefName(id)}.zip" class="btn btn-small" style="width: 147px;"><i class="icon-download-alt"></i>Download ZIP</a>
|
||||
<a href="@{url(repository)}/archive/@{encodeRefName(id)}.zip" class="btn btn-small" style="width: 147px;font-weight: bold;"><i class="octicon octicon-cloud-download"></i>Download ZIP</a>
|
||||
</div>
|
||||
<div style="margin-top: 10px;">
|
||||
<a href="@{url(repository)}/archive/@{encodeRefName(id)}.tar.gz" class="btn btn-small" style="width: 147px;"><i class="icon-download-alt"></i>Download TAR.GZ</a>
|
||||
<a href="@{url(repository)}/archive/@{encodeRefName(id)}.tar.gz" class="btn btn-small" style="width: 147px;font-weight: bold;"><i class="octicon octicon-cloud-download"></i>Download TAR.GZ</a>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@@ -112,22 +107,19 @@
|
||||
<tr>
|
||||
<td style="width: 33%; text-align: center;">
|
||||
<a href="@url(repository)/commits/@encodeRefName(id.getOrElse(""))" class="header-link">
|
||||
<img src="@assets/common/images/header-commits-hover.png" class="header-icon-hover" style="display: none;"/>
|
||||
<img src="@assets/common/images/header-commits.png" class="header-icon"/>
|
||||
<i class="octicon octicon-history"></i>
|
||||
<strong>@repository.commitCount</strong> commits
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 33%; text-align: center;">
|
||||
<a href="@url(repository)/branches" class="header-link" class="header-link">
|
||||
<img src="@assets/common/images/header-branches-hover.png" class="header-icon-hover" style="display: none;"/>
|
||||
<img src="@assets/common/images/header-branches.png" class="header-icon"/>
|
||||
<i class="octicon octicon-git-branch"></i>
|
||||
<strong>@repository.branchList.length</strong> branches
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 33%; text-align: center;">
|
||||
<a href="@url(repository)/tags" class="header-link" class="header-link">
|
||||
<img src="@assets/common/images/header-tags-hover.png" class="header-icon-hover" style="display: none;"/>
|
||||
<img src="@assets/common/images/header-tags.png" class="header-icon"/>
|
||||
<i class="octicon octicon-tag"></i>
|
||||
<strong>@repository.tags.length</strong> releases
|
||||
</a>
|
||||
</td>
|
||||
@@ -140,44 +132,21 @@
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('a.header-link').mouseover(function(e){
|
||||
var target = e.target;
|
||||
if(e.target.tagName != 'A'){
|
||||
target = e.target.parentElement;
|
||||
}
|
||||
$(target).children('strong' ).css('color', '#0088cc');
|
||||
$(target).children('img.header-icon-hover').css('display', 'inline');
|
||||
$(target).children('img.header-icon' ).css('display', 'none');
|
||||
});
|
||||
|
||||
$('a.header-link').mouseout(function(e){
|
||||
var target = e.target;
|
||||
if(e.target.tagName != 'A'){
|
||||
target = e.target.parentElement;
|
||||
}
|
||||
$(target).children('strong' ).css('color', 'black');
|
||||
$(target).children('img.header-icon-hover').css('display', 'none');
|
||||
$(target).children('img.header-icon' ).css('display', 'inline');
|
||||
});
|
||||
|
||||
$('ul.sidemenu a').mouseover(function(e){
|
||||
var target = e.target;
|
||||
if(e.target.tagName == "IMG"){
|
||||
if(e.target.tagName == "I"){
|
||||
target = e.target.parentElement;
|
||||
}
|
||||
$(target).prev ('div.gradient' ).css('border-left', '1px solid silver');
|
||||
$(target).children('img.menu-icon-active').css('display', 'inline');
|
||||
$(target).children('img.menu-icon' ).css('display', 'none');
|
||||
});
|
||||
|
||||
$('ul.sidemenu a').mouseout(function(e){
|
||||
var target = e.target;
|
||||
if(e.target.tagName == "IMG"){
|
||||
if(e.target.tagName == "I"){
|
||||
target = e.target.parentElement;
|
||||
}
|
||||
$(target).prev ('div.gradient' ).css('border-left', '1px solid #eee');
|
||||
$(target).children('img.menu-icon-active').css('display', 'none');
|
||||
$(target).children('img.menu-icon' ).css('display', 'inline');
|
||||
});
|
||||
|
||||
$('a[rel*=facebox]').facebox({
|
||||
|
||||
Reference in New Issue
Block a user