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"
|
if $eq watchLevel "muted"
|
||||||
i.fa.fa-bell-slash
|
i.fa.fa-bell-slash
|
||||||
span {{_ watchLevel}}
|
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
|
i.fa.fa-sort
|
||||||
| Sort By {{sortCardsBy.get}}
|
| {{_ 'sort-cards'}} {{sortCardsBy.get}}
|
||||||
|
|
||||||
else
|
else
|
||||||
a.board-header-btn.js-log-in(
|
a.board-header-btn.js-log-in(
|
||||||
|
@ -255,14 +255,14 @@ template(name="boardCreateRulePopup")
|
||||||
template(name="cardsSortPopup")
|
template(name="cardsSortPopup")
|
||||||
ul.pop-over-list
|
ul.pop-over-list
|
||||||
li
|
li
|
||||||
a.js-sort-due Due Date
|
a.js-sort-due {{_ 'due-date'}}
|
||||||
hr
|
hr
|
||||||
li
|
li
|
||||||
a.js-sort-title Title(Alphabetically)
|
a.js-sort-title {{_ 'title-alphabetically'}}
|
||||||
hr
|
hr
|
||||||
li
|
li
|
||||||
a.js-sort-created-desc Created At(Newest First)
|
a.js-sort-created-desc {{_ 'created-at-newest-first'}}
|
||||||
hr
|
hr
|
||||||
li
|
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 DOWNCLS = 'fa-sort-down';
|
||||||
const UPCLS = 'fa-sort-up';
|
const UPCLS = 'fa-sort-up';
|
||||||
*/
|
*/
|
||||||
const sortCardsBy = new ReactiveVar('')
|
const sortCardsBy = new ReactiveVar('');
|
||||||
Template.boardMenuPopup.events({
|
Template.boardMenuPopup.events({
|
||||||
'click .js-rename-board': Popup.open('boardChangeTitle'),
|
'click .js-rename-board': Popup.open('boardChangeTitle'),
|
||||||
'click .js-custom-fields'() {
|
'click .js-custom-fields'() {
|
||||||
|
@ -371,49 +371,48 @@ BlazeComponent.extendComponent({
|
||||||
}).register('listsortPopup');
|
}).register('listsortPopup');
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
BlazeComponent.extendComponent({
|
BlazeComponent.extendComponent({
|
||||||
events() {
|
events() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
'click .js-sort-due'() {
|
'click .js-sort-due'() {
|
||||||
const sortBy = {
|
const sortBy = {
|
||||||
'dueAt': 1
|
dueAt: 1,
|
||||||
}
|
};
|
||||||
Session.set('sortBy',sortBy)
|
Session.set('sortBy', sortBy);
|
||||||
sortCardsBy.set('Due Date')
|
sortCardsBy.set(TAPi18n.__('due-date'));
|
||||||
Popup.close();
|
Popup.close();
|
||||||
},
|
},
|
||||||
'click .js-sort-title'() {
|
'click .js-sort-title'() {
|
||||||
const sortBy = {
|
const sortBy = {
|
||||||
'title': 1
|
title: 1,
|
||||||
}
|
};
|
||||||
Session.set('sortBy',sortBy)
|
Session.set('sortBy', sortBy);
|
||||||
sortCardsBy.set('Title')
|
sortCardsBy.set(TAPi18n.__('title'));
|
||||||
Popup.close();
|
Popup.close();
|
||||||
},
|
},
|
||||||
'click .js-sort-created-asc'() {
|
'click .js-sort-created-asc'() {
|
||||||
const sortBy = {
|
const sortBy = {
|
||||||
'createdAt': 1
|
createdAt: 1,
|
||||||
}
|
};
|
||||||
Session.set('sortBy',sortBy)
|
Session.set('sortBy', sortBy);
|
||||||
sortCardsBy.set('Date Created (Newest First)')
|
sortCardsBy.set(TAPi18n.__('date-created-newest-first'));
|
||||||
Popup.close();
|
Popup.close();
|
||||||
},
|
},
|
||||||
'click .js-sort-created-desc'() {
|
'click .js-sort-created-desc'() {
|
||||||
const sortBy = {
|
const sortBy = {
|
||||||
'createdAt': -1
|
createdAt: -1,
|
||||||
}
|
};
|
||||||
Session.set('sortBy',sortBy)
|
Session.set('sortBy', sortBy);
|
||||||
sortCardsBy.set('Date Created (Oldest First)')
|
sortCardsBy.set(TAPi18n.__('date-created-oldest-first'));
|
||||||
Popup.close();
|
Popup.close();
|
||||||
},
|
},
|
||||||
'click .js-sort-default'() {
|
'click .js-sort-default'() {
|
||||||
const sortBy = {
|
const sortBy = {
|
||||||
'sort': 1
|
sort: 1,
|
||||||
}
|
};
|
||||||
Session.set('sortBy',sortBy)
|
Session.set('sortBy', sortBy);
|
||||||
sortCardsBy.set('Default')
|
sortCardsBy.set(TAPi18n.__('default'));
|
||||||
Popup.close();
|
Popup.close();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -964,5 +964,11 @@
|
||||||
"number": "Number",
|
"number": "Number",
|
||||||
"label-colors": "Label Colors",
|
"label-colors": "Label Colors",
|
||||||
"label-names": "Label Names",
|
"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