|
@@ -30,54 +30,63 @@ template(name="attachmentDeletePopup")
|
|
|
p {{_ "attachment-delete-pop"}}
|
|
|
button.js-confirm.negate.full(type="submit") {{_ 'delete'}}
|
|
|
|
|
|
-template(name="attachmentsGallery")
|
|
|
+template(name="attachmentViewer")
|
|
|
#viewer-overlay.hidden
|
|
|
#viewer-container
|
|
|
object#pdf-viewer(type="application/pdf")
|
|
|
span.pdf-preview-error {{_ 'preview-pdf-not-supported' }}
|
|
|
a#viewer-close.fa.fa-times-thin
|
|
|
|
|
|
- .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
|
|
|
+template(name="attachmentGallery")
|
|
|
+
|
|
|
+ .attachment-gallery
|
|
|
+
|
|
|
+ a.attachment-item.add-attachment.js-add-attachment
|
|
|
+ i.fa.fa-plus.icon
|
|
|
+
|
|
|
each attachments
|
|
|
- .attachment-item
|
|
|
|
|
|
- span.attachment-thumbnail(href="{{link}}" title="{{sanitize name}}" class="{{#if isImage}}swipebox{{/if}} {{#if $eq extension 'pdf'}}pdf{{/if}}")
|
|
|
+ .attachment-item
|
|
|
+ .attachment-thumbnail-container(href="{{link}}" 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}}")
|
|
|
+ if(isImage)
|
|
|
+ img.attachment-thumbnail(src="{{link}}" title="{{sanitize name}}")
|
|
|
+ else if($eq extension 'svg')
|
|
|
+ img.attachment-thumbnail(src="{{link}}" title="{{sanitize name}}" type="image/svg+xml")
|
|
|
else if($eq extension 'mp3')
|
|
|
- video(width="100%" height="100%" title="{{sanitize name}}" controls="true")
|
|
|
+ video.attachment-thumbnail(title="{{sanitize name}}")
|
|
|
source(src="{{link}}" type="audio/mpeg")
|
|
|
else if($eq extension 'ogg')
|
|
|
- video(width="100%" height="100%" title="{{sanitize name}}" controls="true")
|
|
|
+ video.attachment-thumbnail(title="{{sanitize name}}")
|
|
|
source(src="{{link}}" type="video/ogg")
|
|
|
else if($eq extension 'webm')
|
|
|
- video(width="100%" height="100%" title="{{sanitize name}}" controls="true")
|
|
|
+ video.attachment-thumbnail(title="{{sanitize name}}")
|
|
|
source(src="{{link}}" type="video/webm")
|
|
|
else if($eq extension 'mp4')
|
|
|
- video(width="100%" height="100%" title="{{sanitize name}}" controls="true")
|
|
|
+ video.attachment-thumbnail(title="{{sanitize name}}")
|
|
|
source(src="{{link}}" type="video/mp4")
|
|
|
else
|
|
|
- span.attachment-thumbnail-ext= extension
|
|
|
- p.attachment-details
|
|
|
- = name
|
|
|
- span.file-size ({{fileSize size}})
|
|
|
- span.attachment-details-actions
|
|
|
- a.js-download(href="{{link}}?download=true", download="{{name}}")
|
|
|
- i.fa.fa-download
|
|
|
- | {{_ 'download'}}
|
|
|
- if currentUser.isBoardMember
|
|
|
- unless currentUser.isCommentOnly
|
|
|
- unless currentUser.isWorker
|
|
|
- a.fa.fa-navicon.attachment-details-menu.js-open-attachment-menu(title="{{_ 'attachmentActionsPopup-title'}}")
|
|
|
+ span.attachment-thumbnail-text= extension
|
|
|
+
|
|
|
+ .attachment-details-container
|
|
|
+ .attachment-details
|
|
|
+ div
|
|
|
+ b
|
|
|
+ = name
|
|
|
+ span.file-size ({{fileSize size}})
|
|
|
+ .attachment-actions
|
|
|
+ a.js-download(href="{{link}}?download=true", download="{{name}}")
|
|
|
+ i.fa.fa-download.icon(title="{{_ 'download'}}")
|
|
|
+ if currentUser.isBoardAdmin
|
|
|
+ a.js-rename
|
|
|
+ i.fa.fa-pencil-square-o.icon(title="{{_ 'rename'}}")
|
|
|
+ a.js-confirm-delete
|
|
|
+ i.fa.fa-trash.icon(title="{{_ 'delete'}}")
|
|
|
+ if currentUser.isBoardMember
|
|
|
+ unless currentUser.isCommentOnly
|
|
|
+ unless currentUser.isWorker
|
|
|
+ a.fa.fa-navicon.icon.js-open-attachment-menu(title="{{_ 'attachmentActionsPopup-title'}}")
|
|
|
+
|
|
|
|
|
|
template(name="attachmentActionsPopup")
|
|
|
ul.pop-over-list
|
|
@@ -98,12 +107,6 @@ template(name="attachmentActionsPopup")
|
|
|
| {{_ 'remove-background-image'}}
|
|
|
else
|
|
|
| {{_ 'add-background-image'}}
|
|
|
- a.js-rename
|
|
|
- i.fa.fa-pencil-square-o
|
|
|
- | {{_ 'rename'}}
|
|
|
- a.js-confirm-delete
|
|
|
- i.fa.fa-close
|
|
|
- | {{_ 'delete'}}
|
|
|
p.attachment-storage
|
|
|
| {{versions.original.storage}}
|
|
|
|