Merge branch 'master' of https://github.com/wekan/wekan into search

This commit is contained in:
John R. Supplee 2021-01-13 01:29:46 +02:00
commit a647768368
86 changed files with 2878 additions and 409 deletions

View file

@ -0,0 +1,41 @@
template(name="brokenCardsHeaderBar")
h1
| {{_ 'broken-cards'}}
template(name="brokenCards")
.wrapper
.broken-cards-wrapper
each card in brokenCardsList
.broken-cards-card-wrapper
.broken-cards-card-title
= card.title
ul.broken-cards-context-list
li.broken-cards-context(title="{{_ 'board'}}")
if card.boardId
+viewer
= card.getBoard.title
else
.broken-cards-null
| NULL
li.broken-cards-context.broken-cards-context-separator
= ' '
| {{_ 'context-separator'}}
= ' '
li.broken-cards-context(title="{{_ 'swimlane'}}")
if card.swimlaneId
+viewer
= card.getSwimlane.title
else
.broken-cards-null
| NULL
li.broken-cards-context
= ' '
| {{_ 'context-separator'}}
= ' '
li.broken-cards-context(title="{{_ 'list'}}")
if card.listId
+viewer
= card.getList.title
else
.broken-cards-null
| NULL

View file

@ -0,0 +1,28 @@
BlazeComponent.extendComponent({}).register('brokenCardsHeaderBar');
Template.brokenCards.helpers({
userId() {
return Meteor.userId();
},
});
BlazeComponent.extendComponent({
onCreated() {
Meteor.subscribe('setting');
Meteor.subscribe('brokenCards');
},
brokenCardsList() {
const selector = {
$or: [
{ boardId: { $in: [null, ''] } },
{ swimlaneId: { $in: [null, ''] } },
{ listId: { $in: [null, ''] } },
{ permission: 'public' },
{ members: { $elemMatch: { userId: user._id, isActive: true } } },
],
};
return Cards.find(selector);
},
}).register('brokenCards');

View file

@ -0,0 +1,31 @@
.broken-cards-card-wrapper
margin-top: 0
margin-bottom: 10px
border-width: 3px !important
border-color: grey !important
border-style: solid
border-radius: 5px
padding: 1.5rem
background-color: white
.broken-cards-wrapper
max-width: 500px
margin-right: auto
margin-left: auto
.broken-cards-card-title
font-weight: bold
//padding: 10px
.broken-cards-context
display: inline-block
.broken-cards-context-separator
font-weight: bold
.broken-cards-context-list
//margin-bottom: 0.7rem
.broken-cards-null
color: darkred
font-style: italic

View file

@ -56,6 +56,7 @@ template(name="dueCardsViewChangePopup")
| {{_ 'dueCardsViewChange-choice-me'}}
if $eq Utils.dueCardsView "me"
i.fa.fa-check
hr
li
with "dueCardsViewChange-choice-all"
a.js-due-cards-view-all

View file

@ -82,14 +82,14 @@ BlazeComponent.extendComponent({
let selector = {
archived: false,
};
// if user is not an admin allow her to see cards only from public boards
// for every user including admin allow her to see cards only from public boards
// or those where she is a member
if (!user.isAdmin) {
selector.$or = [
{ permission: 'public' },
{ members: { $elemMatch: { userId: user._id, isActive: true } } },
];
}
//if (!user.isAdmin) {
selector.$or = [
{ permission: 'public' },
{ members: { $elemMatch: { userId: user._id, isActive: true } } },
];
//}
Boards.find(selector).forEach(board => {
permiitedBoards.push(board._id);
});

View file

@ -275,7 +275,10 @@ function mySafeAttrValue(tag, name, value, cssFilter) {
if (
/^thunderlink:/gi.test(value) ||
/^cbthunderlink:/gi.test(value) ||
/^aodroplink:/gi.test(value)
/^aodroplink:/gi.test(value) ||
/^onenote:/gi.test(value) ||
/^file:/gi.test(value) ||
/^mailspring:/gi.test(value)
) {
return value;
} else {

View file

@ -74,18 +74,8 @@ Template.userFormsLayout.helpers({
let name = lang.name;
if (lang.name === 'br') {
name = 'Brezhoneg';
} else if (lang.name === 'Español') {
name = 'español';
} else if (lang.name === 'Español de Argentina') {
name = 'español de Argentina';
} else if (lang.name === 'Español de Chile') {
name = 'español de Chile';
} else if (lang.name === 'Español de Colombia') {
name = 'español de Colombia';
} else if (lang.name === 'Español de México') {
name = 'español de México';
} else if (lang.name === 'Español de Puerto Rico') {
name = 'español de Puerto Rico';
} else if (lang.name === 'es-PY') {
name = 'Español de Paraguayo';
} else if (lang.name === 'fr-BE') {
name = 'Français (Belgique)';
} else if (lang.name === 'fr-CA') {

View file

@ -78,6 +78,7 @@ template(name="myCardsSortChangePopup")
| {{_ 'myCardsSortChange-choice-board'}}
if $eq Utils.myCardsSort "board"
i.fa.fa-check
hr
li
with "my-cards-sort-dueat"
a.js-my-cards-sort-dueat

View file

@ -59,7 +59,7 @@ BlazeComponent.extendComponent({
myCardsSort() {
// eslint-disable-next-line no-console
console.log('sort:', Utils.myCardsSort());
//console.log('sort:', Utils.myCardsSort());
return Utils.myCardsSort();
},