summaryrefslogtreecommitdiffstats
path: root/client/components/cards/cardCustomFields.jade
blob: 9e9f7d84d72dba811fd64c7f307c08464b7e5385 (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
template(name="cardCustomFieldsPopup")
    ul.pop-over-list
        each board.customFields
            li.item(class="")
                a.name.js-select-field(href="#")
                    span.full-name
                        = name
                    if hasCustomField
                        i.fa.fa-check
    hr
    a.quiet-button.full.js-settings
        i.fa.fa-cog
        span {{_ 'settings'}}

template(name="cardCustomField")
    +Template.dynamic(template=getTemplate)

template(name="cardCustomField-text")
    if canModifyCard
        +inlinedForm(classNames="js-card-customfield-text")
            +editor(autofocus=true)
                = value
            .edit-controls.clearfix
                button.primary(type="submit") {{_ 'save'}}
                a.fa.fa-times-thin.js-close-inlined-form
        else
            a.js-open-inlined-form
                if value
                    +viewer
                        = value
                else
                    | {{_ 'edit'}}

template(name="cardCustomField-dropdown")
    if canModifyCard
        +inlinedForm(classNames="js-card-customfield-dropdown")
            select.inline
                each items
                    if($eq data.value this._id)
                        option(value=_id selected="selected") {{name}}
                    else
                        option(value=_id) {{name}}
            .edit-controls.clearfix
                button.primary(type="submit") {{_ 'save'}}
                a.fa.fa-times-thin.js-close-inlined-form
        else
            a.js-open-inlined-form
                if value
                    +viewer
                        = selectedItem
                else
                    | {{_ 'edit'}}