mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 04:56:02 +01:00
Fix branch selector in repository viewer (#3813)
This commit is contained in:
@@ -67,7 +67,7 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
function updateBranchControlList(active) {
|
function updateBranchControlList(active) {
|
||||||
if (active == 'branches') {
|
if (active === 'branches') {
|
||||||
$('li#branch-control-tab-branches').addClass('active');
|
$('li#branch-control-tab-branches').addClass('active');
|
||||||
$('li#branch-control-tab-tags').removeClass('active');
|
$('li#branch-control-tab-tags').removeClass('active');
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
} else {
|
} else {
|
||||||
$('#branch-control-input').attr('placeholder', 'Find branch ...');
|
$('#branch-control-input').attr('placeholder', 'Find branch ...');
|
||||||
}
|
}
|
||||||
} else if (active == 'tags') {
|
} else if (active === 'tags') {
|
||||||
$('li#branch-control-tab-branches').removeClass('active');
|
$('li#branch-control-tab-branches').removeClass('active');
|
||||||
$('li#branch-control-tab-tags').addClass('active');
|
$('li#branch-control-tab-tags').addClass('active');
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,10 @@
|
|||||||
<div id="branchCtrlWrapper" style="display:inline;">
|
<div id="branchCtrlWrapper" style="display:inline;">
|
||||||
@gitbucket.core.helper.html.branchcontrol(branch, repository, hasWritePermission){
|
@gitbucket.core.helper.html.branchcontrol(branch, repository, hasWritePermission){
|
||||||
@repository.branchList.map { x =>
|
@repository.branchList.map { x =>
|
||||||
<li><a href="@helpers.url(repository)/blob/@helpers.encodeRefName((x :: pathList).mkString("/"))">@gitbucket.core.helper.html.checkicon(x == branch) @x</a></li>
|
<li class="branch-control-item-branch"><a href="@helpers.url(repository)/blob/@helpers.encodeRefName((x :: pathList).mkString("/"))">@gitbucket.core.helper.html.checkicon(x == branch) @x</a></li>
|
||||||
|
}
|
||||||
|
@repository.tags.map { x =>
|
||||||
|
<li class="branch-control-item-tag"><a href="@helpers.url(repository)/blob/@helpers.encodeRefName((x.name :: pathList).mkString("/"))">@gitbucket.core.helper.html.checkicon(x.name == branch) @x.name</a></li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,10 @@
|
|||||||
@if(pathList.isEmpty){
|
@if(pathList.isEmpty){
|
||||||
@gitbucket.core.helper.html.branchcontrol(branch, repository, hasWritePermission){
|
@gitbucket.core.helper.html.branchcontrol(branch, repository, hasWritePermission){
|
||||||
@repository.branchList.map { x =>
|
@repository.branchList.map { x =>
|
||||||
<li><a href="@helpers.url(repository)/commits/@helpers.encodeRefName(x)">@gitbucket.core.helper.html.checkicon(x == branch) @x</a></li>
|
<li class="branch-control-item-branch"><a href="@helpers.url(repository)/commits/@helpers.encodeRefName(x)">@gitbucket.core.helper.html.checkicon(x == branch) @x</a></li>
|
||||||
|
}
|
||||||
|
@repository.tags.map { x =>
|
||||||
|
<li class="branch-control-item-tag"><a href="@helpers.url(repository)/commits/@helpers.encodeRefName(x.name)">@gitbucket.core.helper.html.checkicon(x.name == branch) @x.name</a></li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user