mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 19:09:17 +02:00
See #559: Use translations mixins in filters
This commit is contained in:
parent
14a17de239
commit
2845bdd932
8 changed files with 53 additions and 45 deletions
|
@ -10,7 +10,7 @@
|
|||
<label><translate>Ordering</translate></label>
|
||||
<select class="ui dropdown" v-model="ordering">
|
||||
<option v-for="option in orderingOptions" :value="option[0]">
|
||||
{{ option[1] }}
|
||||
{{ sharedLabels.filters[option[1]] }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
@ -90,9 +90,10 @@ import _ from 'lodash'
|
|||
import Pagination from '@/components/Pagination'
|
||||
import ActionTable from '@/components/common/ActionTable'
|
||||
import OrderingMixin from '@/components/mixins/Ordering'
|
||||
import TranslationsMixin from '@/components/mixins/Translations'
|
||||
|
||||
export default {
|
||||
mixins: [OrderingMixin],
|
||||
mixins: [OrderingMixin, TranslationsMixin],
|
||||
props: {
|
||||
filters: {type: Object, required: false}
|
||||
},
|
||||
|
@ -113,8 +114,8 @@ export default {
|
|||
orderingDirection: defaultOrdering.direction || '+',
|
||||
ordering: defaultOrdering.field,
|
||||
orderingOptions: [
|
||||
['expiration_date', 'Expiration date'],
|
||||
['creation_date', 'Creation date']
|
||||
['expiration_date', 'expiration_date'],
|
||||
['creation_date', 'creation_date']
|
||||
]
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue