mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
(refs #488)Add link to clear search condition
This commit is contained in:
@@ -341,6 +341,13 @@ object IssuesService {
|
|||||||
sort: String = "created",
|
sort: String = "created",
|
||||||
direction: String = "desc"){
|
direction: String = "desc"){
|
||||||
|
|
||||||
|
def isEmpty: Boolean = {
|
||||||
|
labels.isEmpty && milestoneId.isEmpty && author.isEmpty && assigned.isEmpty &&
|
||||||
|
state == "open" && sort == "created" && direction == "desc"
|
||||||
|
}
|
||||||
|
|
||||||
|
def nonEmpty: Boolean = !isEmpty
|
||||||
|
|
||||||
def toURL: String =
|
def toURL: String =
|
||||||
"?" + List(
|
"?" + List(
|
||||||
if(labels.isEmpty) None else Some("labels=" + urlEncode(labels.mkString(","))),
|
if(labels.isEmpty) None else Some("labels=" + urlEncode(labels.mkString(","))),
|
||||||
|
|||||||
@@ -74,6 +74,9 @@
|
|||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
*@
|
*@
|
||||||
|
@if(condition.nonEmpty){
|
||||||
|
<a href="@service.IssuesService.IssueSearchCondition().toURL">Clear current search query, filters, and sorts</a>
|
||||||
|
}
|
||||||
<table class="table table-bordered table-hover table-issues">
|
<table class="table table-bordered table-hover table-issues">
|
||||||
<tr>
|
<tr>
|
||||||
<th style="background-color: #eee;">
|
<th style="background-color: #eee;">
|
||||||
|
|||||||
Reference in New Issue
Block a user