mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 07:01:47 +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')
|
||||
| {{_ '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}}.
|
||||
|
||||
|
|
|
|||
|
|
@ -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'}}
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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'}}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue