mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Change default view to Swimlanes.
Thanks to xet7 !
This commit is contained in:
parent
f935cf391e
commit
8c3322f9a9
4 changed files with 27 additions and 20 deletions
|
|
@ -105,7 +105,7 @@ template(name="boardHeaderBar")
|
||||||
i.fa.fa-th-large
|
i.fa.fa-th-large
|
||||||
if $eq boardView 'board-view-cal'
|
if $eq boardView 'board-view-cal'
|
||||||
i.fa.fa-calendar
|
i.fa.fa-calendar
|
||||||
span {{#if boardView}}{{_ boardView}}{{else}}{{_ 'board-view-lists'}}{{/if}}
|
span {{#if boardView}}{{_ boardView}}{{else}}{{_ 'board-view-swimlanes'}}{{/if}}
|
||||||
|
|
||||||
if canModifyBoard
|
if canModifyBoard
|
||||||
a.board-header-btn.js-multiselection-activate(
|
a.board-header-btn.js-multiselection-activate(
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,15 @@ function currentCardIsInThisList(listId, swimlaneId) {
|
||||||
currentCard.listId === listId &&
|
currentCard.listId === listId &&
|
||||||
currentCard.swimlaneId === swimlaneId
|
currentCard.swimlaneId === swimlaneId
|
||||||
);
|
);
|
||||||
// Default view: board-view-lists
|
// OLD: Default view: board-view-lists
|
||||||
else return currentCard && currentCard.listId === listId;
|
////else return currentCard && currentCard.listId === listId;
|
||||||
|
// NEW: Default view: board-view-swimlanes
|
||||||
|
else return (
|
||||||
|
currentCard &&
|
||||||
|
currentCard.listId === listId &&
|
||||||
|
currentCard.swimlaneId === swimlaneId
|
||||||
|
);
|
||||||
|
|
||||||
// https://github.com/wekan/wekan/issues/1623
|
// https://github.com/wekan/wekan/issues/1623
|
||||||
// https://github.com/ChronikEwok/wekan/commit/cad9b20451bb6149bfb527a99b5001873b06c3de
|
// https://github.com/ChronikEwok/wekan/commit/cad9b20451bb6149bfb527a99b5001873b06c3de
|
||||||
// TODO: In public board, if you would like to switch between List/Swimlane view, you could
|
// TODO: In public board, if you would like to switch between List/Swimlane view, you could
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ Users.attachSchema(
|
||||||
autoValue() {
|
autoValue() {
|
||||||
if (this.isInsert && !this.isSet) {
|
if (this.isInsert && !this.isSet) {
|
||||||
return {
|
return {
|
||||||
boardView: 'board-view-lists',
|
boardView: 'board-view-swimlanes',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -218,8 +218,8 @@ Users.attachSchema(
|
||||||
type: String,
|
type: String,
|
||||||
optional: true,
|
optional: true,
|
||||||
allowedValues: [
|
allowedValues: [
|
||||||
'board-view-lists',
|
|
||||||
'board-view-swimlanes',
|
'board-view-swimlanes',
|
||||||
|
'board-view-lists',
|
||||||
'board-view-cal',
|
'board-view-cal',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
@ -903,7 +903,7 @@ if (Meteor.isServer) {
|
||||||
user.profile = {
|
user.profile = {
|
||||||
initials,
|
initials,
|
||||||
fullname: user.services.oidc.fullname,
|
fullname: user.services.oidc.fullname,
|
||||||
boardView: 'board-view-lists',
|
boardView: 'board-view-swimlanes',
|
||||||
};
|
};
|
||||||
user.authenticationMethod = 'oauth2';
|
user.authenticationMethod = 'oauth2';
|
||||||
|
|
||||||
|
|
@ -961,7 +961,7 @@ if (Meteor.isServer) {
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
user.profile = { icode: options.profile.invitationcode };
|
user.profile = { icode: options.profile.invitationcode };
|
||||||
user.profile.boardView = 'board-view-lists';
|
user.profile.boardView = 'board-view-swimlanes';
|
||||||
|
|
||||||
// Deletes the invitation code after the user was created successfully.
|
// Deletes the invitation code after the user was created successfully.
|
||||||
setTimeout(
|
setTimeout(
|
||||||
|
|
|
||||||
|
|
@ -246,19 +246,6 @@ Migrations.add('add-checklist-items', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Migrations.add('add-profile-view', () => {
|
|
||||||
Users.find().forEach(user => {
|
|
||||||
if (!user.hasOwnProperty('profile.boardView')) {
|
|
||||||
// Set default view
|
|
||||||
Users.direct.update(
|
|
||||||
{ _id: user._id },
|
|
||||||
{ $set: { 'profile.boardView': 'board-view-lists' } },
|
|
||||||
noValidate,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Migrations.add('add-card-types', () => {
|
Migrations.add('add-card-types', () => {
|
||||||
Cards.find().forEach(card => {
|
Cards.find().forEach(card => {
|
||||||
Cards.direct.update(
|
Cards.direct.update(
|
||||||
|
|
@ -1044,3 +1031,16 @@ Migrations.add('add-sort-field-to-boards', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Migrations.add('add-default-profile-view', () => {
|
||||||
|
Users.find().forEach(user => {
|
||||||
|
if (!user.hasOwnProperty('profile.boardView')) {
|
||||||
|
// Set default view
|
||||||
|
Users.direct.update(
|
||||||
|
{ _id: user._id },
|
||||||
|
{ $set: { 'profile.boardView': 'board-view-swimlanes' } },
|
||||||
|
noValidate,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue