mirror of https://github.com/wekan/wekan
The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
51 lines
1.2 KiB
var widgetTitles = {
|
|
filter: 'filter-cards',
|
|
background: 'change-background'
|
|
};
|
|
|
|
Template.boardSidebar.helpers({
|
|
currentWidget: function() {
|
|
return Session.get('currentWidget') + 'Sidebar';
|
|
},
|
|
currentWidgetTitle: function() {
|
|
return TAPi18n.__(widgetTitles[Session.get('currentWidget')]);
|
|
}
|
|
});
|
|
|
|
// Template.addMemberPopup.helpers({
|
|
// isBoardMember: function() {
|
|
// var user = Users.findOne(this._id);
|
|
// return user && user.isBoardMember();
|
|
// }
|
|
// });
|
|
|
|
Template.memberPopup.helpers({
|
|
user: function() {
|
|
return Users.findOne(this.userId);
|
|
},
|
|
memberType: function() {
|
|
var type = Users.findOne(this.userId).isBoardAdmin() ? 'admin' : 'normal';
|
|
return TAPi18n.__(type).toLowerCase();
|
|
}
|
|
});
|
|
|
|
// Template.removeMemberPopup.helpers({
|
|
// user: function() {
|
|
// return Users.findOne(this.userId)
|
|
// },
|
|
// board: function() {
|
|
// return currentBoard();
|
|
// }
|
|
// });
|
|
|
|
// Template.changePermissionsPopup.helpers({
|
|
// isAdmin: function() {
|
|
// return this.user.isBoardAdmin();
|
|
// },
|
|
// isLastAdmin: function() {
|
|
// if (! this.user.isBoardAdmin())
|
|
// return false;
|
|
// var nbAdmins = _.where(currentBoard().members, { isAdmin: true }).length;
|
|
// return nbAdmins === 1;
|
|
// }
|
|
// });
|
|
|