Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Frontend
Commits
478b0688
Commit
478b0688
authored
2 years ago
by
Erwan Rouchet
Committed by
Bastien Abadie
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add a sort option on the search form
parent
4c97153c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1394
Add a sort option on the search form
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Search/Form.vue
+17
-1
17 additions, 1 deletion
src/components/Search/Form.vue
with
17 additions
and
1 deletion
src/components/Search/Form.vue
+
17
−
1
View file @
478b0688
...
...
@@ -41,6 +41,19 @@
<!-- The input and label tags must be on the same line for the space between checkbox and label to show -->
</div>
<p
v-if=
"!sources.length"
class=
"help is-danger"
>
Please select at least one source
</p>
<div
class=
"columns"
>
<div
class=
"column is-narrow is-align-self-center"
>
<label
class=
"label"
>
Sort by
</label>
</div>
<div
class=
"column"
>
<div
class=
"select is-fullwidth"
>
<select
v-model=
"sort"
>
<option
value=
"relevance"
>
Relevance
</option>
<option
value=
"element_name"
>
Element name
</option>
</select>
</div>
</div>
</div>
</div>
</div>
<!-- Facet form -->
...
...
@@ -113,6 +126,7 @@ export default {
allSources
:
[
'
element
'
,
'
transcription
'
,
'
metadata
'
,
'
entity
'
],
sources
:
[
'
element
'
,
'
transcription
'
,
'
metadata
'
,
'
entity
'
],
facets
:
{},
sort
:
'
relevance
'
,
SEARCH_HELP
}),
methods
:
{
...
...
@@ -185,6 +199,7 @@ export default {
query
:
this
.
currentTerms
.
trim
()
||
'
*
'
,
only_facets
:
this
.
isEmpty
.
toString
(),
sources
:
[...
this
.
sources
],
sort
:
this
.
sort
,
...
checkedFacets
}
},
...
...
@@ -201,7 +216,8 @@ export default {
params
:
{
handler
:
'
parseParams
'
,
immediate
:
true
}
},
sort
:
'
submit
'
}
}
</
script
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment