mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-27 15:17:44 -06:00
[MIG] attachment_preview: Migration to 15.0
This commit is contained in:
@@ -1,24 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<templates>
|
||||
<t t-extend="mail.Attachment">
|
||||
<t t-jquery=".o_attachment_download" t-operation="after">
|
||||
<span
|
||||
t-if="!attachment.callback and attachment.url"
|
||||
class="fa fa-search ml4 o_attachment_preview"
|
||||
t-att-data-id="attachment.id"
|
||||
t-att-data-url="attachment.url"
|
||||
t-attf-title="Preview #{attachment.name} in side panel"
|
||||
/>
|
||||
|
||||
<span
|
||||
t-if="!attachment.callback and attachment.url"
|
||||
class="fa fa-external-link ml4 o_attachment_preview o_attachment_preview_new_tab"
|
||||
data-target="new"
|
||||
t-att-data-id="attachment.id"
|
||||
t-att-data-url="attachment.url"
|
||||
t-attf-title="Open preview #{attachment.name} in a new tab"
|
||||
/>
|
||||
</t>
|
||||
<t
|
||||
t-name="Attachment"
|
||||
t-inherit="mail.AttachmentCard"
|
||||
t-inherit-mode="extension"
|
||||
owl="1"
|
||||
>
|
||||
<xpath expr="//div[hasclass('o_AttachmentCard_aside')]" position="before">
|
||||
<div
|
||||
class="o_AttachmentCard_aside position-relative overflow-hidden"
|
||||
t-att-class="{ 'o-has-multiple-action d-flex flex-column': !attachmentCard.attachmentList.composerView and attachmentCard.attachment.isEditable }"
|
||||
>
|
||||
<div
|
||||
t-if="attachmentCard.attachment.downloadUrl"
|
||||
class="o_AttachmentCard_asideItem d-flex justify-content-center align-items-center ml4 o_attachment_preview"
|
||||
t-att-data-id="attachmentCard.attachment.id"
|
||||
t-att-data-url="attachmentCard.attachment.defaultSource"
|
||||
t-on-click="attachmentCard._onPreviewAttachment"
|
||||
t-att-data-original-title="attachmentCard.attachment.name"
|
||||
t-attf-title="Preview {{attachmentCard.attachment.displayName}} in side panel"
|
||||
tabindex="0"
|
||||
role="menuitem"
|
||||
aria-label="Preview"
|
||||
>
|
||||
<i class="fa fa-search" />
|
||||
</div>
|
||||
<div
|
||||
t-if="attachmentCard.attachment.downloadUrl"
|
||||
class="o_AttachmentCard_asideItem d-flex justify-content-center align-items-center ml4 o_attachment_preview o_attachment_preview_new_tab"
|
||||
data-target="new"
|
||||
t-att-data-id="attachmentCard.attachment.id"
|
||||
t-att-data-url="attachmentCard.attachment.defaultSource"
|
||||
t-on-click="attachmentCard._onPreviewAttachment"
|
||||
t-att-data-original-title="attachmentCard.attachment.name"
|
||||
t-attf-title="Open preview {{attachmentCard.attachment.name}} in a new tab"
|
||||
tabindex="0"
|
||||
role="menuitem"
|
||||
aria-label="Open in new page"
|
||||
>
|
||||
<i class="fa fa-external-link" />
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</t>
|
||||
|
||||
<t t-name="attachment_preview.AttachmentPreviewWidget">
|
||||
@@ -38,7 +61,6 @@
|
||||
<button
|
||||
class="btn btn-sm btn-secondary pull-left ml8 attachment_preview_popout"
|
||||
><i class="fa fa-external-link" /></button>
|
||||
|
||||
<button
|
||||
class="btn btn-sm btn-secondary pull-right attachment_preview_close"
|
||||
><i class="fa fa-times" /></button>
|
||||
|
||||
Reference in New Issue
Block a user