wekan/client/components/cards/attachments.jade
David Arnold 6ce4501f1b
Rem: upload spinner.
attachmentGalery would need refactoring to an individual attachment
component with component state that could be set on the onUpdated event.

I'm not capable of doing this within reasonable time.
2020-09-17 00:42:31 -05:00

53 lines
1.9 KiB
Text

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="attachmentDeletePopup")
p {{_ "attachment-delete-pop"}}
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
template(name="attachmentsGalery")
.attachments-galery
each attachments
.attachment-item
a.attachment-thumbnail.swipebox(href="{{link}}" title="{{name}}")
if isImage
img.attachment-thumbnail-img(src="{{link}}")
else
span.attachment-thumbnail-ext= extension
p.attachment-details
= name
span.attachment-details-actions
a.js-download(href="{{link}}?download=true")
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-plus
| {{_ 'add-attachment' }}