mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-12 00:15:50 +01:00
@@ -4,7 +4,8 @@
|
||||
@import gitbucket.core.view.helpers
|
||||
@gitbucket.core.helper.html.dropdown(
|
||||
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><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 = "",
|
||||
prefix: String = "",
|
||||
style : String = "",
|
||||
maxValueWidth : String = "",
|
||||
right : Boolean = false,
|
||||
filter: (String, String) = ("",""))(body: Html)
|
||||
@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"}>
|
||||
<button
|
||||
<button id = "test"
|
||||
class="dropdown-toggle btn btn-default btn-sm" data-toggle="dropdown">
|
||||
@if(value.isEmpty){
|
||||
<i class="octicon octicon-gear"></i>
|
||||
@@ -13,7 +14,10 @@
|
||||
@if(prefix.nonEmpty){
|
||||
<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>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user