From 077e78d37c44e871bb66f6faa7c95f8ff0a0c795 Mon Sep 17 00:00:00 2001 From: "John R. Supplee" Date: Thu, 31 Dec 2020 19:14:55 +0200 Subject: [PATCH 1/5] My Cards development first prototype --- client/components/main/myCards.jade | 29 ++++++ client/components/main/myCards.js | 152 ++++++++++++++++++++++++++++ client/components/main/myCards.styl | 35 +++++++ config/router.js | 26 +++++ server/publications/boards.js | 60 +++++++++++ server/publications/cards.js | 27 +++++ 6 files changed, 329 insertions(+) create mode 100644 client/components/main/myCards.jade create mode 100644 client/components/main/myCards.js create mode 100644 client/components/main/myCards.styl diff --git a/client/components/main/myCards.jade b/client/components/main/myCards.jade new file mode 100644 index 000000000..58252b485 --- /dev/null +++ b/client/components/main/myCards.jade @@ -0,0 +1,29 @@ +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 + h2 User Id + p= userId + //p= query.assignees + h1 My Cards + each board in cardsFind + .board-title + = board.title + each swimlane in board.swimlanes + .swimlane-title + = swimlane.title + each list in swimlane.lists + .list-title + = list.title + each card in list.cards + .card-details-title + = card.title diff --git a/client/components/main/myCards.js b/client/components/main/myCards.js new file mode 100644 index 000000000..579d3890e --- /dev/null +++ b/client/components/main/myCards.js @@ -0,0 +1,152 @@ +const subManager = new SubsManager(); +// import Cards from '../../../models/cards'; +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'); + }, + + boards() { + boards = []; + const cursor = Boards.find({ + archived: false, + 'members.userId': Meteor.userId(), + type: 'board', + }); + + return cursor; + }, + + cardsFind() { + 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 card = null; + // if (cursor.hasNext()) { + // card = cursor.next(); + // } + + 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, + 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); + } + + // card = cursor.hasNext() ? cursor.next() : null; + + newBoard = false; + newSwimlane = false; + newList = false; + }); + + // eslint-disable-next-line no-console + console.log('boards:', boards); + return boards; + }, +}).register('myCards'); diff --git a/client/components/main/myCards.styl b/client/components/main/myCards.styl new file mode 100644 index 000000000..3dd7da74a --- /dev/null +++ b/client/components/main/myCards.styl @@ -0,0 +1,35 @@ +.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.4em + font-weight: bold + +.swimlane-title + font-size: 1.2em + font-weight: bold + margin-left: 1em + margin-top: 10px + +.list-title + margin-top: 5px + font-weight: bold + margin-left: 2em diff --git a/config/router.js b/config/router.js index 2e66c67fa..0636b855d 100644 --- a/config/router.js +++ b/config/router.js @@ -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], diff --git a/server/publications/boards.js b/server/publications/boards.js index b80a6b23a..27b034662 100644 --- a/server/publications/boards.js +++ b/server/publications/boards.js @@ -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 []; diff --git a/server/publications/cards.js b/server/publications/cards.js index 61210ce56..5b8cc3bd9 100644 --- a/server/publications/cards.js +++ b/server/publications/cards.js @@ -2,3 +2,30 @@ 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, + boardId: 1, + swimlaneId: 1, + listId: 1, + title: 1, + type: 1, + sort: 1, + members: 1, + assignees: 1, + }, + // sort: { + // sort: ['boardId', 'listId', 'sort'], + // }, + }, + ); +}); From 885de88d35f0fa653ccf18f098acc4d8b01d0328 Mon Sep 17 00:00:00 2001 From: "John R. Supplee" Date: Fri, 1 Jan 2021 01:04:53 +0200 Subject: [PATCH 2/5] more my cards * add user menu entry (needs icon) * format list * add new translation slugs to English and Arabic --- client/components/cards/checklists.js | 4 ++-- client/components/main/myCards.jade | 10 +++++----- client/components/main/myCards.styl | 6 +++++- client/components/users/userHeader.jade | 4 ++++ client/components/users/userHeader.js | 3 +++ i18n/ar.i18n.json | 8 ++++++-- i18n/en.i18n.json | 6 +++++- 7 files changed, 30 insertions(+), 11 deletions(-) diff --git a/client/components/cards/checklists.js b/client/components/cards/checklists.js index 04ededceb..164753354 100644 --- a/client/components/cards/checklists.js +++ b/client/components/cards/checklists.js @@ -224,11 +224,11 @@ Template.checklists.helpers({ }); Template.addChecklistItemForm.onRendered(() => { - autosize($('textarea.js-add-checklist-item')) + autosize($('textarea.js-add-checklist-item')); }); Template.editChecklistItemForm.onRendered(() => { - autosize($('textarea.js-edit-checklist-item')) + autosize($('textarea.js-edit-checklist-item')); }); Template.checklistDeleteDialog.onCreated(() => { diff --git a/client/components/main/myCards.jade b/client/components/main/myCards.jade index 58252b485..e7405822e 100644 --- a/client/components/main/myCards.jade +++ b/client/components/main/myCards.jade @@ -11,19 +11,19 @@ template(name="myCardsModalTitle") template(name="myCards") .wrapper - h2 User Id - p= userId - //p= query.assignees - h1 My Cards 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 - .card-details-title + .card-title + | {{_ 'card' }}: = card.title diff --git a/client/components/main/myCards.styl b/client/components/main/myCards.styl index 3dd7da74a..72b402391 100644 --- a/client/components/main/myCards.styl +++ b/client/components/main/myCards.styl @@ -32,4 +32,8 @@ .list-title margin-top: 5px font-weight: bold - margin-left: 2em + margin-left: 1.6em + +.card-title + margin-top: 5px + margin-left: 1.8em diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade index d0adf29d2..b6c15125e 100644 --- a/client/components/users/userHeader.jade +++ b/client/components/users/userHeader.jade @@ -13,6 +13,10 @@ template(name="headerUserBar") template(name="memberMenuPopup") ul.pop-over-list with currentUser + li + a.js-my-cards(href="{{pathFor 'my-cards'}}") + i.fa.fa-user + | {{_ 'my-cards'}} li a.js-edit-profile i.fa.fa-user diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index af554d9f5..8d0fc6176 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -25,6 +25,9 @@ Template.memberMenuPopup.helpers({ }); Template.memberMenuPopup.events({ + 'click .js-my-cards'() { + Popup.close(); + }, 'click .js-edit-profile': Popup.open('editProfile'), 'click .js-change-settings': Popup.open('changeSettings'), 'click .js-change-avatar': Popup.open('changeAvatar'), diff --git a/i18n/ar.i18n.json b/i18n/ar.i18n.json index 4e6b2d079..3a883e8c4 100644 --- a/i18n/ar.i18n.json +++ b/i18n/ar.i18n.json @@ -137,6 +137,7 @@ "boardChangeWatchPopup-title": "تغيير المتابعة", "boardMenuPopup-title": "Board Settings", "boardChangeViewPopup-title": "عرض اللوحات", + "board": "لوحة", "boards": "لوحات", "board-view": "عرض اللوحات", "board-view-cal": "التقويم", @@ -148,6 +149,7 @@ "cancel": "إلغاء", "card-archived": "البطاقة منقولة الى الارشيف", "board-archived": "اللوحات منقولة الى الارشيف", + "card": "نطاقة", "card-comments-title": "%s تعليقات لهذه البطاقة", "card-delete-notice": "هذا حذف أبديّ . سوف تفقد كل الإجراءات المنوطة بهذه البطاقة", "card-delete-pop": "سيتم إزالة جميع الإجراءات من تبعات النشاط، وأنك لن تكون قادرا على إعادة فتح البطاقة. لا يوجد التراجع.", @@ -403,6 +405,7 @@ "leave-board-pop": "Are you sure you want to leave __boardTitle__? You will be removed from all cards on this board.", "leaveBoardPopup-title": "مغادرة اللوحة ؟", "link-card": "ربط هذه البطاقة", + "list": "قائمة", "list-archive-cards": "Move all cards in this list to Archive", "list-archive-cards-pop": "This will remove all the cards in this list from the board. To view cards in Archive and bring them back to the board, click “Menu” > “Archive”.", "list-move-cards": "نقل بطاقات هذه القائمة", @@ -827,7 +830,7 @@ "saturday": "Saturday", "sunday": "Sunday", "status": "Status", - "swimlane": "Swimlane", + "swimlane": "خط السباحة", "owner": "Owner", "last-modified-at": "Last modified at", "last-activity": "Last activity", @@ -844,5 +847,6 @@ "displayName": "Display Name", "shortName": "Short Name", "website": "Website", - "person": "Person" + "person": "Person", + "my-cards": "بطاقاتي" } diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json index 9fbb4ed34..e96bbb3cb 100644 --- a/i18n/en.i18n.json +++ b/i18n/en.i18n.json @@ -844,5 +844,9 @@ "displayName": "Display Name", "shortName": "Short Name", "website": "Website", - "person": "Person" + "person": "Person", + "my-cards": "My Cards", + "card": "Card", + "list": "List", + "board": "Board" } From a58b27e9b03ab25c6f4480c9e9b99f0eeed8c950 Mon Sep 17 00:00:00 2001 From: "John R. Supplee" Date: Fri, 1 Jan 2021 22:03:29 +0200 Subject: [PATCH 3/5] My Cards development * always go to page * use minicard for displaying cards * change the icon for my cards menu option --- client/components/main/myCards.jade | 5 +-- client/components/main/myCards.js | 55 +++++++++++++------------ client/components/main/myCards.styl | 9 ++-- client/components/users/userHeader.jade | 2 +- config/router.js | 22 +++++----- 5 files changed, 47 insertions(+), 46 deletions(-) diff --git a/client/components/main/myCards.jade b/client/components/main/myCards.jade index e7405822e..01172693b 100644 --- a/client/components/main/myCards.jade +++ b/client/components/main/myCards.jade @@ -24,6 +24,5 @@ template(name="myCards") | {{_ 'list' }}: = list.title each card in list.cards - .card-title - | {{_ 'card' }}: - = card.title + a.minicard-wrapper.card-title(href="{{pathFor 'card' boardId=board.id slug=board.slug cardId=card._id }}") + +minicard(card) diff --git a/client/components/main/myCards.js b/client/components/main/myCards.js index 579d3890e..9753b01f0 100644 --- a/client/components/main/myCards.js +++ b/client/components/main/myCards.js @@ -1,5 +1,4 @@ const subManager = new SubsManager(); -// import Cards from '../../../models/cards'; Meteor.subscribe('myCards'); Meteor.subscribe('mySwimlanes'); Meteor.subscribe('myLists'); @@ -31,17 +30,6 @@ BlazeComponent.extendComponent({ // subManager.subscribe('myCards'); }, - boards() { - boards = []; - const cursor = Boards.find({ - archived: false, - 'members.userId': Meteor.userId(), - type: 'board', - }); - - return cursor; - }, - cardsFind() { const boards = []; let board = null; @@ -63,11 +51,7 @@ BlazeComponent.extendComponent({ }, ); // eslint-disable-next-line no-console - console.log('cursor:', cursor); - // let card = null; - // if (cursor.hasNext()) { - // card = cursor.next(); - // } + // console.log('cursor:', cursor); let newBoard = false; let newSwimlane = false; @@ -75,10 +59,10 @@ BlazeComponent.extendComponent({ cursor.forEach(card => { // eslint-disable-next-line no-console - console.log('card:', card.title); + // console.log('card:', card.title); if (list === null || list.id !== card.listId) { // eslint-disable-next-line no-console - console.log('new list'); + // console.log('new list'); let l = Lists.findOne(card.listId); if (!l) { l = { @@ -87,7 +71,7 @@ BlazeComponent.extendComponent({ }; } // eslint-disable-next-line no-console - console.log('list:', l); + // console.log('list:', l); list = { id: l._id, title: l.title, @@ -97,7 +81,7 @@ BlazeComponent.extendComponent({ } if (swimlane === null || card.swimlaneId !== swimlane.id) { // eslint-disable-next-line no-console - console.log('new swimlane'); + // console.log('new swimlane'); let s = Swimlanes.findOne(card.swimlaneId); if (!s) { s = { @@ -106,7 +90,7 @@ BlazeComponent.extendComponent({ }; } // eslint-disable-next-line no-console - console.log('swimlane:', s); + // console.log('swimlane:', s); swimlane = { id: s._id, title: s.title, @@ -116,13 +100,14 @@ BlazeComponent.extendComponent({ } if (board === null || card.boardId !== board.id) { // eslint-disable-next-line no-console - console.log('new board'); + // console.log('new board'); const b = Boards.findOne(card.boardId); // eslint-disable-next-line no-console - console.log('board:', b, b._id, b.title); + // console.log('board:', b, b._id, b.title); board = { id: b._id, title: b.title, + slug: b.slug, swimlanes: [swimlane], }; newBoard = true; @@ -138,15 +123,31 @@ BlazeComponent.extendComponent({ list.cards.push(card); } - // card = cursor.hasNext() ? cursor.next() : null; - newBoard = false; newSwimlane = false; newList = false; }); // eslint-disable-next-line no-console - console.log('boards:', boards); + // 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'); diff --git a/client/components/main/myCards.styl b/client/components/main/myCards.styl index 72b402391..a139a17dc 100644 --- a/client/components/main/myCards.styl +++ b/client/components/main/myCards.styl @@ -20,11 +20,11 @@ margin: 5px .board-title - font-size: 1.4em + font-size: 1.4rem font-weight: bold .swimlane-title - font-size: 1.2em + font-size: 1.2rem font-weight: bold margin-left: 1em margin-top: 10px @@ -32,8 +32,9 @@ .list-title margin-top: 5px font-weight: bold - margin-left: 1.6em + margin-left: 1.6rem .card-title margin-top: 5px - margin-left: 1.8em + margin-left: 1.8rem + max-width: 350px; diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade index b6c15125e..de81f61da 100644 --- a/client/components/users/userHeader.jade +++ b/client/components/users/userHeader.jade @@ -15,7 +15,7 @@ template(name="memberMenuPopup") with currentUser li a.js-my-cards(href="{{pathFor 'my-cards'}}") - i.fa.fa-user + i.fa.fa-list | {{_ 'my-cards'}} li a.js-edit-profile diff --git a/config/router.js b/config/router.js index 0636b855d..473fcbbff 100644 --- a/config/router.js +++ b/config/router.js @@ -125,17 +125,17 @@ FlowRouter.route('/my-cards', { Utils.manageCustomUI(); Utils.manageMatomo(); - if (previousPath) { - Modal.open(myCardsTemplate, { - header: 'myCardsModalTitle', - onCloseGoTo: previousPath, - }); - } else { - BlazeLayout.render('defaultLayout', { - headerBar: 'myCardsHeaderBar', - content: myCardsTemplate, - }); - } + // if (previousPath) { + // Modal.open(myCardsTemplate, { + // header: 'myCardsModalTitle', + // onCloseGoTo: previousPath, + // }); + // } else { + BlazeLayout.render('defaultLayout', { + headerBar: 'myCardsHeaderBar', + content: myCardsTemplate, + }); + // } }, }); From 7a419c156319701a02c961534c12e0d453e1ac71 Mon Sep 17 00:00:00 2001 From: "John R. Supplee" Date: Sat, 2 Jan 2021 00:17:03 +0200 Subject: [PATCH 4/5] My Cards development * only find client side cards of the user --- client/components/main/myCards.js | 5 +++-- server/publications/cards.js | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/components/main/myCards.js b/client/components/main/myCards.js index 9753b01f0..91d5d5f72 100644 --- a/client/components/main/myCards.js +++ b/client/components/main/myCards.js @@ -31,6 +31,7 @@ BlazeComponent.extendComponent({ }, cardsFind() { + const userId = Meteor.userId(); const boards = []; let board = null; let swimlane = null; @@ -38,8 +39,8 @@ BlazeComponent.extendComponent({ const cursor = Cards.find( { - // archived: false, - // $or: [{ members: userId }, { assignees: userId }], + archived: false, + $or: [{ members: userId }, { assignees: userId }], }, { sort: { diff --git a/server/publications/cards.js b/server/publications/cards.js index 5b8cc3bd9..e9209f01e 100644 --- a/server/publications/cards.js +++ b/server/publications/cards.js @@ -14,6 +14,7 @@ Meteor.publish('myCards', function() { { fields: { _id: 1, + archived: 1, boardId: 1, swimlaneId: 1, listId: 1, @@ -22,6 +23,8 @@ Meteor.publish('myCards', function() { sort: 1, members: 1, assignees: 1, + colors: 1, + dueAt: 1, }, // sort: { // sort: ['boardId', 'listId', 'sort'], From 0592b0c56ac372c87dea17f0a090e7d7569430d1 Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Sat, 2 Jan 2021 16:39:58 +0200 Subject: [PATCH 5/5] Moved Public/Archive/Templates/etc options to click right top username Member Settings menu, where My Cards also is. Thanks to xet7 ! --- client/components/boards/boardsList.jade | 14 ++++---- client/components/main/header.jade | 8 ++--- .../components/swimlanes/swimlaneHeader.jade | 9 ++--- client/components/swimlanes/swimlanes.styl | 1 + client/components/users/userHeader.jade | 36 ++++++++++++------- client/components/users/userHeader.js | 3 ++ 6 files changed, 44 insertions(+), 27 deletions(-) diff --git a/client/components/boards/boardsList.jade b/client/components/boards/boardsList.jade index 7fd7c2ba9..ee57f3b29 100644 --- a/client/components/boards/boardsList.jade +++ b/client/components/boards/boardsList.jade @@ -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'}} diff --git a/client/components/main/header.jade b/client/components/main/header.jade index 220f99bef..dc8f4455b 100644 --- a/client/components/main/header.jade +++ b/client/components/main/header.jade @@ -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}}") diff --git a/client/components/swimlanes/swimlaneHeader.jade b/client/components/swimlanes/swimlaneHeader.jade index b4ef59767..c7c9381e5 100644 --- a/client/components/swimlanes/swimlaneHeader.jade +++ b/client/components/swimlanes/swimlaneHeader.jade @@ -17,11 +17,12 @@ template(name="swimlaneFixedHeader") unless currentUser.isCommentOnly if currentUser.isBoardAdmin a.fa.fa-plus.js-open-add-swimlane-menu.swimlane-header-plus-icon - a.fa.fa-navicon.js-open-swimlane-menu.swimlane-header-menu-icon - if isMiniScreenOrShowDesktopDragHandles + a.fa.fa-navicon.js-open-swimlane-menu + unless isMiniScreen + if showDesktopDragHandles + a.swimlane-header-handle.handle.fa.fa-arrows.js-swimlane-header-handle + if isMiniScreen a.swimlane-header-miniscreen-handle.handle.fa.fa-arrows.js-swimlane-header-handle - else - a.swimlane-header-handle.handle.fa.fa-arrows.js-swimlane-header-handle template(name="editSwimlaneTitleForm") .list-composer diff --git a/client/components/swimlanes/swimlanes.styl b/client/components/swimlanes/swimlanes.styl index 812b8ae9b..48fc57940 100644 --- a/client/components/swimlanes/swimlanes.styl +++ b/client/components/swimlanes/swimlanes.styl @@ -85,6 +85,7 @@ .swimlane-header-menu position: absolute padding: 5px 5px + font-size: 22px .swimlane-header-plus-icon margin-left: 5px diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade index de81f61da..0e35e21fa 100644 --- a/client/components/users/userHeader.jade +++ b/client/components/users/userHeader.jade @@ -12,11 +12,35 @@ template(name="headerUserBar") template(name="memberMenuPopup") ul.pop-over-list + if currentUser.isAdmin + li + a.js-go-setting(href="{{pathFor 'setting'}}") + i.fa.fa-lock + | {{_ 'admin-panel'}} with currentUser + li + a(href="{{pathFor 'home'}}") + span.fa.fa-home + | {{_ 'all-boards'}} li a.js-my-cards(href="{{pathFor 'my-cards'}}") i.fa.fa-list | {{_ 'my-cards'}} + 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'}} + hr li a.js-edit-profile i.fa.fa-user @@ -38,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 diff --git a/client/components/users/userHeader.js b/client/components/users/userHeader.js index 8d0fc6176..d616b804f 100644 --- a/client/components/users/userHeader.js +++ b/client/components/users/userHeader.js @@ -28,6 +28,9 @@ 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'),