mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 04:56:02 +01:00
(refs #11) Add button for batch update.
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
@(body: Html)
|
@(buttonValue: String = "")(body: Html)
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">
|
<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown">
|
||||||
<i class="icon-cog"></i>
|
@if(buttonValue == ""){
|
||||||
|
<i class="icon-cog"></i>
|
||||||
|
} else {
|
||||||
|
<strong>@buttonValue</strong>
|
||||||
|
}
|
||||||
<span class="caret"></span>
|
<span class="caret"></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="dropdown-menu">
|
<ul class="dropdown-menu">
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<span id="label-assigned">No one is assigned</span>
|
<span id="label-assigned">No one is assigned</span>
|
||||||
@if(hasWritePermission){
|
@if(hasWritePermission){
|
||||||
<input type="hidden" name="assignedUserName" value=""/>
|
<input type="hidden" name="assignedUserName" value=""/>
|
||||||
@helper.html.dropdown {
|
@helper.html.dropdown() {
|
||||||
<li><a href="javascript:void(0);" class="assign" data-name=""><i class="icon-remove-circle"></i> Clear assignee</a></li>
|
<li><a href="javascript:void(0);" class="assign" data-name=""><i class="icon-remove-circle"></i> Clear assignee</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
@collaborators.map { collaborator =>
|
@collaborators.map { collaborator =>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<span id="label-milestone">No milestone</span>
|
<span id="label-milestone">No milestone</span>
|
||||||
@if(hasWritePermission){
|
@if(hasWritePermission){
|
||||||
<input type="hidden" name="milestoneId" value=""/>
|
<input type="hidden" name="milestoneId" value=""/>
|
||||||
@helper.html.dropdown {
|
@helper.html.dropdown() {
|
||||||
<li><a href="javascript:void(0);" class="milestone" data-id=""><i class="icon-remove-circle"></i> No milestone</a></li>
|
<li><a href="javascript:void(0);" class="milestone" data-id=""><i class="icon-remove-circle"></i> No milestone</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
@milestones.map { milestone =>
|
@milestones.map { milestone =>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
}.getOrElse("No one is assigned")
|
}.getOrElse("No one is assigned")
|
||||||
</span>
|
</span>
|
||||||
@if(hasWritePermission){
|
@if(hasWritePermission){
|
||||||
@helper.html.dropdown {
|
@helper.html.dropdown() {
|
||||||
<li><a href="javascript:void(0);" class="assign" data-name=""><i class="icon-remove-circle"></i> Clear assignee</a></li>
|
<li><a href="javascript:void(0);" class="assign" data-name=""><i class="icon-remove-circle"></i> Clear assignee</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
@collaborators.map { collaborator =>
|
@collaborators.map { collaborator =>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
}.getOrElse("No milestone")
|
}.getOrElse("No milestone")
|
||||||
</span>
|
</span>
|
||||||
@if(hasWritePermission){
|
@if(hasWritePermission){
|
||||||
@helper.html.dropdown {
|
@helper.html.dropdown() {
|
||||||
<li><a href="javascript:void(0);" class="milestone" data-id=""><i class="icon-remove-circle"></i> No milestone</a></li>
|
<li><a href="javascript:void(0);" class="milestone" data-id=""><i class="icon-remove-circle"></i> No milestone</a></li>
|
||||||
<li class="divider"></li>
|
<li class="divider"></li>
|
||||||
@milestones.map { milestone =>
|
@milestones.map { milestone =>
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
<strong>Labels</strong>
|
<strong>Labels</strong>
|
||||||
@if(hasWritePermission){
|
@if(hasWritePermission){
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
@helper.html.dropdown {
|
@helper.html.dropdown() {
|
||||||
@labels.map { label =>
|
@labels.map { label =>
|
||||||
<li>
|
<li>
|
||||||
<a href="#" class="toggle-label" data-label-id="@label.labelId">
|
<a href="#" class="toggle-label" data-label-id="@label.labelId">
|
||||||
@@ -134,7 +134,6 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
</ul>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
<span class="muted small">Milestone:</span> @milestones.find(_.milestoneId == condition.milestoneId.get.get).map(_.title)
|
<span class="muted small">Milestone:</span> @milestones.find(_.milestoneId == condition.milestoneId.get.get).map(_.title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@helper.html.dropdown {
|
@helper.html.dropdown() {
|
||||||
@if(condition.milestoneId.isDefined){
|
@if(condition.milestoneId.isDefined){
|
||||||
<li>
|
<li>
|
||||||
<a href="@condition.copy(milestoneId = None).toURL">
|
<a href="@condition.copy(milestoneId = None).toURL">
|
||||||
@@ -166,23 +166,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<table class="table table-bordered table-hover table-issues">
|
<table class="table table-bordered table-hover table-issues">
|
||||||
@issues.map { case (issue, labels, commentCount) =>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<a href="@url(repository)/issues/@issue.issueId" class="issue-title">@issue.title</a>
|
|
||||||
@labels.map { label =>
|
|
||||||
<span class="label-color small" style="background-color: #@label.color; color: #@label.fontColor; padding-left: 4px; padding-right: 4px">@label.labelName</span>
|
|
||||||
}
|
|
||||||
<span class="pull-right muted">#@issue.issueId</span>
|
|
||||||
<div class="small muted">
|
|
||||||
Opened by <a href="@url(issue.openedUserName)" class="username">@issue.openedUserName</a> @datetime(issue.registeredDate)
|
|
||||||
@if(commentCount > 0){
|
|
||||||
<i class="icon-comment"></i><a href="@url(repository)/issues/@issue.issueId" class="issue-comment-count">@commentCount @plural(commentCount, "comment")</a>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
}
|
|
||||||
@if(issues.isEmpty){
|
@if(issues.isEmpty){
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 20px; background-color: #eee; text-align: center;">
|
<td style="padding: 20px; background-color: #eee; text-align: center;">
|
||||||
@@ -194,6 +177,56 @@
|
|||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
} else {
|
||||||
|
<tr>
|
||||||
|
<td style="background-color: #eee;">
|
||||||
|
<div class="btn-group">
|
||||||
|
<button class="btn btn-mini"><strong>@if(condition.state == "open"){ Close } else { Reopen }</strong></button>
|
||||||
|
</div>
|
||||||
|
@helper.html.dropdown("Label") {
|
||||||
|
@labels.map { label =>
|
||||||
|
<li>
|
||||||
|
<a href="javascript:void(0);" class="toggle-label" data-label-id="@label.labelId">
|
||||||
|
<i class="icon-white"></i>
|
||||||
|
<span class="label" style="background-color: #@label.color;"> </span>
|
||||||
|
@label.labelName
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@helper.html.dropdown("Assignee") {
|
||||||
|
<li><a href="javascript:void(0);" class="assign" data-name=""><i class="icon-remove-circle"></i> Clear assignee</a></li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
}
|
||||||
|
@helper.html.dropdown("Milestone") {
|
||||||
|
<li><a href="javascript:void(0);" class="milestone" data-id=""><i class="icon-remove-circle"></i> Clear this milestone</a></li>
|
||||||
|
<li class="divider"></li>
|
||||||
|
@milestones.map { milestone =>
|
||||||
|
<li><a href="javascript:void(0);" class="milestone" data-id="@milestone.milestoneId"><i class="icon-white"></i> @milestone.title</a></li>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
@issues.map { case (issue, labels, commentCount) =>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<label class="checkbox" style="cursor: default;">
|
||||||
|
<input type="checkbox" value="@issue.issueId"/>
|
||||||
|
<a href="@url(repository)/issues/@issue.issueId" class="issue-title">@issue.title</a>
|
||||||
|
@labels.map { label =>
|
||||||
|
<span class="label-color small" style="background-color: #@label.color; color: #@label.fontColor; padding-left: 4px; padding-right: 4px">@label.labelName</span>
|
||||||
|
}
|
||||||
|
<span class="pull-right muted">#@issue.issueId</span>
|
||||||
|
<div class="small muted">
|
||||||
|
Opened by <a href="@url(issue.openedUserName)" class="username">@issue.openedUserName</a> @datetime(issue.registeredDate)
|
||||||
|
@if(commentCount > 0){
|
||||||
|
<i class="icon-comment"></i><a href="@url(repository)/issues/@issue.issueId" class="issue-comment-count">@commentCount @plural(commentCount, "comment")</a>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</label>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
}
|
}
|
||||||
</table>
|
</table>
|
||||||
<div class="pull-right">
|
<div class="pull-right">
|
||||||
@@ -215,6 +248,11 @@ $(function(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.table-issues input[type=checkbox]').change(function(){
|
||||||
|
$('.table-issues button').prop('disabled',
|
||||||
|
!$('.table-issues input[type=checkbox]').filter(':checked').length);
|
||||||
|
}).change();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user