summaryrefslogtreecommitdiffstats
path: root/client/components/cards/attachments.jade
blob: 783178e60984c6efd92988ac44e76d8c97c75ecc (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
template(name="cardAttachmentsPopup")
  ul.pop-over-list
    li
      input.js-attach-file.hide(type="file" name="file" multiple)
      a.js-computer-upload {{_ 'computer'}}

template(name="attachmentDeletePopup")
  p {{_ "attachment-delete-pop"}}
  button.js-confirm.negate.full(type="submit") {{_ 'delete'}}

template(name="attachmentsGalery")
  .attachments-galery
    each attachments
      a.attachment-item.js-open-viewer(title="{{_ 'added'}} {{ moment uploadedAt }}")
        .attachment-thumbnail
          if isUploaded
            if isImage
              img.attachment-thumbnail-img(src=url)
            else
              span.attachment-thumbnail-ext= extension
          else
            +spinner
        p.attachment-details
          = name
          span.attachment-details-actions
            a.js-download(href="{{url download=true}}")
              i.fa.fa-download
              | {{_ 'download'}}
            if isImage
              a(class="{{#if $eq ../coverId _id}}js-remove-cover{{else}}js-add-cover{{/if}}")
                i.fa.fa-thumb-tack
                if($eq ../coverId _id)
                  | {{_ 'remove-cover'}}
                else
                  | {{_ 'add-cover'}}
            a.js-confirm-delete
              i.fa.fa-close
              | {{_ 'delete'}}

    a.attachment-item.add-attachment.js-add-attachment {{_ 'add-attachment' }}