Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
46e47e3fc9 | ||
|
|
d4b3dc7472 | ||
|
|
df47dcc3f3 | ||
|
|
bfc16fc544 | ||
|
|
991e1baffd | ||
|
|
cd54ced1b2 | ||
|
|
f88c3755e0 | ||
|
|
0592b0c56a | ||
|
|
a0b72d0287 | ||
|
|
7a419c1563 | ||
|
|
ea42a3763f | ||
|
|
0f6a60fa69 | ||
|
|
a58b27e9b0 | ||
|
|
cfdeaf2f5d | ||
|
|
b64cd358ed | ||
|
|
12034ab619 | ||
|
|
ad482d5cfb | ||
|
|
885de88d35 | ||
|
|
223fb78bd8 | ||
|
|
077e78d37c | ||
|
|
e49d3923d0 | ||
|
|
65795a673e | ||
|
|
e39e0c9a85 | ||
|
|
f35b042324 | ||
|
|
9c8d5c2613 | ||
|
|
03bfd9a2b5 | ||
|
|
07aa1fd276 | ||
|
|
5aca681b36 | ||
|
|
94f466102e | ||
|
|
08866ae20b | ||
|
|
f73bdcdfb6 | ||
|
|
6410012384 | ||
|
|
93a24aaef8 | ||
|
|
688a31877b | ||
|
|
e9b9f204a5 | ||
|
|
dfee3a7a7c | ||
|
|
d03e2170dd | ||
|
|
d0cdc33c19 | ||
|
|
b7e1521e0d | ||
|
|
ed12cfe160 | ||
|
|
5578949bf5 | ||
|
|
5603d159b3 | ||
|
|
9e2093d6ae | ||
|
|
b7137e617e | ||
|
|
2c33f71ba7 | ||
|
|
56c2c24638 | ||
|
|
a8453657c9 | ||
|
|
55ff74de95 | ||
|
|
e2f7b1ec05 | ||
|
|
1cd2d28a3b | ||
|
|
c7808c5c03 | ||
|
|
3ed9f07015 | ||
|
|
676d2c46a1 | ||
|
|
b5f1a6b08b | ||
|
|
d9616b6d94 | ||
|
|
4812cb6412 |
No files matched your search
@@ -1,3 +1,90 @@
|
||||
# v4.69 2021-01-02 Wekan release
|
||||
|
||||
This release adds the following new features:
|
||||
|
||||
- Teams/Organizations to Admin Panel. In Progress.
|
||||
[Part 2](https://github.com/wekan/wekan/commit/ad482d5cfb72591f1b5c749c3c0156000dbf660a).
|
||||
[Part 3](https://github.com/wekan/wekan/commit/b64cd358ed0af4395357423ad172b8dac9dc3178).
|
||||
Thanks to xet7.
|
||||
- [My Cards](https://github.com/wekan/wekan/pull/3413).
|
||||
Thanks to jrsupplee.
|
||||
|
||||
and adds the following UI changes:
|
||||
|
||||
- [Moved Public/Archive/Templates/etc options to click right top username Member Settings menu, where My Cards also
|
||||
is](https://github.com/wekan/wekan/commit/0592b0c56ac372c87dea17f0a090e7d7569430d1).
|
||||
Thanks to xet7.
|
||||
- [Reorder My Cards to be first at menu](https://github.com/wekan/wekan/commit/bfc16fc5442e8cc8c3cc03df992d5b1d1724338b).
|
||||
Thanks to xet7.
|
||||
|
||||
and fixes the following bugs:
|
||||
|
||||
- [New Checklistitems are now autoresized too](https://github.com/wekan/wekan/pull/3411).
|
||||
Thanks to mfilser.
|
||||
- [Swimlane + and = Icons resized for better handling at mobile view](https://github.com/wekan/wekan/pull/3412).
|
||||
Thanks to mfilser.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v4.68 2020-12-29 Wekan release
|
||||
|
||||
This release fixes the following bugs:
|
||||
|
||||
- [Checklist-Items, Drag-Drop Handle now at the left side](https://github.com/wekan/wekan/pull/3407).
|
||||
Thanks to mfilser.
|
||||
- [Checklist-Items, Autoresize the textarea vertically to fit the user-input](https://github.com/wekan/wekan/pull/3408).
|
||||
Thanks to mfilser.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v4.67 2020-12-29 Wekan release
|
||||
|
||||
This release adds the following new features:
|
||||
|
||||
- Teams/Organizations to Admin Panel. In Progress.
|
||||
[Part 1](https://github.com/wekan/wekan/commit/9e2093d6aed38e66fc4d63823315c9382e013a32).
|
||||
Thanks to xet7.
|
||||
|
||||
and fixes the following bugs:
|
||||
|
||||
- [Checklist Mini-Screen, appendTo: 'parent' not necessary anymore](https://github.com/wekan/wekan/pull/3405).
|
||||
Thanks to mfilser.
|
||||
- [Allow to edit email verified and initials at Admin Panel/People/People](https://github.com/wekan/wekan/commit/d03e2170dd10741bd78722cc35b52cffa220a2e7).
|
||||
Thanks to xet7.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v4.66 2020-12-27 Wekan release
|
||||
|
||||
This release fixes the following bugs:
|
||||
|
||||
- [Fix Mobile miniscreen: Drag handle not visible in long checklist item
|
||||
text](https://github.com/wekan/wekan/commit/a8453657c95a4bde2ae86b4c77e55bb2174adf26).
|
||||
Thanks to xet7.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v4.65 2020-12-26 Wekan release
|
||||
|
||||
This release fixes the following bugs:
|
||||
|
||||
- [Fixed Drag and drop between checklists closes the card sometimes on
|
||||
Firefox](https://github.com/wekan/wekan/commit/c7808c5c03f98eae709e5ef89e8e17af4689cb2e).
|
||||
xet7 thanks mfilser about [similar fix of appendTo parent](https://github.com/wekan/wekan/pull/3342)
|
||||
that did work here too to fix this.
|
||||
Thanks to mfilser and xet7.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v4.64 2020-12-24 Wekan release
|
||||
|
||||
This release fixes the following bugs:
|
||||
|
||||
- [Dark theme button background fix](https://github.com/wekan/wekan/pull/3401).
|
||||
Thanks to jasontamez.
|
||||
|
||||
Thanks to above GitHub users for their contributions and translators for their translations.
|
||||
|
||||
# v4.63 2020-12-21 Wekan release
|
||||
|
||||
This release fixes the following bugs:
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
appId: wekan-public/apps/77b94f60-dec9-0136-304e-16ff53095928
|
||||
appVersion: "v4.63.0"
|
||||
appVersion: "v4.69.0"
|
||||
files:
|
||||
userUploads:
|
||||
- README.md
|
||||
|
||||
@@ -15,7 +15,8 @@ setBoardColor(color)
|
||||
.is-selected .minicard
|
||||
border-left: 3px solid color
|
||||
|
||||
button[type=submit].primary, input[type=submit].primary
|
||||
button[type=submit].primary, input[type=submit].primary,
|
||||
.sidebar .sidebar-content .sidebar-btn
|
||||
background-color: darken(color, 20%)
|
||||
|
||||
&.pop-over .pop-over-list li a:not(.disabled):hover,
|
||||
|
||||
@@ -60,10 +60,10 @@ template(name="boardList")
|
||||
|
||||
template(name="boardListHeaderBar")
|
||||
h1 {{_ title }}
|
||||
.board-header-btns.right
|
||||
a.board-header-btn.js-open-archived-board
|
||||
i.fa.fa-archive
|
||||
span {{_ 'archives'}}
|
||||
a.board-header-btn(href="{{pathFor 'board' id=templatesBoardId slug=templatesBoardSlug}}")
|
||||
i.fa.fa-clone
|
||||
span {{_ 'templates'}}
|
||||
//.board-header-btns.right
|
||||
// a.board-header-btn.js-open-archived-board
|
||||
// i.fa.fa-archive
|
||||
// span {{_ 'archives'}}
|
||||
// a.board-header-btn(href="{{pathFor 'board' id=templatesBoardId slug=templatesBoardSlug}}")
|
||||
// i.fa.fa-clone
|
||||
// span {{_ 'templates'}}
|
||||
@@ -102,9 +102,9 @@ template(name='checklistItemDetail')
|
||||
if canModifyCard
|
||||
.check-box-container
|
||||
.check-box.materialCheckBox(class="{{#if item.isFinished }}is-checked{{/if}}")
|
||||
if isMiniScreenOrShowDesktopDragHandles
|
||||
span.fa.checklistitem-handle(class="fa-arrows" title="{{_ 'dragChecklistItem'}}")
|
||||
.item-title.js-open-inlined-form.is-editable(class="{{#if item.isFinished }}is-checked{{/if}}")
|
||||
if isMiniScreenOrShowDesktopDragHandles
|
||||
span.fa.checklistitem-handle(class="fa-arrows" title="{{_ 'dragChecklistItem'}}")
|
||||
+viewer
|
||||
= item.title
|
||||
else
|
||||
|
||||
@@ -6,7 +6,7 @@ function initSorting(items) {
|
||||
helper: 'clone',
|
||||
items: '.js-checklist-item:not(.placeholder)',
|
||||
connectWith: '.js-checklist-items',
|
||||
appendTo: '.board-canvas',
|
||||
appendTo: 'parent',
|
||||
distance: 7,
|
||||
placeholder: 'checklist-item placeholder',
|
||||
scroll: false,
|
||||
@@ -59,7 +59,6 @@ BlazeComponent.extendComponent({
|
||||
if (Utils.isMiniScreenOrShowDesktopDragHandles()) {
|
||||
$(self.itemsDom).sortable({
|
||||
handle: 'span.fa.checklistitem-handle',
|
||||
appendTo: 'parent',
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -224,6 +223,14 @@ Template.checklists.helpers({
|
||||
},
|
||||
});
|
||||
|
||||
Template.addChecklistItemForm.onRendered(() => {
|
||||
autosize($('textarea.js-add-checklist-item'));
|
||||
});
|
||||
|
||||
Template.editChecklistItemForm.onRendered(() => {
|
||||
autosize($('textarea.js-edit-checklist-item'));
|
||||
});
|
||||
|
||||
Template.checklistDeleteDialog.onCreated(() => {
|
||||
const $cardDetails = this.$('.card-details');
|
||||
this.scrollState = {
|
||||
|
||||
@@ -134,7 +134,7 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
|
||||
background-color: darken(white, 8%)
|
||||
|
||||
.check-box-container
|
||||
padding-right: 1px;
|
||||
padding-right: 10px;
|
||||
|
||||
.check-box
|
||||
margin: 0.1em 0 0 0;
|
||||
@@ -144,7 +144,6 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
|
||||
|
||||
.item-title
|
||||
flex: 1
|
||||
margin-left: 10px;
|
||||
&.is-checked
|
||||
color: #8c8c8c
|
||||
font-style: italic
|
||||
@@ -157,7 +156,8 @@ textarea.js-add-checklist-item, textarea.js-edit-checklist-item
|
||||
max-width: 420px
|
||||
|
||||
span.fa.checklistitem-handle
|
||||
float: right
|
||||
padding-top: 2px
|
||||
padding-right: 10px;
|
||||
|
||||
.js-delete-checklist-item
|
||||
margin: 0 0 0.5em 1.33em
|
||||
|
||||
@@ -38,10 +38,10 @@ template(name="header")
|
||||
span.fa.fa-home
|
||||
| {{_ 'all-boards'}}
|
||||
li.separator -
|
||||
li
|
||||
a(href="{{pathFor 'public'}}")
|
||||
span.fa.fa-globe
|
||||
| {{_ 'public'}}
|
||||
//li
|
||||
// a(href="{{pathFor 'public'}}")
|
||||
// span.fa.fa-globe
|
||||
// | {{_ 'public'}}
|
||||
each currentUser.starredBoards
|
||||
li.separator -
|
||||
li(class="{{#if $.Session.equals 'currentBoard' _id}}current{{/if}}")
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
template(name="myCardsHeaderBar")
|
||||
h1
|
||||
a.back-btn(href="{{pathFor 'home'}}")
|
||||
i.fa.fa-chevron-left
|
||||
| {{_ 'my-cards'}}
|
||||
|
||||
template(name="myCardsModalTitle")
|
||||
h2
|
||||
i.fa.fa-keyboard-o
|
||||
| {{_ 'my-cards'}}
|
||||
|
||||
template(name="myCards")
|
||||
.wrapper
|
||||
each board in cardsFind
|
||||
.board-title
|
||||
| {{_ 'board' }}:
|
||||
= board.title
|
||||
each swimlane in board.swimlanes
|
||||
.swimlane-title
|
||||
| {{_ 'swimlane' }}:
|
||||
= swimlane.title
|
||||
each list in swimlane.lists
|
||||
.list-title
|
||||
| {{_ 'list' }}:
|
||||
= list.title
|
||||
each card in list.cards
|
||||
a.minicard-wrapper.card-title(href="{{pathFor 'card' boardId=board.id slug=board.slug cardId=card._id }}")
|
||||
+minicard(card)
|
||||
@@ -0,0 +1,154 @@
|
||||
const subManager = new SubsManager();
|
||||
Meteor.subscribe('myCards');
|
||||
Meteor.subscribe('mySwimlanes');
|
||||
Meteor.subscribe('myLists');
|
||||
|
||||
Template.myCardsHeaderBar.events({
|
||||
'click .js-open-archived-board'() {
|
||||
Modal.open('archivedBoards');
|
||||
},
|
||||
});
|
||||
|
||||
Template.myCardsHeaderBar.helpers({
|
||||
title() {
|
||||
return FlowRouter.getRouteName() === 'home' ? 'my-boards' : 'public';
|
||||
},
|
||||
templatesUser() {
|
||||
return Meteor.user();
|
||||
},
|
||||
});
|
||||
|
||||
Template.myCards.helpers({
|
||||
userId() {
|
||||
return Meteor.userId();
|
||||
},
|
||||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
Meteor.subscribe('setting');
|
||||
// subManager.subscribe('myCards');
|
||||
},
|
||||
|
||||
cardsFind() {
|
||||
const userId = Meteor.userId();
|
||||
const boards = [];
|
||||
let board = null;
|
||||
let swimlane = null;
|
||||
let list = null;
|
||||
|
||||
const cursor = Cards.find(
|
||||
{
|
||||
archived: false,
|
||||
$or: [{ members: userId }, { assignees: userId }],
|
||||
},
|
||||
{
|
||||
sort: {
|
||||
boardId: 1,
|
||||
swimlaneId: 1,
|
||||
listId: 1,
|
||||
sort: 1,
|
||||
},
|
||||
},
|
||||
);
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('cursor:', cursor);
|
||||
|
||||
let newBoard = false;
|
||||
let newSwimlane = false;
|
||||
let newList = false;
|
||||
|
||||
cursor.forEach(card => {
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('card:', card.title);
|
||||
if (list === null || list.id !== card.listId) {
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('new list');
|
||||
let l = Lists.findOne(card.listId);
|
||||
if (!l) {
|
||||
l = {
|
||||
_id: card.listId,
|
||||
title: 'undefined list',
|
||||
};
|
||||
}
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('list:', l);
|
||||
list = {
|
||||
id: l._id,
|
||||
title: l.title,
|
||||
cards: [card],
|
||||
};
|
||||
newList = true;
|
||||
}
|
||||
if (swimlane === null || card.swimlaneId !== swimlane.id) {
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('new swimlane');
|
||||
let s = Swimlanes.findOne(card.swimlaneId);
|
||||
if (!s) {
|
||||
s = {
|
||||
_id: card.swimlaneId,
|
||||
title: 'undefined swimlane',
|
||||
};
|
||||
}
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('swimlane:', s);
|
||||
swimlane = {
|
||||
id: s._id,
|
||||
title: s.title,
|
||||
lists: [list],
|
||||
};
|
||||
newSwimlane = true;
|
||||
}
|
||||
if (board === null || card.boardId !== board.id) {
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('new board');
|
||||
const b = Boards.findOne(card.boardId);
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('board:', b, b._id, b.title);
|
||||
board = {
|
||||
id: b._id,
|
||||
title: b.title,
|
||||
slug: b.slug,
|
||||
swimlanes: [swimlane],
|
||||
};
|
||||
newBoard = true;
|
||||
}
|
||||
|
||||
if (newBoard) {
|
||||
boards.push(board);
|
||||
} else if (newSwimlane) {
|
||||
board.swimlanes.push(swimlane);
|
||||
} else if (newList) {
|
||||
swimlane.lists.push(list);
|
||||
} else {
|
||||
list.cards.push(card);
|
||||
}
|
||||
|
||||
newBoard = false;
|
||||
newSwimlane = false;
|
||||
newList = false;
|
||||
});
|
||||
|
||||
// eslint-disable-next-line no-console
|
||||
// console.log('boards:', boards);
|
||||
return boards;
|
||||
},
|
||||
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click .js-my-card'(evt) {
|
||||
const card = this.currentData().card;
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('currentData():', this.currentData());
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('card:', card);
|
||||
if (card) {
|
||||
Utils.goCardId(card._id);
|
||||
}
|
||||
evt.preventDefault();
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('myCards');
|
||||
@@ -0,0 +1,40 @@
|
||||
.my-cards-list
|
||||
.my-cards-list-item
|
||||
border-bottom: 1px solid darken(white, 25%)
|
||||
padding: 10px 5px
|
||||
|
||||
&:last-child
|
||||
border-bottom: none
|
||||
|
||||
.my-cards-list-item-keys
|
||||
margin-top: 5px
|
||||
float: right
|
||||
|
||||
kbd
|
||||
padding: 5px 8px
|
||||
margin: 5px
|
||||
font-size: 18px
|
||||
|
||||
.my-cards-list-item-action
|
||||
font-size: 1.4em
|
||||
margin: 5px
|
||||
|
||||
.board-title
|
||||
font-size: 1.4rem
|
||||
font-weight: bold
|
||||
|
||||
.swimlane-title
|
||||
font-size: 1.2rem
|
||||
font-weight: bold
|
||||
margin-left: 1em
|
||||
margin-top: 10px
|
||||
|
||||
.list-title
|
||||
margin-top: 5px
|
||||
font-weight: bold
|
||||
margin-left: 1.6rem
|
||||
|
||||
.card-title
|
||||
margin-top: 5px
|
||||
margin-left: 1.8rem
|
||||
max-width: 350px;
|
||||
@@ -5,34 +5,102 @@ template(name="people")
|
||||
else
|
||||
.content-title.ext-box
|
||||
.ext-box-left
|
||||
span
|
||||
i.fa.fa-users
|
||||
| {{_ 'people'}}
|
||||
input#searchInput(placeholder="{{_ 'search'}}")
|
||||
button#searchButton
|
||||
i.fa.fa-search
|
||||
| {{_ 'search'}}
|
||||
.ext-box-right
|
||||
span {{_ 'people-number'}} #{peopleNumber}
|
||||
if loading.get
|
||||
+spinner
|
||||
else if orgSetting.get
|
||||
span
|
||||
i.fa.fa-sitemap
|
||||
| {{_ 'organizations'}}
|
||||
input#searchOrgInput(placeholder="{{_ 'search'}}")
|
||||
button#searchOrgButton
|
||||
i.fa.fa-search
|
||||
| {{_ 'search'}}
|
||||
.ext-box-right
|
||||
span {{_ 'org-number'}} #{orgNumber}
|
||||
else if teamSetting.get
|
||||
span
|
||||
i.fa.fa-users
|
||||
| {{_ 'teams'}}
|
||||
input#searchTeamInput(placeholder="{{_ 'search'}}")
|
||||
button#searchTeamButton
|
||||
i.fa.fa-search
|
||||
| {{_ 'search'}}
|
||||
.ext-box-right
|
||||
span {{_ 'team-number'}} #{teamNumber}
|
||||
else if peopleSetting.get
|
||||
span
|
||||
i.fa.fa-user
|
||||
| {{_ 'people'}}
|
||||
input#searchInput(placeholder="{{_ 'search'}}")
|
||||
button#searchButton
|
||||
i.fa.fa-search
|
||||
| {{_ 'search'}}
|
||||
.ext-box-right
|
||||
span {{_ 'people-number'}} #{peopleNumber}
|
||||
.content-body
|
||||
.side-menu
|
||||
ul
|
||||
li.active
|
||||
a.js-setting-menu(data-id="people-setting")
|
||||
a.js-org-menu(data-id="org-setting")
|
||||
i.fa.fa-sitemap
|
||||
| {{_ 'organizations'}}
|
||||
li
|
||||
a.js-team-menu(data-id="team-setting")
|
||||
i.fa.fa-users
|
||||
| {{_ 'teams'}}
|
||||
li
|
||||
a.js-people-menu(data-id="people-setting")
|
||||
i.fa.fa-user
|
||||
| {{_ 'people'}}
|
||||
.main-body
|
||||
if loading.get
|
||||
+spinner
|
||||
else if people.get
|
||||
else if orgSetting.get
|
||||
+orgGeneral
|
||||
else if teamSetting.get
|
||||
+teamGeneral
|
||||
else if peopleSetting.get
|
||||
+peopleGeneral
|
||||
|
||||
|
||||
template(name="orgGeneral")
|
||||
table
|
||||
tbody
|
||||
tr
|
||||
th {{_ 'displayName'}}
|
||||
th {{_ 'description'}}
|
||||
th {{_ 'shortName'}}
|
||||
th {{_ 'website'}}
|
||||
th {{_ 'teams'}}
|
||||
th {{_ 'createdAt'}}
|
||||
th {{_ 'active'}}
|
||||
th
|
||||
+newOrgRow
|
||||
each org in orgList
|
||||
+orgRow(orgId=org._id)
|
||||
|
||||
template(name="teamGeneral")
|
||||
table
|
||||
tbody
|
||||
tr
|
||||
th {{_ 'displayName'}}
|
||||
th {{_ 'description'}}
|
||||
th {{_ 'shortName'}}
|
||||
th {{_ 'website'}}
|
||||
th {{_ 'createdAt'}}
|
||||
th {{_ 'active'}}
|
||||
th
|
||||
+newTeamRow
|
||||
each team in teamList
|
||||
+teamRow(teamId=team._id)
|
||||
|
||||
template(name="peopleGeneral")
|
||||
table
|
||||
tbody
|
||||
tr
|
||||
th {{_ 'username'}}
|
||||
th {{_ 'fullname'}}
|
||||
th {{_ 'initials'}}
|
||||
th {{_ 'admin'}}
|
||||
th {{_ 'email'}}
|
||||
th {{_ 'verified'}}
|
||||
@@ -44,11 +112,93 @@ template(name="peopleGeneral")
|
||||
each user in peopleList
|
||||
+peopleRow(userId=user._id)
|
||||
|
||||
template(name="newOrgRow")
|
||||
a.new-org
|
||||
i.fa.fa-edit
|
||||
| {{_ 'new'}}
|
||||
|
||||
template(name="newTeamRow")
|
||||
a.new-team
|
||||
i.fa.fa-edit
|
||||
| {{_ 'new'}}
|
||||
|
||||
template(name="newUserRow")
|
||||
a.new-user
|
||||
i.fa.fa-edit
|
||||
| {{_ 'new'}}
|
||||
|
||||
template(name="orgRow")
|
||||
tr
|
||||
if orgData.loginDisabled
|
||||
td <s>{{ orgData.displayName }}</s>
|
||||
else
|
||||
td {{ orgData.displayName }}
|
||||
if orgData.loginDisabled
|
||||
td <s>{{ orgData.orgDesc }}</s>
|
||||
else
|
||||
td {{ orgData.desc }}
|
||||
if orgData.loginDisabled
|
||||
td <s>{{ orgData.name }}</s>
|
||||
else
|
||||
td {{ orgData.name }}
|
||||
if orgData.loginDisabled
|
||||
td <s>{{ orgData.website }}</s>
|
||||
else
|
||||
td {{ orgData.website }}
|
||||
if orgData.loginDisabled
|
||||
td <s>{{ orgData.teams }}</s>
|
||||
else
|
||||
td {{ orgData.teams }}
|
||||
if orgData.loginDisabled
|
||||
td <s>{{ moment orgData.createdAt 'LLL' }}</s>
|
||||
else
|
||||
td {{ moment orgData.createdAt 'LLL' }}
|
||||
td
|
||||
if orgData.loginDisabled
|
||||
| {{_ 'no'}}
|
||||
else
|
||||
| {{_ 'yes'}}
|
||||
td
|
||||
a.edit-org
|
||||
i.fa.fa-edit
|
||||
| {{_ 'edit'}}
|
||||
a.more-settings-org
|
||||
i.fa.fa-ellipsis-h
|
||||
|
||||
template(name="teamRow")
|
||||
tr
|
||||
if teamData.loginDisabled
|
||||
td <s>{{ teamData.displayName }}</s>
|
||||
else
|
||||
td {{ teamData.displayName }}
|
||||
if teamData.loginDisabled
|
||||
td <s>{{ teamData.desc }}</s>
|
||||
else
|
||||
td {{ teamData.desc }}
|
||||
if teamData.loginDisabled
|
||||
td <s>{{ teamData.dame }}</s>
|
||||
else
|
||||
td {{ teamData.name }}
|
||||
if teamData.loginDisabled
|
||||
td <s>{{ teamData.website }}</s>
|
||||
else
|
||||
td {{ teamData.website }}
|
||||
if orgData.loginDisabled
|
||||
td <s>{{ moment teamData.createdAt 'LLL' }}</s>
|
||||
else
|
||||
td {{ moment teamData.createdAt 'LLL' }}
|
||||
td
|
||||
if teamData.loginDisabled
|
||||
| {{_ 'no'}}
|
||||
else
|
||||
| {{_ 'yes'}}
|
||||
td
|
||||
a.edit-team
|
||||
i.fa.fa-edit
|
||||
| {{_ 'edit'}}
|
||||
a.more-settings-team
|
||||
i.fa.fa-ellipsis-h
|
||||
|
||||
template(name="peopleRow")
|
||||
tr
|
||||
if userData.loginDisabled
|
||||
@@ -59,6 +209,10 @@ template(name="peopleRow")
|
||||
td <s>{{ userData.profile.fullname }}</s>
|
||||
else
|
||||
td {{ userData.profile.fullname }}
|
||||
if userData.loginDisabled
|
||||
td <s>{{ userData.profile.initials }}</s>
|
||||
else
|
||||
td {{ userData.profile.initials }}
|
||||
if userData.loginDisabled
|
||||
td
|
||||
if userData.isAdmin
|
||||
@@ -107,12 +261,61 @@ template(name="peopleRow")
|
||||
a.more-settings-user
|
||||
i.fa.fa-ellipsis-h
|
||||
|
||||
template(name="editOrgPopup")
|
||||
form
|
||||
label.hide.orgId(type="text" value=org._id)
|
||||
label
|
||||
| {{_ 'orgDisplayName'}}
|
||||
input.js-orgDisplayName(type="text" value=org.displayName required)
|
||||
span.error.hide.orgname-taken
|
||||
| {{_ 'error-orgname-taken'}}
|
||||
label
|
||||
| {{_ 'orgDesc'}}
|
||||
input.js-orgDesc(type="text" value=org.desc required)
|
||||
label
|
||||
| {{_ 'orgName'}}
|
||||
input.js-orgName(type="text" value=org.name required)
|
||||
label
|
||||
| {{_ 'orgWebsite'}}
|
||||
input.js-orgWebsite(type="text" value=org.website required)
|
||||
label
|
||||
| {{_ 'active'}}
|
||||
select.select-active.js-org-isactive
|
||||
option(value="false") {{_ 'yes'}}
|
||||
option(value="true" selected="{{org.loginDisabled}}") {{_ 'no'}}
|
||||
hr
|
||||
div.buttonsContainer
|
||||
input.primary.wide(type="submit" value="{{_ 'save'}}")
|
||||
|
||||
template(name="editTeamPopup")
|
||||
form
|
||||
label.hide.teamId(type="text" value=team._id)
|
||||
label
|
||||
| {{_ 'displayName'}}
|
||||
input.js-teamDisplayName(type="text" value=team.displayName required)
|
||||
span.error.hide.teamname-taken
|
||||
| {{_ 'error-teamname-taken'}}
|
||||
label
|
||||
| {{_ 'description'}}
|
||||
input.js-orgDesc(type="text" value=org.desc required)
|
||||
label
|
||||
| {{_ 'name'}}
|
||||
input.js-orgName(type="text" value=org.name required)
|
||||
label
|
||||
| {{_ 'website'}}
|
||||
input.js-orgWebsite(type="text" value=org.website required)
|
||||
label
|
||||
| {{_ 'active'}}
|
||||
select.select-active.js-team-isactive
|
||||
option(value="false") {{_ 'yes'}}
|
||||
option(value="true" selected="{{team.loginDisabled}}") {{_ 'no'}}
|
||||
hr
|
||||
div.buttonsContainer
|
||||
input.primary.wide(type="submit" value="{{_ 'save'}}")
|
||||
|
||||
template(name="editUserPopup")
|
||||
form
|
||||
label.hide.userId(type="text" value=user._id)
|
||||
label
|
||||
| {{_ 'fullname'}}
|
||||
input.js-profile-fullname(type="text" value=user.profile.fullname required)
|
||||
label
|
||||
| {{_ 'username'}}
|
||||
span.error.hide.username-taken
|
||||
@@ -121,6 +324,17 @@ template(name="editUserPopup")
|
||||
input.js-profile-username(type="text" value=user.username readonly)
|
||||
else
|
||||
input.js-profile-username(type="text" value=user.username required)
|
||||
label
|
||||
| {{_ 'fullname'}}
|
||||
input.js-profile-fullname(type="text" value=user.profile.fullname required)
|
||||
label
|
||||
| {{_ 'initials'}}
|
||||
input.js-profile-initials(type="text" value=user.profile.initials)
|
||||
label
|
||||
| {{_ 'admin'}}
|
||||
select.select-role.js-profile-isadmin
|
||||
option(value="false") {{_ 'no'}}
|
||||
option(value="true" selected="{{user.isAdmin}}") {{_ 'yes'}}
|
||||
label
|
||||
| {{_ 'email'}}
|
||||
span.error.hide.email-taken
|
||||
@@ -130,10 +344,10 @@ template(name="editUserPopup")
|
||||
else
|
||||
input.js-profile-email(type="email" value="{{user.emails.[0].address}}" required)
|
||||
label
|
||||
| {{_ 'admin'}}
|
||||
select.select-role.js-profile-isadmin
|
||||
| {{_ 'verified'}}
|
||||
select.select-verified.js-profile-email-verified
|
||||
option(value="false") {{_ 'no'}}
|
||||
option(value="true" selected="{{user.isAdmin}}") {{_ 'yes'}}
|
||||
option(value="true" selected="{{userData.emails.[0].verified}}") {{_ 'yes'}}
|
||||
label
|
||||
| {{_ 'active'}}
|
||||
select.select-active.js-profile-isactive
|
||||
@@ -154,6 +368,57 @@ template(name="editUserPopup")
|
||||
div.buttonsContainer
|
||||
input.primary.wide(type="submit" value="{{_ 'save'}}")
|
||||
|
||||
template(name="newOrgPopup")
|
||||
form
|
||||
//label.hide.userId(type="text" value=user._id)
|
||||
label
|
||||
| {{_ 'displayName'}}
|
||||
input.js-displayName(type="text" value="" required)
|
||||
label
|
||||
| {{_ 'description'}}
|
||||
input.js-desc(type="text" value="" required)
|
||||
label
|
||||
| {{_ 'shortName'}}
|
||||
input.js-name(type="text" value="")
|
||||
label
|
||||
| {{_ 'teams'}}
|
||||
input.js-teams(type="text" value="")
|
||||
label
|
||||
| {{_ 'website'}}
|
||||
input.js-website(type="text" value="")
|
||||
label
|
||||
| {{_ 'active'}}
|
||||
select.select-active.js-profile-isactive
|
||||
option(value="false" selected="selected") {{_ 'yes'}}
|
||||
option(value="true") {{_ 'no'}}
|
||||
hr
|
||||
div.buttonsContainer
|
||||
input.primary.wide(type="submit" value="{{_ 'save'}}")
|
||||
|
||||
template(name="newTeamPopup")
|
||||
form
|
||||
//label.hide.teamId(type="text" value=team._id)
|
||||
label
|
||||
| {{_ 'displayName'}}
|
||||
input.js-teamDisplayName(type="text" value="" required)
|
||||
label
|
||||
| {{_ 'description'}}
|
||||
input.js-teamDesc(type="text" value="" required)
|
||||
label
|
||||
| {{_ 'shortName'}}
|
||||
input.js-teamName(type="text" value="")
|
||||
label
|
||||
| {{_ 'website'}}
|
||||
input.js-teamWebsite(type="text" value="")
|
||||
label
|
||||
| {{_ 'active'}}
|
||||
select.select-active.js-profile-isactive
|
||||
option(value="false" selected="selected") {{_ 'yes'}}
|
||||
option(value="true") {{_ 'no'}}
|
||||
hr
|
||||
div.buttonsContainer
|
||||
input.primary.wide(type="submit" value="{{_ 'save'}}")
|
||||
|
||||
template(name="newUserPopup")
|
||||
form
|
||||
//label.hide.userId(type="text" value=user._id)
|
||||
@@ -201,6 +466,31 @@ template(name="newUserPopup")
|
||||
div.buttonsContainer
|
||||
input.primary.wide(type="submit" value="{{_ 'save'}}")
|
||||
|
||||
template(name="settingsOrgPopup")
|
||||
ul.pop-over-list
|
||||
li
|
||||
a.impersonate-org
|
||||
i.fa.fa-user
|
||||
| {{_ 'impersonate-org'}}
|
||||
// Delete is not enabled yet, because it does leave empty user avatars
|
||||
// to boards: boards members, card members and assignees have
|
||||
// empty users. See:
|
||||
// - wekan/client/components/settings/peopleBody.jade deleteButton
|
||||
// - wekan/client/components/settings/peopleBody.js deleteButton
|
||||
// - wekan/client/components/sidebar/sidebar.js Popup.afterConfirm('removeMember'
|
||||
// that does now remove member from board, card members and assignees correctly,
|
||||
// but that should be used to remove user from all boards similarly
|
||||
// - wekan/models/users.js Delete is not enabled
|
||||
//li
|
||||
// br
|
||||
// br
|
||||
// hr
|
||||
//li
|
||||
// form
|
||||
// label.hide.userId(type="text" value=user._id)
|
||||
// div.buttonsContainer
|
||||
// input#deleteButton.card-details-red.right.wide(type="button" value="{{_ 'delete'}}")
|
||||
|
||||
template(name="settingsUserPopup")
|
||||
ul.pop-over-list
|
||||
li
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
const orgsPerPage = 25;
|
||||
const teamsPerPage = 25;
|
||||
const usersPerPage = 25;
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
@@ -7,17 +9,45 @@ BlazeComponent.extendComponent({
|
||||
onCreated() {
|
||||
this.error = new ReactiveVar('');
|
||||
this.loading = new ReactiveVar(false);
|
||||
this.people = new ReactiveVar(true);
|
||||
this.orgSetting = new ReactiveVar(true);
|
||||
this.teamSetting = new ReactiveVar(true);
|
||||
this.peopleSetting = new ReactiveVar(true);
|
||||
this.findOrgsOptions = new ReactiveVar({});
|
||||
this.findTeamsOptions = new ReactiveVar({});
|
||||
this.findUsersOptions = new ReactiveVar({});
|
||||
this.number = new ReactiveVar(0);
|
||||
this.numberOrgs = new ReactiveVar(0);
|
||||
this.numberTeams = new ReactiveVar(0);
|
||||
this.numberPeople = new ReactiveVar(0);
|
||||
|
||||
this.page = new ReactiveVar(1);
|
||||
this.loadNextPageLocked = false;
|
||||
this.callFirstWith(null, 'resetNextPeak');
|
||||
this.autorun(() => {
|
||||
const limit = this.page.get() * usersPerPage;
|
||||
const limitOrgs = this.page.get() * orgsPerPage;
|
||||
const limitTeams = this.page.get() * teamsPerPage;
|
||||
const limitUsers = this.page.get() * usersPerPage;
|
||||
|
||||
this.subscribe('people', this.findUsersOptions.get(), limit, () => {
|
||||
this.subscribe('org', this.findOrgsOptions.get(), limitOrgs, () => {
|
||||
this.loadNextPageLocked = false;
|
||||
const nextPeakBefore = this.callFirstWith(null, 'getNextPeak');
|
||||
this.calculateNextPeak();
|
||||
const nextPeakAfter = this.callFirstWith(null, 'getNextPeak');
|
||||
if (nextPeakBefore === nextPeakAfter) {
|
||||
this.callFirstWith(null, 'resetNextPeak');
|
||||
}
|
||||
});
|
||||
|
||||
this.subscribe('team', this.findTeamsOptions.get(), limitTeams, () => {
|
||||
this.loadNextPageLocked = false;
|
||||
const nextPeakBefore = this.callFirstWith(null, 'getNextPeak');
|
||||
this.calculateNextPeak();
|
||||
const nextPeakAfter = this.callFirstWith(null, 'getNextPeak');
|
||||
if (nextPeakBefore === nextPeakAfter) {
|
||||
this.callFirstWith(null, 'resetNextPeak');
|
||||
}
|
||||
});
|
||||
|
||||
this.subscribe('people', this.findUsersOptions.get(), limitUsers, () => {
|
||||
this.loadNextPageLocked = false;
|
||||
const nextPeakBefore = this.callFirstWith(null, 'getNextPeak');
|
||||
this.calculateNextPeak();
|
||||
@@ -31,6 +61,22 @@ BlazeComponent.extendComponent({
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click #searchOrgButton'() {
|
||||
this.filterOrg();
|
||||
},
|
||||
'keydown #searchOrgInput'(event) {
|
||||
if (event.keyCode === 13 && !event.shiftKey) {
|
||||
this.filterOrg();
|
||||
}
|
||||
},
|
||||
'click #searchTeamButton'() {
|
||||
this.filterTeam();
|
||||
},
|
||||
'keydown #searchTeamInput'(event) {
|
||||
if (event.keyCode === 13 && !event.shiftKey) {
|
||||
this.filterTeam();
|
||||
}
|
||||
},
|
||||
'click #searchButton'() {
|
||||
this.filterPeople();
|
||||
},
|
||||
@@ -39,9 +85,18 @@ BlazeComponent.extendComponent({
|
||||
this.filterPeople();
|
||||
}
|
||||
},
|
||||
'click #newOrgButton'() {
|
||||
Popup.open('newOrg');
|
||||
},
|
||||
'click #newTeamButton'() {
|
||||
Popup.open('newTeam');
|
||||
},
|
||||
'click #newUserButton'() {
|
||||
Popup.open('newUser');
|
||||
},
|
||||
'click a.js-org-menu': this.switchMenu,
|
||||
'click a.js-team-menu': this.switchMenu,
|
||||
'click a.js-people-menu': this.switchMenu,
|
||||
},
|
||||
];
|
||||
},
|
||||
@@ -84,18 +139,63 @@ BlazeComponent.extendComponent({
|
||||
setLoading(w) {
|
||||
this.loading.set(w);
|
||||
},
|
||||
orgList() {
|
||||
const orgs = Org.find(this.findOrgsOptions.get(), {
|
||||
fields: { _id: true },
|
||||
});
|
||||
this.numberOrgs.set(org.count(false));
|
||||
return orgs;
|
||||
},
|
||||
teamList() {
|
||||
const teams = Team.find(this.findTeamsOptions.get(), {
|
||||
fields: { _id: true },
|
||||
});
|
||||
this.numberTeams.set(team.count(false));
|
||||
return teams;
|
||||
},
|
||||
peopleList() {
|
||||
const users = Users.find(this.findUsersOptions.get(), {
|
||||
fields: { _id: true },
|
||||
});
|
||||
this.number.set(users.count(false));
|
||||
this.numberPeople.set(users.count(false));
|
||||
return users;
|
||||
},
|
||||
orgNumber() {
|
||||
return this.numberOrgs.get();
|
||||
},
|
||||
teamNumber() {
|
||||
return this.numberTeams.get();
|
||||
},
|
||||
peopleNumber() {
|
||||
return this.number.get();
|
||||
return this.numberPeople.get();
|
||||
},
|
||||
switchMenu(event) {
|
||||
const target = $(event.target);
|
||||
if (!target.hasClass('active')) {
|
||||
$('.side-menu li.active').removeClass('active');
|
||||
target.parent().addClass('active');
|
||||
const targetID = target.data('id');
|
||||
this.orgSetting.set('org-setting' === targetID);
|
||||
this.teamSetting.set('team-setting' === targetID);
|
||||
this.peopleSetting.set('people-setting' === targetID);
|
||||
}
|
||||
},
|
||||
}).register('people');
|
||||
|
||||
Template.orgRow.helpers({
|
||||
orgData() {
|
||||
const orgCollection = this.esSearch ? ESSearchResults : Org;
|
||||
return orgCollection.findOne(this.orgId);
|
||||
},
|
||||
});
|
||||
|
||||
Template.teamRow.helpers({
|
||||
teamData() {
|
||||
const teamCollection = this.esSearch ? ESSearchResults : Team;
|
||||
return teamCollection.findOne(this.teamId);
|
||||
},
|
||||
});
|
||||
|
||||
Template.peopleRow.helpers({
|
||||
userData() {
|
||||
const userCollection = this.esSearch ? ESSearchResults : Users;
|
||||
@@ -122,6 +222,24 @@ Template.editUserPopup.onCreated(function() {
|
||||
});
|
||||
});
|
||||
|
||||
Template.editOrgPopup.helpers({
|
||||
org() {
|
||||
return Org.findOne(this.orgId);
|
||||
},
|
||||
errorMessage() {
|
||||
return Template.instance().errorMessage.get();
|
||||
},
|
||||
});
|
||||
|
||||
Template.editTeamPopup.helpers({
|
||||
team() {
|
||||
return Team.findOne(this.teamId);
|
||||
},
|
||||
errorMessage() {
|
||||
return Template.instance().errorMessage.get();
|
||||
},
|
||||
});
|
||||
|
||||
Template.editUserPopup.helpers({
|
||||
user() {
|
||||
return Users.findOne(this.userId);
|
||||
@@ -144,6 +262,14 @@ Template.editUserPopup.helpers({
|
||||
},
|
||||
});
|
||||
|
||||
Template.newOrgPopup.onCreated(function() {
|
||||
this.errorMessage = new ReactiveVar('');
|
||||
});
|
||||
|
||||
Template.newTeamPopup.onCreated(function() {
|
||||
this.errorMessage = new ReactiveVar('');
|
||||
});
|
||||
|
||||
Template.newUserPopup.onCreated(function() {
|
||||
this.authenticationMethods = new ReactiveVar([]);
|
||||
this.errorMessage = new ReactiveVar('');
|
||||
@@ -163,28 +289,76 @@ Template.newUserPopup.onCreated(function() {
|
||||
});
|
||||
});
|
||||
|
||||
Template.newUserPopup.helpers({
|
||||
//user() {
|
||||
// return Users.findOne(this.userId);
|
||||
//},
|
||||
authentications() {
|
||||
return Template.instance().authenticationMethods.get();
|
||||
Template.newOrgPopup.helpers({
|
||||
org() {
|
||||
return Org.findOne(this.orgId);
|
||||
},
|
||||
//isSelected(match) {
|
||||
// const userId = Template.instance().data.userId;
|
||||
// const selected = Users.findOne(userId).authenticationMethod;
|
||||
// return selected === match;
|
||||
//},
|
||||
//isLdap() {
|
||||
// const userId = Template.instance().data.userId;
|
||||
// const selected = Users.findOne(userId).authenticationMethod;
|
||||
// return selected === 'ldap';
|
||||
//},
|
||||
errorMessage() {
|
||||
return Template.instance().errorMessage.get();
|
||||
},
|
||||
});
|
||||
|
||||
Template.newTeamPopup.helpers({
|
||||
team() {
|
||||
return Team.findOne(this.teamId);
|
||||
},
|
||||
errorMessage() {
|
||||
return Template.instance().errorMessage.get();
|
||||
},
|
||||
});
|
||||
|
||||
Template.newUserPopup.helpers({
|
||||
user() {
|
||||
return Users.findOne(this.userId);
|
||||
},
|
||||
authentications() {
|
||||
return Template.instance().authenticationMethods.get();
|
||||
},
|
||||
isSelected(match) {
|
||||
const userId = Template.instance().data.userId;
|
||||
const selected = Users.findOne(userId).authenticationMethod;
|
||||
return selected === match;
|
||||
},
|
||||
isLdap() {
|
||||
const userId = Template.instance().data.userId;
|
||||
const selected = Users.findOne(userId).authenticationMethod;
|
||||
return selected === 'ldap';
|
||||
},
|
||||
errorMessage() {
|
||||
return Template.instance().errorMessage.get();
|
||||
},
|
||||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {},
|
||||
org() {
|
||||
return Org.findOne(this.orgId);
|
||||
},
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click a.edit-org': Popup.open('editOrg'),
|
||||
'click a.more-settings-org': Popup.open('settingsOrg'),
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('orgRow');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {},
|
||||
team() {
|
||||
return Team.findOne(this.teamId);
|
||||
},
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click a.edit-team': Popup.open('editTeam'),
|
||||
'click a.more-settings-team': Popup.open('settingsTeam'),
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('teamRow');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
onCreated() {},
|
||||
user() {
|
||||
@@ -200,6 +374,26 @@ BlazeComponent.extendComponent({
|
||||
},
|
||||
}).register('peopleRow');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click a.new-org': Popup.open('newOrg'),
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('newOrgRow');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
events() {
|
||||
return [
|
||||
{
|
||||
'click a.new-team': Popup.open('newTeam'),
|
||||
},
|
||||
];
|
||||
},
|
||||
}).register('newTeamRow');
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
events() {
|
||||
return [
|
||||
@@ -214,18 +408,24 @@ Template.editUserPopup.events({
|
||||
submit(event, templateInstance) {
|
||||
event.preventDefault();
|
||||
const user = Users.findOne(this.userId);
|
||||
const fullname = templateInstance.find('.js-profile-fullname').value.trim();
|
||||
const username = templateInstance.find('.js-profile-username').value.trim();
|
||||
const fullname = templateInstance.find('.js-profile-fullname').value.trim();
|
||||
const initials = templateInstance.find('.js-profile-initials').value.trim();
|
||||
const password = templateInstance.find('.js-profile-password').value;
|
||||
const isAdmin = templateInstance.find('.js-profile-isadmin').value.trim();
|
||||
const isActive = templateInstance.find('.js-profile-isactive').value.trim();
|
||||
const email = templateInstance.find('.js-profile-email').value.trim();
|
||||
const verified = templateInstance
|
||||
.find('.js-profile-email-verified')
|
||||
.value.trim();
|
||||
const authentication = templateInstance
|
||||
.find('.js-authenticationMethod')
|
||||
.value.trim();
|
||||
|
||||
const isChangePassword = password.length > 0;
|
||||
const isChangeUserName = username !== user.username;
|
||||
const isChangeInitials = initials.length > 0;
|
||||
const isChangeEmailVerified = verified !== user.emails[0].verified;
|
||||
|
||||
// If previously email address has not been set, it is undefined,
|
||||
// check for undefined, and allow adding email address.
|
||||
@@ -248,6 +448,14 @@ Template.editUserPopup.events({
|
||||
Meteor.call('setPassword', password, this.userId);
|
||||
}
|
||||
|
||||
if (isChangeEmailVerified) {
|
||||
Meteor.call('setEmailVerified', email, verified === 'true', this.userId);
|
||||
}
|
||||
|
||||
if (isChangeInitials) {
|
||||
Meteor.call('setInitials', initials, this.userId);
|
||||
}
|
||||
|
||||
if (isChangeUserName && isChangeEmail) {
|
||||
Meteor.call(
|
||||
'setUsernameAndEmail',
|
||||
@@ -305,6 +513,47 @@ Template.editUserPopup.events({
|
||||
},
|
||||
});
|
||||
|
||||
Template.newOrgPopup.events({
|
||||
submit(event, templateInstance) {
|
||||
event.preventDefault();
|
||||
const displayName = templateInstance.find('.js-displayName').value.trim();
|
||||
const desc = templateInstance.find('.js-desc').value.trim();
|
||||
const name = templateInstance.find('.js-name').value.trim();
|
||||
const teams = templateInstance.find('.js-teams').value.trim();
|
||||
const website = templateInstance.find('.js-website').value.trim();
|
||||
const isActive = templateInstance.find('.js-profile-isactive').value.trim();
|
||||
|
||||
Meteor.call(
|
||||
'setCreateOrg',
|
||||
displayName,
|
||||
desc,
|
||||
name,
|
||||
teams,
|
||||
website,
|
||||
isActive,
|
||||
email.toLowerCase(),
|
||||
function(error) {
|
||||
const nameMessageElement = templateInstance.$('.name-taken');
|
||||
if (error) {
|
||||
const errorElement = error.error;
|
||||
if (errorElement === 'name-already-taken') {
|
||||
nameMessageElement.show();
|
||||
emailMessageElement.hide();
|
||||
} else if (errorElement === 'email-already-taken') {
|
||||
usernameMessageElement.hide();
|
||||
emailMessageElement.show();
|
||||
}
|
||||
} else {
|
||||
usernameMessageElement.hide();
|
||||
emailMessageElement.hide();
|
||||
Popup.close();
|
||||
}
|
||||
},
|
||||
);
|
||||
Popup.close();
|
||||
},
|
||||
});
|
||||
|
||||
Template.newUserPopup.events({
|
||||
submit(event, templateInstance) {
|
||||
event.preventDefault();
|
||||
|
||||
@@ -21,7 +21,7 @@ table
|
||||
|
||||
.ext-box-left
|
||||
display: flex;
|
||||
width: 40%
|
||||
width: 100%
|
||||
|
||||
span
|
||||
vertical-align: center;
|
||||
@@ -47,5 +47,5 @@ table
|
||||
div
|
||||
margin: auto
|
||||
|
||||
.more-settings-user
|
||||
.more-settings-user,.more-settings-team,.more-settings-org
|
||||
margin-left: 10px;
|
||||
@@ -85,10 +85,16 @@
|
||||
.swimlane-header-menu
|
||||
position: absolute
|
||||
padding: 5px 5px
|
||||
font-size: 22px
|
||||
|
||||
.swimlane-header-plus-icon
|
||||
margin-left: 5px
|
||||
margin-right: 10px
|
||||
padding-right: 20px
|
||||
font-size: 22px
|
||||
|
||||
.swimlane-header-menu-icon
|
||||
padding-right: 20px
|
||||
font-size: 22px
|
||||
|
||||
.swimlane-header-handle
|
||||
position: absolute
|
||||
|
||||
@@ -13,6 +13,34 @@ template(name="headerUserBar")
|
||||
template(name="memberMenuPopup")
|
||||
ul.pop-over-list
|
||||
with currentUser
|
||||
li
|
||||
a.js-my-cards(href="{{pathFor 'my-cards'}}")
|
||||
i.fa.fa-list
|
||||
| {{_ 'my-cards'}}
|
||||
li
|
||||
a(href="{{pathFor 'home'}}")
|
||||
span.fa.fa-home
|
||||
| {{_ 'all-boards'}}
|
||||
li
|
||||
a(href="{{pathFor 'public'}}")
|
||||
span.fa.fa-globe
|
||||
| {{_ 'public'}}
|
||||
li
|
||||
a.board-header-btn.js-open-archived-board
|
||||
i.fa.fa-archive
|
||||
span {{_ 'archives'}}
|
||||
unless currentUser.isWorker
|
||||
ul.pop-over-list
|
||||
li
|
||||
a(href="{{pathFor 'board' id=templatesBoardId slug=templatesBoardSlug}}")
|
||||
i.fa.fa-clone
|
||||
| {{_ 'templates'}}
|
||||
if currentUser.isAdmin
|
||||
li
|
||||
a.js-go-setting(href="{{pathFor 'setting'}}")
|
||||
i.fa.fa-lock
|
||||
| {{_ 'admin-panel'}}
|
||||
hr
|
||||
li
|
||||
a.js-edit-profile
|
||||
i.fa.fa-user
|
||||
@@ -34,18 +62,6 @@ template(name="memberMenuPopup")
|
||||
a.js-change-language
|
||||
i.fa.fa-flag
|
||||
| {{_ 'changeLanguagePopup-title'}}
|
||||
if currentUser.isAdmin
|
||||
li
|
||||
a.js-go-setting(href="{{pathFor 'setting'}}")
|
||||
i.fa.fa-lock
|
||||
| {{_ 'admin-panel'}}
|
||||
unless currentUser.isWorker
|
||||
hr
|
||||
ul.pop-over-list
|
||||
li
|
||||
a(href="{{pathFor 'board' id=templatesBoardId slug=templatesBoardSlug}}")
|
||||
i.fa.fa-clone
|
||||
| {{_ 'templates'}}
|
||||
unless isSandstorm
|
||||
hr
|
||||
ul.pop-over-list
|
||||
|
||||
@@ -25,6 +25,12 @@ Template.memberMenuPopup.helpers({
|
||||
});
|
||||
|
||||
Template.memberMenuPopup.events({
|
||||
'click .js-my-cards'() {
|
||||
Popup.close();
|
||||
},
|
||||
'click .js-open-archived-board'() {
|
||||
Modal.open('archivedBoards');
|
||||
},
|
||||
'click .js-edit-profile': Popup.open('editProfile'),
|
||||
'click .js-change-settings': Popup.open('changeSettings'),
|
||||
'click .js-change-avatar': Popup.open('changeAvatar'),
|
||||
|
||||
@@ -113,6 +113,32 @@ FlowRouter.route('/shortcuts', {
|
||||
},
|
||||
});
|
||||
|
||||
FlowRouter.route('/my-cards', {
|
||||
name: 'my-cards',
|
||||
action() {
|
||||
const myCardsTemplate = 'myCards';
|
||||
|
||||
Filter.reset();
|
||||
// EscapeActions.executeAll();
|
||||
EscapeActions.executeUpTo('popup-close');
|
||||
|
||||
Utils.manageCustomUI();
|
||||
Utils.manageMatomo();
|
||||
|
||||
// if (previousPath) {
|
||||
// Modal.open(myCardsTemplate, {
|
||||
// header: 'myCardsModalTitle',
|
||||
// onCloseGoTo: previousPath,
|
||||
// });
|
||||
// } else {
|
||||
BlazeLayout.render('defaultLayout', {
|
||||
headerBar: 'myCardsHeaderBar',
|
||||
content: myCardsTemplate,
|
||||
});
|
||||
// }
|
||||
},
|
||||
});
|
||||
|
||||
FlowRouter.route('/import/:source', {
|
||||
name: 'import',
|
||||
triggersEnter: [AccountsTemplates.ensureSignedIn],
|
||||
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Zobraz způsob ověřování",
|
||||
"default-authentication-method": "Zobraz způsob ověřování",
|
||||
"duplicate-board": "Duplikovat tablo",
|
||||
"org-number": "The number of organizations is:",
|
||||
"team-number": "The number of teams is:",
|
||||
"people-number": "The number of people is:",
|
||||
"swimlaneDeletePopup-title": "Smazat Swimlane ?",
|
||||
"swimlane-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the swimlane. There is no undo.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Přidat detailnější popis",
|
||||
"show-on-card": "Zobrazit na kartě",
|
||||
"new": "Nový",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "Editovat uživatele",
|
||||
"newUserPopup-title": "Nový uživatel",
|
||||
"notifications": "Upozornění",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Skrýt zvolené položky",
|
||||
"task": "Úkol",
|
||||
"create-task": "Vytvořit úkol",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organizations",
|
||||
"teams": "Teams",
|
||||
"displayName": "Display Name",
|
||||
"shortName": "Short Name",
|
||||
"website": "Website",
|
||||
"person": "Person",
|
||||
"my-cards": "My Cards",
|
||||
"card": "Karta",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Display Authentication Method",
|
||||
"default-authentication-method": "Default Authentication Method",
|
||||
"duplicate-board": "Duplicate Board",
|
||||
"org-number": "The number of organizations is: ",
|
||||
"team-number": "The number of teams is: ",
|
||||
"people-number": "The number of people is: ",
|
||||
"swimlaneDeletePopup-title": "Delete Swimlane ?",
|
||||
"swimlane-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the swimlane. There is no undo.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Add a more detailed description",
|
||||
"show-on-card": "Show on Card",
|
||||
"new": "New",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "Edit User",
|
||||
"newUserPopup-title": "New User",
|
||||
"notifications": "Notifications",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Hide checked items",
|
||||
"task": "Task",
|
||||
"create-task": "Create Task",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organizations",
|
||||
"teams": "Teams",
|
||||
"displayName": "Display Name",
|
||||
"shortName": "Short Name",
|
||||
"website": "Website",
|
||||
"person": "Person",
|
||||
"my-cards": "My Cards",
|
||||
"card": "Card",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Mostrar el método de autenticación",
|
||||
"default-authentication-method": "Método de autenticación por defecto",
|
||||
"duplicate-board": "Duplicar tablero",
|
||||
"org-number": "The number of organizations is:",
|
||||
"team-number": "The number of teams is:",
|
||||
"people-number": "El número de personas es:",
|
||||
"swimlaneDeletePopup-title": "¿Eliminar el carril «swimlane»?",
|
||||
"swimlane-delete-pop": "Todas las acciones serán eliminadas de la fuente de actividades y no se podrá recuperar el carril «swimlane». Esta acción no puede deshacerse.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Agregar una descripción detallada",
|
||||
"show-on-card": "Mostrar en la tarjeta",
|
||||
"new": "Nuevo",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "Editar el usuario",
|
||||
"newUserPopup-title": "Nuevo usuario",
|
||||
"notifications": "Notificaciones",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Ocultar elementos marcados",
|
||||
"task": "Tarea",
|
||||
"create-task": "Crear tarea",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organizations",
|
||||
"teams": "Teams",
|
||||
"displayName": "Display Name",
|
||||
"shortName": "Short Name",
|
||||
"website": "Website",
|
||||
"person": "Person",
|
||||
"my-cards": "My Cards",
|
||||
"card": "Tarjeta",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Afficher la méthode d'authentification",
|
||||
"default-authentication-method": "Méthode d'authentification par défaut",
|
||||
"duplicate-board": "Dupliquer le tableau",
|
||||
"org-number": "Le nombre d'organisations est de :",
|
||||
"team-number": "Le nombre d'équipes est de :",
|
||||
"people-number": "Le nombre d'utilisateurs est de :",
|
||||
"swimlaneDeletePopup-title": "Supprimer le couloir ?",
|
||||
"swimlane-delete-pop": "Toutes les actions vont être supprimées du suivi d'activités et vous ne pourrez plus utiliser ce couloir. Cette action est irréversible.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Ajouter une description plus détaillée",
|
||||
"show-on-card": "Afficher sur la carte",
|
||||
"new": "Nouveau",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "Éditer l'utilisateur",
|
||||
"newUserPopup-title": "Nouvel utilisateur",
|
||||
"notifications": "Notifications",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Cacher les éléments cochés",
|
||||
"task": "Tâche",
|
||||
"create-task": "Créer une tâche",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organisations",
|
||||
"teams": "Équipes",
|
||||
"displayName": "Nom d'Affichage",
|
||||
"shortName": "Nom Court",
|
||||
"website": "Site Web",
|
||||
"person": "Personne",
|
||||
"my-cards": "My Cards",
|
||||
"card": "Carte",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "הצגת שיטת אימות",
|
||||
"default-authentication-method": "שיטת אימות כבררת מחדל",
|
||||
"duplicate-board": "שכפול לוח",
|
||||
"org-number": "מספר הארגונים הוא:",
|
||||
"team-number": "מספר הצוותים הוא:",
|
||||
"people-number": "מספר האנשים הוא:",
|
||||
"swimlaneDeletePopup-title": "למחוק מסלול?",
|
||||
"swimlane-delete-pop": "כל הפעולות יוסרו מהזנת הפעילות ולא תהיה לך אפשרות לשחזר את המסלול. אי אפשר לחזור אחורה.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "הוספת תיאור מפורט",
|
||||
"show-on-card": "הצגה על הכרטיס",
|
||||
"new": "חדש",
|
||||
"editOrgPopup-title": "עריכת ארגון",
|
||||
"newOrgPopup-title": "ארגון חדש",
|
||||
"editTeamPopup-title": "עריכת צוות",
|
||||
"newTeamPopup-title": "צוות חדש",
|
||||
"editUserPopup-title": "עריכת משתמש",
|
||||
"newUserPopup-title": "משתמש חדש",
|
||||
"notifications": "הודעות",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "הסתרת הפריטים שסומנו",
|
||||
"task": "משימה",
|
||||
"create-task": "צירת משימה",
|
||||
"ok": "אישור"
|
||||
"ok": "אישור",
|
||||
"organizations": "ארגונים",
|
||||
"teams": "צוותים",
|
||||
"displayName": "שם התצוגה",
|
||||
"shortName": "שם קצר",
|
||||
"website": "אתר",
|
||||
"person": "איש/ה",
|
||||
"my-cards": "My Cards",
|
||||
"card": "כרטיס",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Display Authentication Method",
|
||||
"default-authentication-method": "Default Authentication Method",
|
||||
"duplicate-board": "Duplicate Board",
|
||||
"org-number": "The number of organizations is:",
|
||||
"team-number": "The number of teams is:",
|
||||
"people-number": "The number of people is:",
|
||||
"swimlaneDeletePopup-title": "Delete Swimlane ?",
|
||||
"swimlane-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the swimlane. There is no undo.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Add a more detailed description",
|
||||
"show-on-card": "Show on Card",
|
||||
"new": "New",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "Edit User",
|
||||
"newUserPopup-title": "New User",
|
||||
"notifications": "Notifications",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Hide checked items",
|
||||
"task": "Task",
|
||||
"create-task": "Create Task",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organizations",
|
||||
"teams": "Teams",
|
||||
"displayName": "Display Name",
|
||||
"shortName": "Short Name",
|
||||
"website": "Website",
|
||||
"person": "Person",
|
||||
"my-cards": "My Cards",
|
||||
"card": "Card",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Display Authentication Method",
|
||||
"default-authentication-method": "Default Authentication Method",
|
||||
"duplicate-board": "보드 복사",
|
||||
"org-number": "The number of organizations is:",
|
||||
"team-number": "The number of teams is:",
|
||||
"people-number": "The number of people is:",
|
||||
"swimlaneDeletePopup-title": "Delete Swimlane ?",
|
||||
"swimlane-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the swimlane. There is no undo.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "자세한 설명 추가",
|
||||
"show-on-card": "Show on Card",
|
||||
"new": "New",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "Edit User",
|
||||
"newUserPopup-title": "New User",
|
||||
"notifications": "알림",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "선택된 항목 숨기기",
|
||||
"task": "과제",
|
||||
"create-task": "과제 생성",
|
||||
"ok": "확인"
|
||||
"ok": "확인",
|
||||
"organizations": "Organizations",
|
||||
"teams": "Teams",
|
||||
"displayName": "Display Name",
|
||||
"shortName": "Short Name",
|
||||
"website": "Website",
|
||||
"person": "Person",
|
||||
"my-cards": "My Cards",
|
||||
"card": "카드",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Toon Authenticatiemethode",
|
||||
"default-authentication-method": "Standaard Authenticatiemethode",
|
||||
"duplicate-board": "Dupliceer Bord",
|
||||
"org-number": "Het aantal organisaties is:",
|
||||
"team-number": "Het aantal teams is:",
|
||||
"people-number": "Het aantal gebruikers is:",
|
||||
"swimlaneDeletePopup-title": "Swimlane verwijderen?",
|
||||
"swimlane-delete-pop": "Alle acties zullen verwijderd worden van de activiteiten feed en je kunt de swimlane niet terughalen. Er is geen herstelmogelijkheid.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Voeg een meer gedetailleerde beschrijving toe",
|
||||
"show-on-card": "Toon op kaart",
|
||||
"new": "Nieuw",
|
||||
"editOrgPopup-title": "Bewerk organisatie",
|
||||
"newOrgPopup-title": "Nieuwe organisatie",
|
||||
"editTeamPopup-title": "Bewerk team",
|
||||
"newTeamPopup-title": "Nieuw team",
|
||||
"editUserPopup-title": "Wijzig gebruiker",
|
||||
"newUserPopup-title": "Nieuwe gebruiker",
|
||||
"notifications": "Meldingen",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Verberg aangevinkte items",
|
||||
"task": "Taak",
|
||||
"create-task": "Taak aanmaken",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organisaties",
|
||||
"teams": "Teams",
|
||||
"displayName": "Schermnaam",
|
||||
"shortName": "Korte naam",
|
||||
"website": "Website",
|
||||
"person": "Persoon",
|
||||
"my-cards": "Mijn kaarten",
|
||||
"card": "Kaart",
|
||||
"list": "Lijst",
|
||||
"board": "Bord"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Wyświetl metodę logowania",
|
||||
"default-authentication-method": "Domyślna metoda logowania",
|
||||
"duplicate-board": "Duplikuj tablicę",
|
||||
"org-number": "Liczba organizacji:",
|
||||
"team-number": "Liczba zespołów:",
|
||||
"people-number": "Liczba użytkowników to:",
|
||||
"swimlaneDeletePopup-title": "Usunąć ścieżkę?",
|
||||
"swimlane-delete-pop": "Wszystkie zdarzenia dotyczące tej ścieżki zostaną usunięte z historii aktywności. Tej operacji nie można cofnąć. Usunięcie jest nieodwracalne.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Dodaj bardziej szczegółowy opis",
|
||||
"show-on-card": "Pokaż na karcie",
|
||||
"new": "Nowy",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "Edytuj użytkownika",
|
||||
"newUserPopup-title": "Nowy użytkownik",
|
||||
"notifications": "Powiadomienia",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Ukryj ukończone",
|
||||
"task": "Zadanie",
|
||||
"create-task": "Utwórz zadanie",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organizacje",
|
||||
"teams": "Zespoły",
|
||||
"displayName": "Nazwa wyświetlana",
|
||||
"shortName": "Nazwa skrócona",
|
||||
"website": "Strona internetowa",
|
||||
"person": "Osoba",
|
||||
"my-cards": "My Cards",
|
||||
"card": "karty",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Mostrar Método de Autenticação",
|
||||
"default-authentication-method": "Método de Autenticação Padrão",
|
||||
"duplicate-board": "Duplicar Quadro",
|
||||
"org-number": "O número de organizações é:",
|
||||
"team-number": "O número de times é:",
|
||||
"people-number": "O número de pessoas é:",
|
||||
"swimlaneDeletePopup-title": "Excluir Raia?",
|
||||
"swimlane-delete-pop": "Todas as ações serão excluídas da lista de atividades e você não poderá recuperar a raia. Não há como desfazer.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Adicionar descrição detalhada",
|
||||
"show-on-card": "Mostrar no Cartão",
|
||||
"new": "Novo",
|
||||
"editOrgPopup-title": "Editar Organização",
|
||||
"newOrgPopup-title": "Nova Organização",
|
||||
"editTeamPopup-title": "Editar Time",
|
||||
"newTeamPopup-title": "Novo Time",
|
||||
"editUserPopup-title": "Editar usuário",
|
||||
"newUserPopup-title": "Novo usuário",
|
||||
"notifications": "Notificações",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Esconder itens marcados",
|
||||
"task": "Tarefa",
|
||||
"create-task": "Criar Tarefa",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organizações",
|
||||
"teams": "Times",
|
||||
"displayName": "Nome em exibição",
|
||||
"shortName": "Nome curto",
|
||||
"website": "Website",
|
||||
"person": "Pessoa",
|
||||
"my-cards": "My Cards",
|
||||
"card": "Cartão",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Показывать способ авторизации",
|
||||
"default-authentication-method": "Способ авторизации по умолчанию",
|
||||
"duplicate-board": "Клонировать доску",
|
||||
"org-number": "Количество организаций:",
|
||||
"team-number": "Количество команд:",
|
||||
"people-number": "Количество человек:",
|
||||
"swimlaneDeletePopup-title": "Удалить дорожку?",
|
||||
"swimlane-delete-pop": "Все действия будут удалены из ленты активности участников, и вы не сможете восстановить дорожку. Данное действие необратимо.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Добавить более детальное описание",
|
||||
"show-on-card": "Показать на карточке",
|
||||
"new": "Новый",
|
||||
"editOrgPopup-title": "Редактировать организацию",
|
||||
"newOrgPopup-title": "Новая организация",
|
||||
"editTeamPopup-title": "Редактировать команду",
|
||||
"newTeamPopup-title": "Новая команда",
|
||||
"editUserPopup-title": "Редактировать пользователя",
|
||||
"newUserPopup-title": "Новый пользователь",
|
||||
"notifications": "Уведомления",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Спрятать отмеченные",
|
||||
"task": "Задача",
|
||||
"create-task": "Создать задачу",
|
||||
"ok": "Ok"
|
||||
"ok": "Ok",
|
||||
"organizations": "Организации",
|
||||
"teams": "Команды",
|
||||
"displayName": "Отображаемое название",
|
||||
"shortName": "Короткое название",
|
||||
"website": "Вебсайт",
|
||||
"person": "Представитель",
|
||||
"my-cards": "My Cards",
|
||||
"card": "Карточка",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "Display Authentication Method",
|
||||
"default-authentication-method": "Default Authentication Method",
|
||||
"duplicate-board": "Duplicate Board",
|
||||
"org-number": "The number of organizations is:",
|
||||
"team-number": "The number of teams is:",
|
||||
"people-number": "The number of people is:",
|
||||
"swimlaneDeletePopup-title": "Delete Swimlane ?",
|
||||
"swimlane-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the swimlane. There is no undo.",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "Add a more detailed description",
|
||||
"show-on-card": "Show on Card",
|
||||
"new": "New",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "Edit User",
|
||||
"newUserPopup-title": "New User",
|
||||
"notifications": "Notifications",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "Сховати обрані елементи",
|
||||
"task": "Task",
|
||||
"create-task": "Create Task",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organizations",
|
||||
"teams": "Teams",
|
||||
"displayName": "Display Name",
|
||||
"shortName": "Short Name",
|
||||
"website": "Website",
|
||||
"person": "Person",
|
||||
"my-cards": "My Cards",
|
||||
"card": "Картка",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+855
-839
File diff suppressed because it is too large.
Load diff
+17
-1
@@ -774,6 +774,8 @@
|
||||
"display-authentication-method": "顯示認證方式",
|
||||
"default-authentication-method": "預設認證方式",
|
||||
"duplicate-board": "複製看板",
|
||||
"org-number": "The number of organizations is:",
|
||||
"team-number": "The number of teams is:",
|
||||
"people-number": "人數是:",
|
||||
"swimlaneDeletePopup-title": "是否刪除泳道?",
|
||||
"swimlane-delete-pop": "所有動作將從活動來源中刪除,您將無法恢復泳道。此操作無法還原。",
|
||||
@@ -807,6 +809,10 @@
|
||||
"addmore-detail": "新增更多詳細描述",
|
||||
"show-on-card": "在卡片上顯示",
|
||||
"new": "新增",
|
||||
"editOrgPopup-title": "Edit Organization",
|
||||
"newOrgPopup-title": "New Organization",
|
||||
"editTeamPopup-title": "Edit Team",
|
||||
"newTeamPopup-title": "New Team",
|
||||
"editUserPopup-title": "編輯使用者",
|
||||
"newUserPopup-title": "新增使用者",
|
||||
"notifications": "通知",
|
||||
@@ -836,5 +842,15 @@
|
||||
"hide-checked-items": "隱藏已勾選項目",
|
||||
"task": "任務",
|
||||
"create-task": "建立任務",
|
||||
"ok": "OK"
|
||||
"ok": "OK",
|
||||
"organizations": "Organizations",
|
||||
"teams": "Teams",
|
||||
"displayName": "Display Name",
|
||||
"shortName": "Short Name",
|
||||
"website": "Website",
|
||||
"person": "Person",
|
||||
"my-cards": "My Cards",
|
||||
"card": "卡片",
|
||||
"list": "List",
|
||||
"board": "Board"
|
||||
}
|
||||
+53
-33
@@ -1,7 +1,7 @@
|
||||
Org = new Mongo.Collection('org');
|
||||
|
||||
/**
|
||||
* A Organization in wekan
|
||||
* A Organization in Wekan. A Enterprise in Trello.
|
||||
*/
|
||||
Org.attachSchema(
|
||||
new SimpleSchema({
|
||||
@@ -18,76 +18,96 @@ Org.attachSchema(
|
||||
}
|
||||
},
|
||||
},
|
||||
version: {
|
||||
displayName: {
|
||||
/**
|
||||
* the version of the organization
|
||||
* the name to display for the organization
|
||||
*/
|
||||
type: Number,
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
name: {
|
||||
desc: {
|
||||
/**
|
||||
* name of the organization
|
||||
* the description the organization
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 190,
|
||||
},
|
||||
address1: {
|
||||
name: {
|
||||
/**
|
||||
* address1 of the organization
|
||||
* short name of the organization
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 255,
|
||||
},
|
||||
address2: {
|
||||
website: {
|
||||
/**
|
||||
* address2 of the organization
|
||||
* website of the organization
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 255,
|
||||
},
|
||||
city: {
|
||||
teams: {
|
||||
/**
|
||||
* city of the organization
|
||||
* List of teams of a organization
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 255,
|
||||
type: [Object],
|
||||
// eslint-disable-next-line consistent-return
|
||||
autoValue() {
|
||||
if (this.isInsert && !this.isSet) {
|
||||
return [
|
||||
{
|
||||
teamId: this.teamId,
|
||||
isAdmin: true,
|
||||
isActive: true,
|
||||
isNoComments: false,
|
||||
isCommentOnly: false,
|
||||
isWorker: false,
|
||||
},
|
||||
];
|
||||
}
|
||||
},
|
||||
},
|
||||
state: {
|
||||
'teams.$.teamId': {
|
||||
/**
|
||||
* state of the organization
|
||||
* The uniq ID of the team
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 255,
|
||||
},
|
||||
zipCode: {
|
||||
'teams.$.isAdmin': {
|
||||
/**
|
||||
* zipCode of the organization
|
||||
* Is the team an admin of the board?
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 50,
|
||||
type: Boolean,
|
||||
},
|
||||
country: {
|
||||
'teams.$.isActive': {
|
||||
/**
|
||||
* country of the organization
|
||||
* Is the team active?
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 255,
|
||||
type: Boolean,
|
||||
},
|
||||
billingEmail: {
|
||||
'teams.$.isNoComments': {
|
||||
/**
|
||||
* billingEmail of the organization
|
||||
* Is the team not allowed to make comments
|
||||
*/
|
||||
type: String,
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
'teams.$.isCommentOnly': {
|
||||
/**
|
||||
* Is the team only allowed to comment on the board
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
'teams.$.isWorker': {
|
||||
/**
|
||||
* Is the team only allowed to move card, assign himself to card and comment
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
max: 255,
|
||||
},
|
||||
createdAt: {
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
Team = new Mongo.Collection('team');
|
||||
|
||||
/**
|
||||
* A Team in Wekan. Organization in Trello.
|
||||
*/
|
||||
Team.attachSchema(
|
||||
new SimpleSchema({
|
||||
_id: {
|
||||
/**
|
||||
* the organization id
|
||||
*/
|
||||
type: Number,
|
||||
optional: true,
|
||||
// eslint-disable-next-line consistent-return
|
||||
autoValue() {
|
||||
if (this.isInsert && !this.isSet) {
|
||||
return incrementCounter('counters', 'orgId', 1);
|
||||
}
|
||||
},
|
||||
},
|
||||
displayName: {
|
||||
/**
|
||||
* the name to display for the team
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
},
|
||||
desc: {
|
||||
/**
|
||||
* the description the team
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 190,
|
||||
},
|
||||
name: {
|
||||
/**
|
||||
* short name of the team
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 255,
|
||||
},
|
||||
website: {
|
||||
/**
|
||||
* website of the team
|
||||
*/
|
||||
type: String,
|
||||
optional: true,
|
||||
max: 255,
|
||||
},
|
||||
createdAt: {
|
||||
/**
|
||||
* creation date of the team
|
||||
*/
|
||||
type: Date,
|
||||
// eslint-disable-next-line consistent-return
|
||||
autoValue() {
|
||||
if (this.isInsert) {
|
||||
return new Date();
|
||||
} else if (this.isUpsert) {
|
||||
return { $setOnInsert: new Date() };
|
||||
} else {
|
||||
this.unset();
|
||||
}
|
||||
},
|
||||
},
|
||||
modifiedAt: {
|
||||
type: Date,
|
||||
denyUpdate: false,
|
||||
// eslint-disable-next-line consistent-return
|
||||
autoValue() {
|
||||
if (this.isInsert || this.isUpsert || this.isUpdate) {
|
||||
return new Date();
|
||||
} else {
|
||||
this.unset();
|
||||
}
|
||||
},
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
if (Meteor.isServer) {
|
||||
// Index for Team name.
|
||||
Meteor.startup(() => {
|
||||
Team._collection._ensureIndex({ name: -1 });
|
||||
});
|
||||
}
|
||||
|
||||
export default Team;
|
||||
@@ -836,6 +836,34 @@ if (Meteor.isServer) {
|
||||
}
|
||||
}
|
||||
},
|
||||
setEmailVerified(email, verified, userId) {
|
||||
if (Meteor.user() && Meteor.user().isAdmin) {
|
||||
check(email, String);
|
||||
check(verified, Boolean);
|
||||
check(userId, String);
|
||||
Users.update(userId, {
|
||||
$set: {
|
||||
emails: [
|
||||
{
|
||||
address: email,
|
||||
verified,
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
setInitials(initials, userId) {
|
||||
if (Meteor.user() && Meteor.user().isAdmin) {
|
||||
check(initials, String);
|
||||
check(userId, String);
|
||||
Users.update(userId, {
|
||||
$set: {
|
||||
'profile.initials': initials,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
// we accept userId, username, email
|
||||
inviteUserToBoard(username, boardId) {
|
||||
check(username, String);
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wekan",
|
||||
"version": "v4.63.0",
|
||||
"version": "v4.69.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wekan",
|
||||
"version": "v4.63.0",
|
||||
"version": "v4.69.0",
|
||||
"description": "Open-Source kanban",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
||||
@@ -1524,7 +1524,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
|
||||
<ul class="toc-list-h1">
|
||||
|
||||
<li>
|
||||
<a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v4.63">Wekan REST API v4.63</a>
|
||||
<a href="#wekan-rest-api" class="toc-h1 toc-link" data-title="Wekan REST API v4.69">Wekan REST API v4.69</a>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -2032,7 +2032,7 @@ var n=this.pipeline.run(e.tokenizer(t)),r=new e.Vector,i=[],o=this._fields.reduc
|
||||
<div class="page-wrapper">
|
||||
<div class="dark-box"></div>
|
||||
<div class="content">
|
||||
<h1 id="wekan-rest-api">Wekan REST API v4.63</h1>
|
||||
<h1 id="wekan-rest-api">Wekan REST API v4.69</h1>
|
||||
<blockquote>
|
||||
<p>Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.</p>
|
||||
</blockquote>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
swagger: '2.0'
|
||||
info:
|
||||
title: Wekan REST API
|
||||
version: v4.63
|
||||
version: v4.69
|
||||
description: |
|
||||
The REST API allows you to control and extend Wekan with ease.
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ const pkgdef :Spk.PackageDefinition = (
|
||||
appTitle = (defaultText = "Wekan"),
|
||||
# The name of the app as it is displayed to the user.
|
||||
|
||||
appVersion = 463,
|
||||
appVersion = 469,
|
||||
# Increment this for every release.
|
||||
|
||||
appMarketingVersion = (defaultText = "4.63.0~2020-12-21"),
|
||||
appMarketingVersion = (defaultText = "4.69.0~2021-01-02"),
|
||||
# Human-readable presentation of the app version.
|
||||
|
||||
minUpgradableAppVersion = 0,
|
||||
|
||||
@@ -42,6 +42,66 @@ Meteor.publish('boards', function() {
|
||||
);
|
||||
});
|
||||
|
||||
Meteor.publish('mySwimlanes', function() {
|
||||
const userId = this.userId;
|
||||
const swimlanes = [];
|
||||
|
||||
Cards.find({
|
||||
archived: false,
|
||||
$or: [{ members: userId }, { assignees: userId }],
|
||||
}).forEach(card => {
|
||||
swimlanes.push(card.swimlaneId);
|
||||
});
|
||||
|
||||
return Swimlanes.find(
|
||||
{
|
||||
archived: false,
|
||||
_id: { $in: swimlanes },
|
||||
},
|
||||
{
|
||||
fields: {
|
||||
_id: 1,
|
||||
title: 1,
|
||||
type: 1,
|
||||
sort: 1,
|
||||
},
|
||||
// sort: {
|
||||
// sort: ['boardId', 'listId', 'sort'],
|
||||
// },
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Meteor.publish('myLists', function() {
|
||||
const userId = this.userId;
|
||||
const lists = [];
|
||||
|
||||
Cards.find({
|
||||
archived: false,
|
||||
$or: [{ members: userId }, { assignees: userId }],
|
||||
}).forEach(card => {
|
||||
lists.push(card.listId);
|
||||
});
|
||||
|
||||
return Lists.find(
|
||||
{
|
||||
archived: false,
|
||||
_id: { $in: lists },
|
||||
},
|
||||
{
|
||||
fields: {
|
||||
_id: 1,
|
||||
title: 1,
|
||||
type: 1,
|
||||
sort: 1,
|
||||
},
|
||||
// sort: {
|
||||
// sort: ['boardId', 'listId', 'sort'],
|
||||
// },
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Meteor.publish('archivedBoards', function() {
|
||||
const userId = this.userId;
|
||||
if (!Match.test(userId, String)) return [];
|
||||
|
||||
@@ -2,3 +2,33 @@ Meteor.publish('card', cardId => {
|
||||
check(cardId, String);
|
||||
return Cards.find({ _id: cardId });
|
||||
});
|
||||
|
||||
Meteor.publish('myCards', function() {
|
||||
const userId = this.userId;
|
||||
|
||||
return Cards.find(
|
||||
{
|
||||
archived: false,
|
||||
$or: [{ members: userId }, { assignees: userId }],
|
||||
},
|
||||
{
|
||||
fields: {
|
||||
_id: 1,
|
||||
archived: 1,
|
||||
boardId: 1,
|
||||
swimlaneId: 1,
|
||||
listId: 1,
|
||||
title: 1,
|
||||
type: 1,
|
||||
sort: 1,
|
||||
members: 1,
|
||||
assignees: 1,
|
||||
colors: 1,
|
||||
dueAt: 1,
|
||||
},
|
||||
// sort: {
|
||||
// sort: ['boardId', 'listId', 'sort'],
|
||||
// },
|
||||
},
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
Meteor.publish('org', function(query, limit) {
|
||||
check(query, Match.OneOf(Object, null));
|
||||
check(limit, Number);
|
||||
|
||||
if (!Match.test(this.userId, String)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const user = Users.findOne(this.userId);
|
||||
if (user && user.isAdmin) {
|
||||
return Org.find(query, {
|
||||
limit,
|
||||
sort: { createdAt: -1 },
|
||||
fields: {
|
||||
displayName: 1,
|
||||
desc: 1,
|
||||
name: 1,
|
||||
website: 1,
|
||||
teams: 1,
|
||||
createdAt: 1,
|
||||
loginDisabled: 1,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return [];
|
||||
});
|
||||
@@ -14,6 +14,7 @@ Meteor.publish('people', function(query, limit) {
|
||||
fields: {
|
||||
username: 1,
|
||||
'profile.fullname': 1,
|
||||
'profile.initials': 1,
|
||||
isAdmin: 1,
|
||||
emails: 1,
|
||||
createdAt: 1,
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
Meteor.publish('team', function(query, limit) {
|
||||
check(query, Match.OneOf(Object, null));
|
||||
check(limit, Number);
|
||||
|
||||
if (!Match.test(this.userId, String)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const user = Users.findOne(this.userId);
|
||||
if (user && user.isAdmin) {
|
||||
return Team.find(query, {
|
||||
limit,
|
||||
sort: { createdAt: -1 },
|
||||
fields: {
|
||||
displayName: 1,
|
||||
desc: 1,
|
||||
name: 1,
|
||||
website: 1,
|
||||
teams: 1,
|
||||
createdAt: 1,
|
||||
loginDisabled: 1,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
return [];
|
||||
});
|
||||
Reference in new issue
Block a user