basic frontend setup, List model updated with wipLimit field

This commit is contained in:
amadilsons 2017-09-28 16:59:53 +02:00
parent eb945f26a3
commit c9c650664f
6 changed files with 31 additions and 2 deletions

View file

@ -6,6 +6,11 @@ template(name="listHeader")
h2.list-header-name( h2.list-header-name(
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}") class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
= title = title
if hasWipLimit
span.wip-limit
| (
= wipLimit
| )
if showCardsCountForList cards.count if showCardsCountForList cards.count
= cards.count = cards.count
span.lowercase span.lowercase
@ -33,6 +38,9 @@ template(name="listActionPopup")
if cards.count if cards.count
li: a.js-select-cards {{_ 'list-select-cards'}} li: a.js-select-cards {{_ 'list-select-cards'}}
hr hr
ul.pop-over-list
li: a.js-set-wip-limit {{#if hasWipLimit}}{{_ 'edit-wip-limit'}}{{else}}{{_ 'set-wip-limit'}}{{/if}}
hr
ul.pop-over-list ul.pop-over-list
li: a.js-close-list {{_ 'archive-list'}} li: a.js-close-list {{_ 'archive-list'}}
hr hr
@ -64,3 +72,7 @@ template(name="listDeletePopup")
unless archived unless archived
p {{_ "list-delete-suggest-archive"}} p {{_ "list-delete-suggest-archive"}}
button.js-confirm.negate.full(type="submit") {{_ 'delete'}} button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
template(name="setWipLimitPopup")
p {{_ 'set-wip-limit'}}
input(type="number")

View file

@ -21,6 +21,11 @@ BlazeComponent.extendComponent({
return count > this.limitToShowCardsCount(); return count > this.limitToShowCardsCount();
}, },
hasWipLimit() {
return null;
//return this.currentData().wipLimit ? true : false;
},
events() { events() {
return [{ return [{
'click .js-open-list-menu': Popup.open('listAction'), 'click .js-open-list-menu': Popup.open('listAction'),
@ -61,6 +66,7 @@ Template.listActionPopup.events({
this.archive(); this.archive();
Popup.close(); Popup.close();
}, },
'click .js-set-wip-limit': Popup.open('setWipLimit'),
'click .js-more': Popup.open('listMore'), 'click .js-more': Popup.open('listMore'),
}); });

View file

@ -167,6 +167,7 @@
"edit": "Edit", "edit": "Edit",
"edit-avatar": "Change Avatar", "edit-avatar": "Change Avatar",
"edit-profile": "Edit Profile", "edit-profile": "Edit Profile",
"edit-wip-limit": "Edit WIP Limit",
"editCardStartDatePopup-title": "Change start date", "editCardStartDatePopup-title": "Change start date",
"editCardDueDatePopup-title": "Change due date", "editCardDueDatePopup-title": "Change due date",
"editLabelPopup-title": "Change Label", "editLabelPopup-title": "Change Label",
@ -306,6 +307,7 @@
"save": "Save", "save": "Save",
"search": "Search", "search": "Search",
"select-color": "Select Color", "select-color": "Select Color",
"set-wip-limit": "Set WIP Limit",
"shortcut-assign-self": "Assign yourself to current card", "shortcut-assign-self": "Assign yourself to current card",
"shortcut-autocomplete-emoji": "Autocomplete emoji", "shortcut-autocomplete-emoji": "Autocomplete emoji",
"shortcut-autocomplete-members": "Autocomplete members", "shortcut-autocomplete-members": "Autocomplete members",
@ -391,4 +393,4 @@
"no": "No", "no": "No",
"accounts": "Accounts", "accounts": "Accounts",
"accounts-allowEmailChange": "Allow Email Change" "accounts-allowEmailChange": "Allow Email Change"
} }

View file

@ -167,6 +167,7 @@
"edit": "Edit", "edit": "Edit",
"edit-avatar": "Change Avatar", "edit-avatar": "Change Avatar",
"edit-profile": "Edit Profile", "edit-profile": "Edit Profile",
"edit-wip-limit": "Edit WIP Limit",
"editCardStartDatePopup-title": "Change start date", "editCardStartDatePopup-title": "Change start date",
"editCardDueDatePopup-title": "Change due date", "editCardDueDatePopup-title": "Change due date",
"editLabelPopup-title": "Change Label", "editLabelPopup-title": "Change Label",
@ -306,6 +307,7 @@
"save": "Save", "save": "Save",
"search": "Search", "search": "Search",
"select-color": "Select Color", "select-color": "Select Color",
"set-wip-limit": "Set WIP Limit",
"shortcut-assign-self": "Assign yourself to current card", "shortcut-assign-self": "Assign yourself to current card",
"shortcut-autocomplete-emoji": "Autocomplete emoji", "shortcut-autocomplete-emoji": "Autocomplete emoji",
"shortcut-autocomplete-members": "Autocomplete members", "shortcut-autocomplete-members": "Autocomplete members",

View file

@ -167,6 +167,7 @@
"edit": "Editar", "edit": "Editar",
"edit-avatar": "Alterar Avatar", "edit-avatar": "Alterar Avatar",
"edit-profile": "Editar Perfil", "edit-profile": "Editar Perfil",
"edit-wip-limit": "Editar Limite WIP",
"editCardStartDatePopup-title": "Altera data de início", "editCardStartDatePopup-title": "Altera data de início",
"editCardDueDatePopup-title": "Altera data fim", "editCardDueDatePopup-title": "Altera data fim",
"editLabelPopup-title": "Alterar Etiqueta", "editLabelPopup-title": "Alterar Etiqueta",
@ -306,6 +307,7 @@
"save": "Salvar", "save": "Salvar",
"search": "Buscar", "search": "Buscar",
"select-color": "Selecionar Cor", "select-color": "Selecionar Cor",
"set-wip-limit": "Definir Limite WIP",
"shortcut-assign-self": "Atribuir a si o cartão atual", "shortcut-assign-self": "Atribuir a si o cartão atual",
"shortcut-autocomplete-emoji": "Autocompletar emoji", "shortcut-autocomplete-emoji": "Autocompletar emoji",
"shortcut-autocomplete-members": "Preenchimento automático de membros", "shortcut-autocomplete-members": "Preenchimento automático de membros",
@ -391,4 +393,4 @@
"no": "Não", "no": "Não",
"accounts": "Contas", "accounts": "Contas",
"accounts-allowEmailChange": "Permitir Mudança de Email" "accounts-allowEmailChange": "Permitir Mudança de Email"
} }

View file

@ -42,6 +42,11 @@ Lists.attachSchema(new SimpleSchema({
} }
}, },
}, },
wipLimit: {
type: SimpleSchema.Integer,
optional: true,
},
})); }));
Lists.allow({ Lists.allow({