diff options
author | Lauri Ojansivu <x@xet7.org> | 2017-02-03 02:02:47 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2017-02-03 02:02:47 +0200 |
commit | 40594485d869be1638ea619bf655cc1de2e079db (patch) | |
tree | 70bb050626b491155f393db2ff3f5546d6a6ae2c /client/components/cards/checklists.jade | |
parent | 70f92c6e0e3e15444cdb20987ce0544ec691d606 (diff) | |
parent | 335b91f0a48c2c64a96a74e8a2b9866bf590714a (diff) | |
download | wekan-40594485d869be1638ea619bf655cc1de2e079db.tar.gz wekan-40594485d869be1638ea619bf655cc1de2e079db.tar.bz2 wekan-40594485d869be1638ea619bf655cc1de2e079db.zip |
Add checklist feature: Merge branch 'lkisme-ckls' into devel
Diffstat (limited to 'client/components/cards/checklists.jade')
-rw-r--r-- | client/components/cards/checklists.jade | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade new file mode 100644 index 00000000..987e6cd9 --- /dev/null +++ b/client/components/cards/checklists.jade @@ -0,0 +1,61 @@ +template(name="checklists") + h2 {{_ 'checklists'}} + .card-checklist-items + each checklist in currentCard.checklists + +checklistDetail(checklist = checklist) + +inlinedForm(classNames="js-add-checklist" cardId = cardId) + +addChecklistItemForm + else + a.js-open-inlined-form + i.fa.fa-plus + | {{_ 'add-checklist'}}... + +template(name="checklistDetail") + +inlinedForm(classNames="js-edit-checklist-title" checklist = checklist) + +editChecklistItemForm(checklist = checklist) + else + .checklist-title + .checkbox.fa.fa-check-square-o + a.js-delete-checklist {{_ "delete"}}... + span.checklist-stat(class="{{#if checklist.isFinished}}is-finished{{/if}}") {{checklist.finishedCount}}/{{checklist.itemCount}} + h2.title.js-open-inlined-form.is-editable {{checklist.title}} + +checklistItems(checklist = checklist) + +template(name="addChecklistItemForm") + textarea.js-add-checklist-item(rows='1' autofocus) + .edit-controls.clearfix + button.primary.confirm.js-submit-add-checklist-item-form(type="submit") {{_ 'save'}} + a.fa.fa-times-thin.js-close-inlined-form + +template(name="editChecklistItemForm") + textarea.js-edit-checklist-item(rows='1' autofocus) + if $eq type 'item' + = item.title + else + = checklist.title + .edit-controls.clearfix + button.primary.confirm.js-submit-edit-checklist-item-form(type="submit") {{_ 'save'}} + a.fa.fa-times-thin.js-close-inlined-form + span(title=createdAt) {{ moment createdAt }} + if currentUser.isBoardMember + a.js-delete-checklist-item {{_ "delete"}}... + +template(name="checklistItems") + .checklist-items + each item in checklist.items + +inlinedForm(classNames="js-edit-checklist-item" item = item checklist = checklist) + +editChecklistItemForm(type = 'item' item = item checklist = checklist) + else + +itemDetail(item = item checklist = checklist) + if currentUser.isBoardMember + +inlinedForm(classNames="js-add-checklist-item" checklist = checklist) + +addChecklistItemForm + else + a.add-checklist-item.js-open-inlined-form + i.fa.fa-plus + | {{_ 'add-checklist-item'}}... + +template(name='itemDetail') + .item + .check-box.materialCheckBox(class="{{#if item.isFinished }}is-checked{{/if}}") + .item-title.js-open-inlined-form.is-editable(class="{{#if item.isFinished }}is-checked{{/if}}") {{item.title}} |