mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
Replace the search tabs with the select box
This commit is contained in:
@@ -6,9 +6,7 @@
|
||||
@import gitbucket.core.service.RepositorySearchService
|
||||
@gitbucket.core.html.main("Search Results", Some(repository)){
|
||||
@gitbucket.core.search.html.menu("code", query, repository){
|
||||
@if(query.isEmpty) {
|
||||
<h4>Input the search keyword</h4>
|
||||
} else {
|
||||
@if(query.nonEmpty) {
|
||||
@if(files.isEmpty) {
|
||||
<h4>We couldn't find any code matching '@query'</h4>
|
||||
} else {
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
@import gitbucket.core.service.RepositorySearchService
|
||||
@gitbucket.core.html.main("Search Results", Some(repository)){
|
||||
@gitbucket.core.search.html.menu("issue", query, repository){
|
||||
@if(query.isEmpty){
|
||||
<h4>Input the search keyword</h4>
|
||||
} else {
|
||||
@if(query.nonEmpty) {
|
||||
@if(issues.isEmpty) {
|
||||
<h4>We couldn't find any code matching '@query'</h4>
|
||||
} else {
|
||||
|
||||
@@ -2,25 +2,13 @@
|
||||
repository: gitbucket.core.service.RepositoryService.RepositoryInfo)(body: Html)(implicit context: gitbucket.core.controller.Context)
|
||||
@import gitbucket.core.view.helpers
|
||||
@gitbucket.core.html.menu("", repository){
|
||||
<ul class="nav nav-tabs" style="margin-bottom: 20px;">
|
||||
<li@if(active=="code"){ class="active"}>
|
||||
<a href="@helpers.url(repository)/search?q=@helpers.urlEncode(query)&type=code">
|
||||
Files
|
||||
</a>
|
||||
</li>
|
||||
<li@if(active=="issue"){ class="active"}>
|
||||
<a href="@helpers.url(repository)/search?q=@helpers.urlEncode(query)&type=issue">
|
||||
Issues
|
||||
</a>
|
||||
</li>
|
||||
<li@if(active=="wiki"){ class="active"}>
|
||||
<a href="@helpers.url(repository)/search?q=@helpers.urlEncode(query)&type=wiki">
|
||||
Wiki
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form action="@helpers.url(repository)/search" method="GET" class="form-inline">
|
||||
<input type="text" name="q" value="@query" class="form-control" style="width: 400px; margin-bottom: 0px;"/>
|
||||
<select class="form-control" name="type">
|
||||
<option value="code" @if(active=="code" ){ selected }>Files</option>
|
||||
<option value="issue" @if(active=="issue"){ selected }>Issues</option>
|
||||
<option value="wiki" @if(active=="wiki" ){ selected }>Wiki</option>
|
||||
</select>
|
||||
<input type="text" name="q" value="@query" class="form-control" style="width: 250px; margin-bottom: 0px;"/>
|
||||
<input type="submit" value="Search" class="btn btn-default"/>
|
||||
<input type="hidden" name="type" value="@active"/>
|
||||
</form>
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
@import gitbucket.core.service.RepositorySearchService
|
||||
@gitbucket.core.html.main("Search Results", Some(repository)){
|
||||
@gitbucket.core.search.html.menu("wiki", query, repository){
|
||||
@if(query.isEmpty){
|
||||
<h4>Input the search keyword</h4>
|
||||
} else {
|
||||
@if(query.nonEmpty) {
|
||||
@if(wikis.isEmpty) {
|
||||
<h4>We couldn't find any code matching '@query'</h4>
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user