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

template(name="previewClipboardImagePopup")
  p <kbd>Ctrl</kbd>+<kbd>V</kbd> {{_ "paste-or-dragdrop"}}
  img.preview-clipboard-image()
  button.primary.js-upload-pasted-image {{_ 'upload'}}

template(name="previewAttachedImagePopup")
  img.preview-large-image.js-large-image-clicked(src="{{url}}")

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

template(name="uploadingPopup")
  .uploading-info
    span.upload-percentage {{progress}}%
    .upload-progress-frame
      .upload-progress-bar(style="width: {{progress}}%;")
    span.upload-size {{fileSize}}

template(name="attachmentsGalery")
  .attachments-galery
    each attachments
      .attachment-item
        a.attachment-thumbnail.swipebox(href="{{url}}" download="{{name}}" title="{{name}}")
          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}}" download="{{name}}")
              i.fa.fa-download
              | {{_ 'download'}}
            if currentUser.isBoardMember
              unless currentUser.isCommentOnly
                unless currentUser.isWorker
                  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'}}

    if currentUser.isBoardMember
      unless currentUser.isCommentOnly
        unless currentUser.isWorker
          //li.attachment-item.add-attachment
          a.js-add-attachment
            i.fa.fa-paperclip
            | {{_ 'add-attachment' }}