mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 16:35:52 +01:00
@@ -4,7 +4,8 @@
|
|||||||
@import gitbucket.core.view.helpers
|
@import gitbucket.core.view.helpers
|
||||||
@gitbucket.core.helper.html.dropdown(
|
@gitbucket.core.helper.html.dropdown(
|
||||||
value = if(branch.length == 40) branch.substring(0, 10) else branch,
|
value = if(branch.length == 40) branch.substring(0, 10) else branch,
|
||||||
prefix = if(branch.length == 40) "tree" else if(repository.branchList.contains(branch)) "branch" else "tree"
|
prefix = if(branch.length == 40) "tree" else if(repository.branchList.contains(branch)) "branch" else "tree",
|
||||||
|
maxValueWidth = "200px"
|
||||||
) {
|
) {
|
||||||
<li><div id="branch-control-title">Switch branches<button id="branch-control-close" class="pull-right">×</button></div></li>
|
<li><div id="branch-control-title">Switch branches<button id="branch-control-close" class="pull-right">×</button></div></li>
|
||||||
<li><input id="branch-control-input" type="text" class="form-control input-sm dropdown-filter-input" placeholder="Find or create branch ..."/></li>
|
<li><input id="branch-control-input" type="text" class="form-control input-sm dropdown-filter-input" placeholder="Find or create branch ..."/></li>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
@(value : String = "",
|
@(value : String = "",
|
||||||
prefix: String = "",
|
prefix: String = "",
|
||||||
style : String = "",
|
style : String = "",
|
||||||
|
maxValueWidth : String = "",
|
||||||
right : Boolean = false,
|
right : Boolean = false,
|
||||||
filter: (String, String) = ("",""))(body: Html)
|
filter: (String, String) = ("",""))(body: Html)
|
||||||
@defining(if(filter._1.isEmpty) "" else filter._1 + "-" + scala.util.Random.alphanumeric.take(4).mkString){ filterId =>
|
@defining(if(filter._1.isEmpty) "" else filter._1 + "-" + scala.util.Random.alphanumeric.take(4).mkString){ filterId =>
|
||||||
<div class="btn-group" @if(style.nonEmpty){style="@style"}>
|
<div class="btn-group" @if(style.nonEmpty){style="@style"}>
|
||||||
<button
|
<button id = "test"
|
||||||
class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">
|
class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">
|
||||||
@if(value.isEmpty){
|
@if(value.isEmpty){
|
||||||
<i class="octicon octicon-gear"></i>
|
<i class="octicon octicon-gear"></i>
|
||||||
@@ -13,7 +14,10 @@
|
|||||||
@if(prefix.nonEmpty){
|
@if(prefix.nonEmpty){
|
||||||
<span class="muted">@prefix:</span>
|
<span class="muted">@prefix:</span>
|
||||||
}
|
}
|
||||||
<span class="strong">@value</span>
|
<span class="strong"
|
||||||
|
@if(maxValueWidth.nonEmpty){style="display:inline-block; vertical-align:bottom; overflow-x:hidden; max-width:@maxValueWidth; text-overflow:ellipsis"}>
|
||||||
|
@value
|
||||||
|
</span>
|
||||||
}
|
}
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user