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(
class="{{#if currentUser.isBoardMember}}js-open-inlined-form is-editable{{/if}}")
= title
if hasWipLimit
span.wip-limit
| (
= wipLimit
| )
if showCardsCountForList cards.count
= cards.count
span.lowercase
@ -33,6 +38,9 @@ template(name="listActionPopup")
if cards.count
li: a.js-select-cards {{_ 'list-select-cards'}}
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
li: a.js-close-list {{_ 'archive-list'}}
hr
@ -64,3 +72,7 @@ template(name="listDeletePopup")
unless archived
p {{_ "list-delete-suggest-archive"}}
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();
},
hasWipLimit() {
return null;
//return this.currentData().wipLimit ? true : false;
},
events() {
return [{
'click .js-open-list-menu': Popup.open('listAction'),
@ -61,6 +66,7 @@ Template.listActionPopup.events({
this.archive();
Popup.close();
},
'click .js-set-wip-limit': Popup.open('setWipLimit'),
'click .js-more': Popup.open('listMore'),
});

View file

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

View file

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

View file

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