mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
This allows to reduce the loading time of a big board. Note that there is an infinite scroll implementation in the mixins, but this doesn't fit well as the cards in the list can have arbitrary height. The idea to rely on the visibility of a spinner is based on http://www.meteorpedia.com/read/Infinite_Scrolling
105 lines
3.4 KiB
Text
105 lines
3.4 KiB
Text
template(name="listBody")
|
|
.list-body.js-perfect-scrollbar
|
|
.minicards.clearfix.js-minicards(class="{{#if reachedWipLimit}}js-list-full{{/if}}")
|
|
if cards.count
|
|
+inlinedForm(autoclose=false position="top")
|
|
+addCardForm(listId=_id position="top")
|
|
each (cardsWithLimit (idOrNull ../../_id))
|
|
a.minicard-wrapper.js-minicard(href=absoluteUrl
|
|
class="{{#if cardIsSelected}}is-selected{{/if}}"
|
|
class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}")
|
|
if MultiSelection.isActive
|
|
.materialCheckBox.multi-selection-checkbox.js-toggle-multi-selection(
|
|
class="{{#if MultiSelection.isSelected _id}}is-checked{{/if}}")
|
|
+minicard(this)
|
|
if (showSpinner (idOrNull ../../_id))
|
|
.sk-spinner.sk-spinner-wave.sk-spinner-list(
|
|
class=currentBoard.colorClass
|
|
id="showMoreResults")
|
|
.sk-rect1
|
|
.sk-rect2
|
|
.sk-rect3
|
|
.sk-rect4
|
|
.sk-rect5
|
|
|
|
if canSeeAddCard
|
|
+inlinedForm(autoclose=false position="bottom")
|
|
+addCardForm(listId=_id position="bottom")
|
|
else
|
|
a.open-minicard-composer.js-card-composer.js-open-inlined-form
|
|
i.fa.fa-plus
|
|
| {{_ 'add-card'}}
|
|
|
|
template(name="addCardForm")
|
|
.minicard.minicard-composer.js-composer
|
|
if getLabels
|
|
.minicard-labels
|
|
each getLabels
|
|
.minicard-label(class="card-label-{{color}}" title="{{name}}")
|
|
textarea.minicard-composer-textarea.js-card-title(autofocus)
|
|
if members.get
|
|
.minicard-members.js-minicard-composer-members
|
|
each members.get
|
|
+userAvatar(userId=this)
|
|
|
|
.add-controls.clearfix
|
|
button.primary.confirm(type="submit") {{_ 'add'}}
|
|
unless isSandstorm
|
|
span.quiet
|
|
| {{_ 'or'}}
|
|
a.js-link {{_ 'link'}}
|
|
span.quiet
|
|
|
|
|
| /
|
|
a.js-search {{_ 'search'}}
|
|
|
|
template(name="autocompleteLabelLine")
|
|
.minicard-label(class="card-label-{{colorName}}" title=labelName)
|
|
span(class="{{#if hasNoName}}quiet{{/if}}")= labelName
|
|
|
|
template(name="linkCardPopup")
|
|
label {{_ 'boards'}}:
|
|
.link-board-wrapper
|
|
select.js-select-boards
|
|
each boards
|
|
if $eq _id currentBoard._id
|
|
option(value="{{_id}}" selected) {{_ 'current'}}
|
|
else
|
|
option(value="{{_id}}") {{title}}
|
|
input.primary.confirm.js-link-board(type="button" value="{{_ 'link'}}")
|
|
|
|
label {{_ 'swimlanes'}}:
|
|
select.js-select-swimlanes
|
|
each swimlanes
|
|
option(value="{{_id}}") {{title}}
|
|
|
|
label {{_ 'lists'}}:
|
|
select.js-select-lists
|
|
each lists
|
|
option(value="{{_id}}") {{title}}
|
|
|
|
label {{_ 'cards'}}:
|
|
select.js-select-cards
|
|
each cards
|
|
option(value="{{getId}}") {{getTitle}}
|
|
|
|
.edit-controls.clearfix
|
|
unless isSandstorm
|
|
input.primary.confirm.js-done(type="button" value="{{_ 'link'}}")
|
|
|
|
template(name="searchCardPopup")
|
|
label {{_ 'boards'}}:
|
|
.link-board-wrapper
|
|
select.js-select-boards
|
|
each boards
|
|
if $eq _id currentBoard._id
|
|
option(value="{{_id}}" selected) {{_ 'current'}}
|
|
else
|
|
option(value="{{_id}}") {{title}}
|
|
form.js-search-term-form
|
|
input(type="text" name="searchTerm" placeholder="{{_ 'search-example'}}" autofocus)
|
|
.list-body.js-perfect-scrollbar.search-card-results
|
|
.minicards.clearfix.js-minicards
|
|
each results
|
|
a.minicard-wrapper.js-minicard
|
|
+minicard(this)
|