summaryrefslogtreecommitdiffstats
path: root/client/components/lists/listBody.jade
blob: fcc28777a71e8a9617724b97b150990782f90dc6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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
      unless currentBoard.isTemplatesBoard
        unless currentBoard.isTemplateBoard
          span.quiet
            | {{_ 'or'}}
            a.js-link {{_ 'link'}}
          span.quiet
            |  
            | /
            a.js-search {{_ 'search'}}
          span.quiet
            |  
            | /
            a.js-card-template {{_ 'template'}}

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
      option(value="")
      each boards
        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="searchElementPopup")
  unless isTemplateSearch
    label {{_ 'boards'}}:
    .link-board-wrapper
      select.js-select-boards
        option(value="")
        each boards
          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
        if isListTemplateSearch
          a.minicard-wrapper.js-minicard
            +minilist(this)
        if isSwimlaneTemplateSearch
          a.minicard-wrapper.js-minicard
            +miniswimlane(this)
        if isCardTemplateSearch
          a.minicard-wrapper.js-minicard
            +minicard(this)
        unless isTemplateSearch
          a.minicard-wrapper.js-minicard
            +minicard(this)