File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 6
6
<ViewButtons class =" mr-2" v-model =" view" />
7
7
<SortButtons v-if =" isComplete && catalogs.length > 1" v-model =" sort" />
8
8
</header >
9
- <SearchBox v-if =" isComplete && catalogs.length > 1" class =" mt-1 mb-1" v-model =" searchTerm" :placeholder =" $t('catalogs.filterByTitle') " />
9
+ <SearchBox v-if =" isComplete && catalogs.length > 1" class =" mt-1 mb-1" v-model =" searchTerm" :placeholder =" filterPlaceholder " />
10
10
<Pagination ref =" topPagination" v-if =" showPagination" :pagination =" pagination" placement =" top" @paginate =" paginate" />
11
11
<b-alert v-if =" searchTerm && catalogView.length === 0" variant =" warning" show >{{ $t('catalogs.noMatches') }}</b-alert >
12
12
<section class =" list" >
@@ -102,6 +102,9 @@ export default {
102
102
isComplete () {
103
103
return ! this .hasMore && ! this .showPagination ;
104
104
},
105
+ filterPlaceholder () {
106
+ return this .isComplete ? this .$t (' catalogs.filterByTitle' ) : this .$t (' catalogs.filterByTitleAndMore' );
107
+ },
105
108
showPagination () {
106
109
// Check whether any pagination links are available
107
110
return Object .values (this .pagination ).some (link => !! link);
@@ -118,15 +121,12 @@ export default {
118
121
if (this .searchTerm ) {
119
122
catalogs = catalogs .filter (catalog => {
120
123
let haystack = [ catalog .title ];
121
- if (catalog instanceof STAC ) {
124
+ if (catalog instanceof STAC && this . isComplete ) {
122
125
haystack .push (catalog .id );
123
126
if (Array .isArray (catalog .keywords )) {
124
127
haystack = haystack .concat (catalog .keywords );
125
128
}
126
129
}
127
- else {
128
- haystack .push (catalog .href );
129
- }
130
130
return Utils .search (this .searchTerm , haystack);
131
131
});
132
132
}
Original file line number Diff line number Diff line change 47
47
},
48
48
"catalogs" : {
49
49
"filterByTitle" : " Kataloge anhand des Titels filtern" ,
50
+ "filterByTitleAndMore" : " Kataloge anhand von Titel, Beschreibung und Schlüsselwörtern filtern" ,
50
51
"loadMore" : " Lade mehr..." ,
51
52
"noMatches" : " Keiner der Kataloge entspricht den Suchkriterien."
52
53
},
Original file line number Diff line number Diff line change 47
47
},
48
48
"catalogs" : {
49
49
"filterByTitle" : " Filter catalogs by title" ,
50
+ "filterByTitleAndMore" : " Filter catalogs by title, description and keywords" ,
50
51
"loadMore" : " Load more..." ,
51
52
"noMatches" : " No catalogs match the given search criteria."
52
53
},
You can’t perform that action at this time.
0 commit comments