mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Made sort cards feature translatable.
This commit is contained in:
parent
70e7534933
commit
09a13ef75f
4 changed files with 37 additions and 32 deletions
|
@ -31,9 +31,9 @@ template(name="boardHeaderBar")
|
|||
if $eq watchLevel "muted"
|
||||
i.fa.fa-bell-slash
|
||||
span {{_ watchLevel}}
|
||||
a.board-header-btn.js-sort-cards(title="Sort Cards")
|
||||
a.board-header-btn.js-sort-cards(title="{{_ 'sort-cards'}}")
|
||||
i.fa.fa-sort
|
||||
| Sort By {{sortCardsBy.get}}
|
||||
| {{_ 'sort-cards'}} {{sortCardsBy.get}}
|
||||
|
||||
else
|
||||
a.board-header-btn.js-log-in(
|
||||
|
@ -255,14 +255,14 @@ template(name="boardCreateRulePopup")
|
|||
template(name="cardsSortPopup")
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.js-sort-due Due Date
|
||||
a.js-sort-due {{_ 'due-date'}}
|
||||
hr
|
||||
li
|
||||
a.js-sort-title Title(Alphabetically)
|
||||
a.js-sort-title {{_ 'title-alphabetically'}}
|
||||
hr
|
||||
li
|
||||
a.js-sort-created-desc Created At(Newest First)
|
||||
a.js-sort-created-desc {{_ 'created-at-newest-first'}}
|
||||
hr
|
||||
li
|
||||
a.js-sort-created-asc Created At(Oldest First)
|
||||
a.js-sort-created-asc {{_ 'created-at-oldest-first'}}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
const DOWNCLS = 'fa-sort-down';
|
||||
const UPCLS = 'fa-sort-up';
|
||||
*/
|
||||
const sortCardsBy = new ReactiveVar('')
|
||||
const sortCardsBy = new ReactiveVar('');
|
||||
Template.boardMenuPopup.events({
|
||||
'click .js-rename-board': Popup.open('boardChangeTitle'),
|
||||
'click .js-custom-fields'() {
|
||||
|
@ -371,49 +371,48 @@ BlazeComponent.extendComponent({
|
|||
}).register('listsortPopup');
|
||||
*/
|
||||
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click .js-sort-due'() {
|
||||
const sortBy = {
|
||||
'dueAt': 1
|
||||
}
|
||||
Session.set('sortBy',sortBy)
|
||||
sortCardsBy.set('Due Date')
|
||||
dueAt: 1,
|
||||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('due-date'));
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-sort-title'() {
|
||||
const sortBy = {
|
||||
'title': 1
|
||||
}
|
||||
Session.set('sortBy',sortBy)
|
||||
sortCardsBy.set('Title')
|
||||
title: 1,
|
||||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('title'));
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-sort-created-asc'() {
|
||||
const sortBy = {
|
||||
'createdAt': 1
|
||||
}
|
||||
Session.set('sortBy',sortBy)
|
||||
sortCardsBy.set('Date Created (Newest First)')
|
||||
createdAt: 1,
|
||||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('date-created-newest-first'));
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-sort-created-desc'() {
|
||||
const sortBy = {
|
||||
'createdAt': -1
|
||||
}
|
||||
Session.set('sortBy',sortBy)
|
||||
sortCardsBy.set('Date Created (Oldest First)')
|
||||
createdAt: -1,
|
||||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('date-created-oldest-first'));
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-sort-default'() {
|
||||
const sortBy = {
|
||||
'sort': 1
|
||||
}
|
||||
Session.set('sortBy',sortBy)
|
||||
sortCardsBy.set('Default')
|
||||
sort: 1,
|
||||
};
|
||||
Session.set('sortBy', sortBy);
|
||||
sortCardsBy.set(TAPi18n.__('default'));
|
||||
Popup.close();
|
||||
},
|
||||
},
|
||||
|
|
|
@ -964,5 +964,11 @@
|
|||
"number": "Number",
|
||||
"label-colors": "Label Colors",
|
||||
"label-names": "Label Names",
|
||||
"archived-at": "archived at"
|
||||
"archived-at": "archived at",
|
||||
"sort-cards": "Sort Cards",
|
||||
"cardsSortPopup-title": "Sort Cards",
|
||||
"due-date": "Due Date",
|
||||
"title-alphabetically": "Title (Alphabetically)",
|
||||
"created-at-newest-first": "Created At (Newest First)",
|
||||
"created-at-oldest-first": "Created At (Oldest First)"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue