wekan/client/components/cards/attachments.jade

131 lines
5.1 KiB
Text
Raw Normal View History

2015-06-13 15:04:55 +02:00
template(name="cardAttachmentsPopup")
if $gt uploads.length 0
2022-07-16 09:32:49 +02:00
.attachment-upload {{_ 'uploading'}}
table
tr
th.upload-file-name-descr {{_ 'name'}}
th.upload-progress-descr {{_ 'progress'}}
th.upload-remaining-descr {{_ 'remaining_time'}}
th.upload-speed-descr {{_ 'speed'}}
each upload in uploads
tr
td.upload-file-name-value {{upload.file.name}}
td.upload-progress-value {{upload.progress.get}}%
td.upload-remaining-value {{getEstimateTime upload}}
td.upload-speed-value {{getEstimateSpeed upload}}
2022-07-16 09:32:49 +02:00
else
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'}}
2015-06-13 15:04:55 +02:00
template(name="attachmentDeletePopup")
p {{_ "attachment-delete-pop"}}
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
2023-06-30 12:44:04 +02:00
template(name="attachmentsGallery")
2023-06-30 12:35:45 +02:00
#viewer-overlay.hidden
#viewer-container
object#pdf-viewer(type="application/pdf")
span.pdf-preview-error Your device does not support previewing pdfs. Try downloading instead.
a#viewer-close.fa.fa-times-thin
2023-06-30 12:44:04 +02:00
.attachments-gallery
if currentUser.isBoardMember
unless currentUser.isCommentOnly
unless currentUser.isWorker
//li.attachment-item.add-attachment
a.js-add-attachment(title="{{_ 'add-attachment' }}")
i.fa.fa-plus
2015-06-13 15:04:55 +02:00
each attachments
.attachment-item
2023-06-30 12:35:45 +02:00
span.attachment-thumbnail(href="{{link}}" title="{{sanitize name}}" class="{{#if isImage}}swipebox{{/if}} {{#if $eq extension 'pdf'}}pdf{{/if}}")
if link
if($eq extension 'svg')
img.attachment-thumbnail-img(src="{{link}}" title="{{sanitize name}}" type="image/svg+xml")
else if isImage
img.attachment-thumbnail-img(src="{{link}}" title="{{sanitize name}}")
else if($eq extension 'mp3')
video(width="100%" height="100%" title="{{sanitize name}}" controls="true")
source(src="{{link}}" type="audio/mpeg")
else if($eq extension 'ogg')
video(width="100%" height="100%" title="{{sanitize name}}" controls="true")
source(src="{{link}}" type="video/ogg")
else if($eq extension 'webm')
video(width="100%" height="100%" title="{{sanitize name}}" controls="true")
source(src="{{link}}" type="video/webm")
else if($eq extension 'mp4')
video(width="100%" height="100%" title="{{sanitize name}}" controls="true")
source(src="{{link}}" type="video/mp4")
2015-06-13 15:04:55 +02:00
else
span.attachment-thumbnail-ext= extension
p.attachment-details
= name
span.file-size ({{fileSize size}})
2015-06-13 15:04:55 +02:00
span.attachment-details-actions
a.js-download(href="{{link}}?download=true", download="{{name}}")
2015-06-13 15:04:55 +02:00
i.fa.fa-download
| {{_ 'download'}}
if currentUser.isBoardMember
unless currentUser.isCommentOnly
unless currentUser.isWorker
2022-03-27 23:58:41 +02:00
a.fa.fa-navicon.attachment-details-menu.js-open-attachment-menu(title="{{_ 'attachmentActionsPopup-title'}}")
2015-06-13 15:04:55 +02:00
2022-03-27 23:58:41 +02:00
template(name="attachmentActionsPopup")
ul.pop-over-list
li
if isImage
a(class="{{#if isCover}}js-remove-cover{{else}}js-add-cover{{/if}}")
i.fa.fa-book
i.fa.fa-picture-o
2022-03-27 23:58:41 +02:00
if isCover
| {{_ 'remove-cover'}}
else
| {{_ 'add-cover'}}
if currentUser.isBoardAdmin
if isImage
a(class="{{#if isBackgroundImage}}js-remove-background-image{{else}}js-add-background-image{{/if}}")
i.fa.fa-picture-o
if isBackgroundImage
| {{_ 'remove-background-image'}}
else
| {{_ 'add-background-image'}}
a.js-rename
i.fa.fa-pencil-square-o
| {{_ 'rename'}}
2022-03-27 23:58:41 +02:00
a.js-confirm-delete
i.fa.fa-close
| {{_ 'delete'}}
p.attachment-storage
| {{versions.original.storage}}
if $neq versions.original.storage "fs"
a.js-move-storage-fs
i.fa.fa-arrow-right
| {{_ 'attachment-move-storage-fs'}}
if $neq versions.original.storage "gridfs"
if versions.original.storage
a.js-move-storage-gridfs
i.fa.fa-arrow-right
| {{_ 'attachment-move-storage-gridfs'}}
if $neq versions.original.storage "s3"
if versions.original.storage
a.js-move-storage-s3
i.fa.fa-arrow-right
| {{_ 'attachment-move-storage-s3'}}
template(name="attachmentRenamePopup")
input.js-edit-attachment-name(type='text' autofocus value="{{getNameWithoutExtension}}" dir="auto")
.edit-controls.clearfix
button.primary.confirm.js-submit-edit-attachment-name(type="submit") {{_ 'save'}}