diff options
Diffstat (limited to 'client/components')
-rw-r--r-- | client/components/activities/activities.jade | 6 | ||||
-rw-r--r-- | client/components/sidebar/sidebarArchives.jade | 11 | ||||
-rw-r--r-- | client/components/sidebar/sidebarArchives.js | 12 | ||||
-rw-r--r-- | client/components/swimlanes/swimlaneHeader.jade | 10 | ||||
-rw-r--r-- | client/components/swimlanes/swimlaneHeader.js | 9 | ||||
-rw-r--r-- | client/components/swimlanes/swimlanes.styl | 6 |
6 files changed, 52 insertions, 2 deletions
diff --git a/client/components/activities/activities.jade b/client/components/activities/activities.jade index 4d5410d4..2054777a 100644 --- a/client/components/activities/activities.jade +++ b/client/components/activities/activities.jade @@ -44,6 +44,9 @@ template(name="boardActivities") if($eq activityType 'archivedList') | {{_ 'activity-archived' list.title}}. + if($eq activityType 'archivedSwimlane') + | {{_ 'activity-archived' swimlane.title}}. + if($eq activityType 'createBoard') | {{_ 'activity-created' boardLabel}}. @@ -53,6 +56,9 @@ template(name="boardActivities") if($eq activityType 'createList') | {{_ 'activity-added' list.title boardLabel}}. + if($eq activityType 'createSwimlane') + | {{_ 'activity-added' swimlane.title boardLabel}}. + if($eq activityType 'removeList') | {{_ 'activity-removed' title boardLabel}}. diff --git a/client/components/sidebar/sidebarArchives.jade b/client/components/sidebar/sidebarArchives.jade index aa14fc30..ee6cac01 100644 --- a/client/components/sidebar/sidebarArchives.jade +++ b/client/components/sidebar/sidebarArchives.jade @@ -25,3 +25,14 @@ template(name="archivesSidebar") = title else li.no-items-message {{_ 'no-archived-lists'}} + + +tabContent(slug="swimlanes") + ul.archived-lists + each archivedSwimlanes + li.archived-lists-item + if currentUser.isBoardMember + button.js-restore-swimlane + i.fa.fa-undo + = title + else + li.no-items-message {{_ 'no-archived-swimlanes'}} diff --git a/client/components/sidebar/sidebarArchives.js b/client/components/sidebar/sidebarArchives.js index 2e8754b0..6102bf11 100644 --- a/client/components/sidebar/sidebarArchives.js +++ b/client/components/sidebar/sidebarArchives.js @@ -3,6 +3,7 @@ BlazeComponent.extendComponent({ return [ { name: TAPi18n.__('cards'), slug: 'cards' }, { name: TAPi18n.__('lists'), slug: 'lists' }, + { name: TAPi18n.__('swimlanes'), slug: 'swimlanes' }, ]; }, @@ -20,6 +21,13 @@ BlazeComponent.extendComponent({ }); }, + archivedSwimlanes() { + return Swimlanes.find({ + archived: true, + boardId: Session.get('currentBoard'), + }); + }, + cardIsInArchivedList() { return this.currentData().list().archived; }, @@ -45,6 +53,10 @@ BlazeComponent.extendComponent({ const list = this.currentData(); list.restore(); }, + 'click .js-restore-swimlane'() { + const swimlane = this.currentData(); + swimlane.restore(); + }, }]; }, }).register('archivesSidebar'); diff --git a/client/components/swimlanes/swimlaneHeader.jade b/client/components/swimlanes/swimlaneHeader.jade index 17eb3ea4..49193a81 100644 --- a/client/components/swimlanes/swimlaneHeader.jade +++ b/client/components/swimlanes/swimlaneHeader.jade @@ -6,10 +6,18 @@ template(name="swimlaneHeader") .swimlane-header( class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}") = title - + .swimlane-header-menu + unless currentUser.isCommentOnly + a.fa.fa-navicon.js-open-swimlane-menu + template(name="editSwimlaneTitleForm") .list-composer input.list-name-input.full-line(type="text" value=title autofocus) .edit-controls.clearfix button.primary.confirm(type="submit") {{_ 'save'}} a.fa.fa-times-thin.js-close-inlined-form + +template(name="swimlaneActionPopup") + unless currentUser.isCommentOnly + ul.pop-over-list + li: a.js-close-swimlane {{_ 'archive-swimlane'}} diff --git a/client/components/swimlanes/swimlaneHeader.js b/client/components/swimlanes/swimlaneHeader.js index b3f93536..50635f86 100644 --- a/client/components/swimlanes/swimlaneHeader.js +++ b/client/components/swimlanes/swimlaneHeader.js @@ -10,7 +10,16 @@ BlazeComponent.extendComponent({ events() { return [{ + 'click .js-open-swimlane-menu': Popup.open('swimlaneAction'), submit: this.editTitle, }]; }, }).register('swimlaneHeader'); + +Template.swimlaneActionPopup.events({ + 'click .js-close-swimlane' (evt) { + evt.preventDefault(); + this.archive(); + Popup.close(); + }, +}); diff --git a/client/components/swimlanes/swimlanes.styl b/client/components/swimlanes/swimlanes.styl index 48bc495c..fcc5d962 100644 --- a/client/components/swimlanes/swimlanes.styl +++ b/client/components/swimlanes/swimlanes.styl @@ -2,7 +2,7 @@ .swimlane-header-wrap display: flex; - flex-direction: column; + flex-direction: row; flex: 0 0 50px; .swimlane-header @@ -18,3 +18,7 @@ text-overflow: ellipsis; word-wrap: break-word; text-align: center; + + .swimlane-header-menu + position: absolute + padding: 20px 20px |