mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Add popup menu and archive action
This commit is contained in:
parent
3414cb84ad
commit
5953fb8a44
7 changed files with 57 additions and 2 deletions
|
|
@ -44,6 +44,9 @@ template(name="boardActivities")
|
||||||
if($eq activityType 'archivedList')
|
if($eq activityType 'archivedList')
|
||||||
| {{_ 'activity-archived' list.title}}.
|
| {{_ 'activity-archived' list.title}}.
|
||||||
|
|
||||||
|
if($eq activityType 'archivedSwimlane')
|
||||||
|
| {{_ 'activity-archived' swimlane.title}}.
|
||||||
|
|
||||||
if($eq activityType 'createBoard')
|
if($eq activityType 'createBoard')
|
||||||
| {{_ 'activity-created' boardLabel}}.
|
| {{_ 'activity-created' boardLabel}}.
|
||||||
|
|
||||||
|
|
@ -53,6 +56,9 @@ template(name="boardActivities")
|
||||||
if($eq activityType 'createList')
|
if($eq activityType 'createList')
|
||||||
| {{_ 'activity-added' list.title boardLabel}}.
|
| {{_ 'activity-added' list.title boardLabel}}.
|
||||||
|
|
||||||
|
if($eq activityType 'createSwimlane')
|
||||||
|
| {{_ 'activity-added' swimlane.title boardLabel}}.
|
||||||
|
|
||||||
if($eq activityType 'removeList')
|
if($eq activityType 'removeList')
|
||||||
| {{_ 'activity-removed' title boardLabel}}.
|
| {{_ 'activity-removed' title boardLabel}}.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,3 +25,14 @@ template(name="archivesSidebar")
|
||||||
= title
|
= title
|
||||||
else
|
else
|
||||||
li.no-items-message {{_ 'no-archived-lists'}}
|
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'}}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ BlazeComponent.extendComponent({
|
||||||
return [
|
return [
|
||||||
{ name: TAPi18n.__('cards'), slug: 'cards' },
|
{ name: TAPi18n.__('cards'), slug: 'cards' },
|
||||||
{ name: TAPi18n.__('lists'), slug: 'lists' },
|
{ 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() {
|
cardIsInArchivedList() {
|
||||||
return this.currentData().list().archived;
|
return this.currentData().list().archived;
|
||||||
},
|
},
|
||||||
|
|
@ -45,6 +53,10 @@ BlazeComponent.extendComponent({
|
||||||
const list = this.currentData();
|
const list = this.currentData();
|
||||||
list.restore();
|
list.restore();
|
||||||
},
|
},
|
||||||
|
'click .js-restore-swimlane'() {
|
||||||
|
const swimlane = this.currentData();
|
||||||
|
swimlane.restore();
|
||||||
|
},
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
}).register('archivesSidebar');
|
}).register('archivesSidebar');
|
||||||
|
|
|
||||||
|
|
@ -6,10 +6,18 @@ template(name="swimlaneHeader")
|
||||||
.swimlane-header(
|
.swimlane-header(
|
||||||
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
|
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
|
||||||
= title
|
= title
|
||||||
|
.swimlane-header-menu
|
||||||
|
unless currentUser.isCommentOnly
|
||||||
|
a.fa.fa-navicon.js-open-swimlane-menu
|
||||||
|
|
||||||
template(name="editSwimlaneTitleForm")
|
template(name="editSwimlaneTitleForm")
|
||||||
.list-composer
|
.list-composer
|
||||||
input.list-name-input.full-line(type="text" value=title autofocus)
|
input.list-name-input.full-line(type="text" value=title autofocus)
|
||||||
.edit-controls.clearfix
|
.edit-controls.clearfix
|
||||||
button.primary.confirm(type="submit") {{_ 'save'}}
|
button.primary.confirm(type="submit") {{_ 'save'}}
|
||||||
a.fa.fa-times-thin.js-close-inlined-form
|
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'}}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,16 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
events() {
|
events() {
|
||||||
return [{
|
return [{
|
||||||
|
'click .js-open-swimlane-menu': Popup.open('swimlaneAction'),
|
||||||
submit: this.editTitle,
|
submit: this.editTitle,
|
||||||
}];
|
}];
|
||||||
},
|
},
|
||||||
}).register('swimlaneHeader');
|
}).register('swimlaneHeader');
|
||||||
|
|
||||||
|
Template.swimlaneActionPopup.events({
|
||||||
|
'click .js-close-swimlane' (evt) {
|
||||||
|
evt.preventDefault();
|
||||||
|
this.archive();
|
||||||
|
Popup.close();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
.swimlane-header-wrap
|
.swimlane-header-wrap
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: row;
|
||||||
flex: 0 0 50px;
|
flex: 0 0 50px;
|
||||||
|
|
||||||
.swimlane-header
|
.swimlane-header
|
||||||
|
|
@ -18,3 +18,7 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
.swimlane-header-menu
|
||||||
|
position: absolute
|
||||||
|
padding: 20px 20px
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
"act-archivedBoard": "archived __board__",
|
"act-archivedBoard": "archived __board__",
|
||||||
"act-archivedCard": "archived __card__",
|
"act-archivedCard": "archived __card__",
|
||||||
"act-archivedList": "archived __list__",
|
"act-archivedList": "archived __list__",
|
||||||
|
"act-archivedSwimlane": "archived __swimlane__",
|
||||||
"act-importBoard": "imported __board__",
|
"act-importBoard": "imported __board__",
|
||||||
"act-importCard": "imported __card__",
|
"act-importCard": "imported __card__",
|
||||||
"act-importList": "imported __list__",
|
"act-importList": "imported __list__",
|
||||||
|
|
@ -68,6 +69,7 @@
|
||||||
"archive-board": "Archive Board",
|
"archive-board": "Archive Board",
|
||||||
"archive-card": "Archive Card",
|
"archive-card": "Archive Card",
|
||||||
"archive-list": "Archive List",
|
"archive-list": "Archive List",
|
||||||
|
"archive-swimlane": "Archive Swimlane",
|
||||||
"archive-selection": "Archive selection",
|
"archive-selection": "Archive selection",
|
||||||
"archiveBoardPopup-title": "Archive Board?",
|
"archiveBoardPopup-title": "Archive Board?",
|
||||||
"archived-items": "Archived Items",
|
"archived-items": "Archived Items",
|
||||||
|
|
@ -263,12 +265,14 @@
|
||||||
"list-move-cards": "Move all cards in this list",
|
"list-move-cards": "Move all cards in this list",
|
||||||
"list-select-cards": "Select all cards in this list",
|
"list-select-cards": "Select all cards in this list",
|
||||||
"listActionPopup-title": "List Actions",
|
"listActionPopup-title": "List Actions",
|
||||||
|
"swimlaneActionPopup-title": "Swimlane Actions",
|
||||||
"listImportCardPopup-title": "Import a Trello card",
|
"listImportCardPopup-title": "Import a Trello card",
|
||||||
"listMorePopup-title": "More",
|
"listMorePopup-title": "More",
|
||||||
"link-list": "Link to this list",
|
"link-list": "Link to this list",
|
||||||
"list-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the list. There is no undo.",
|
"list-delete-pop": "All actions will be removed from the activity feed and you won't be able to recover the list. There is no undo.",
|
||||||
"list-delete-suggest-archive": "You can archive a list to remove it from the board and preserve the activity.",
|
"list-delete-suggest-archive": "You can archive a list to remove it from the board and preserve the activity.",
|
||||||
"lists": "Lists",
|
"lists": "Lists",
|
||||||
|
"swimlanes": "Swimlanes",
|
||||||
"log-out": "Log Out",
|
"log-out": "Log Out",
|
||||||
"log-in": "Log In",
|
"log-in": "Log In",
|
||||||
"loginPopup-title": "Log In",
|
"loginPopup-title": "Log In",
|
||||||
|
|
@ -288,6 +292,7 @@
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"no-archived-cards": "No archived cards.",
|
"no-archived-cards": "No archived cards.",
|
||||||
"no-archived-lists": "No archived lists.",
|
"no-archived-lists": "No archived lists.",
|
||||||
|
"no-archived-swimlanes": "No archived swimlanes.",
|
||||||
"no-results": "No results",
|
"no-results": "No results",
|
||||||
"normal": "Normal",
|
"normal": "Normal",
|
||||||
"normal-desc": "Can view and edit cards. Can't change settings.",
|
"normal-desc": "Can view and edit cards. Can't change settings.",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue