mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-27 07:17:43 -06:00
79 lines
3.6 KiB
XML
79 lines
3.6 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<templates>
|
|
<t t-name="Attachment" t-inherit="mail.AttachmentList" t-inherit-mode="extension">
|
|
<xpath expr="//div[hasclass('o-mail-AttachmentCard-aside')]" position="before">
|
|
<div
|
|
t-if="attachment.downloadUrl"
|
|
class="o-mail-AttachmentCard-aside position-relative rounded-end overflow-hidden d-flex"
|
|
t-att-class="{ 'o-hasMultipleActions d-flex flex-column': showDelete and !env.inComposer }"
|
|
>
|
|
<button
|
|
t-if="this._canPreviewAttachment(attachment)"
|
|
class="d-flex justify-content-center align-items-center w-100 h-100 border-0 bg-300"
|
|
t-att-data-id="attachment.id"
|
|
t-att-data-url="attachment.defaultSource"
|
|
t-on-click.stop="() => this._onPreviewAttachment(attachment)"
|
|
t-att-data-original-title="attachment.name"
|
|
t-attf-title="Preview {{attachment.displayName}} in side panel"
|
|
>
|
|
<i class="fa fa-search" role="img" aria-label="Preview" />
|
|
</button>
|
|
<button
|
|
t-if="this._canPreviewAttachment(attachment)"
|
|
class="d-flex justify-content-center align-items-center w-100 h-100 border-0 bg-300"
|
|
data-target="new"
|
|
t-att-data-id="attachment.id"
|
|
t-att-data-url="attachment.defaultSource"
|
|
t-on-click.stop="() => this._onPreviewAttachment(attachment)"
|
|
t-att-data-original-title="attachment.name"
|
|
t-attf-title="Open preview {{attachment.name}} in a new tab"
|
|
>
|
|
<i
|
|
class="fa fa-external-link"
|
|
role="img"
|
|
aria-label="Open in new page"
|
|
/>
|
|
</button>
|
|
</div>
|
|
</xpath>
|
|
</t>
|
|
|
|
<t t-name="attachment_preview.AttachmentPreviewWidget">
|
|
<div class="attachment_preview_widget d-none">
|
|
<div class="attachment_preview_buttons">
|
|
<div class="button-group pull-left">
|
|
<button
|
|
class="btn btn-sm btn-secondary attachment_preview_previous"
|
|
t-on-click="_onPreviousClick"
|
|
>
|
|
<i class="fa fa-chevron-left" />
|
|
</button>
|
|
<button
|
|
class="btn btn-sm btn-secondary disabled attachment_preview_current"
|
|
t-ref="current"
|
|
>1 / 5</button>
|
|
<button
|
|
class="btn btn-sm btn-secondary attachment_preview_next"
|
|
t-on-click="_onNextClick"
|
|
>
|
|
<i class="fa fa-chevron-right" />
|
|
</button>
|
|
</div>
|
|
<button
|
|
class="btn btn-sm btn-secondary pull-left ml8 attachment_preview_popout"
|
|
t-on-click="_onPopoutClick"
|
|
>
|
|
<i class="fa fa-external-link" />
|
|
</button>
|
|
<button
|
|
class="btn btn-sm btn-secondary pull-right attachment_preview_close"
|
|
t-on-click="_onCloseClick"
|
|
>
|
|
<i class="fa fa-times" />
|
|
</button>
|
|
</div>
|
|
<iframe class="attachment_preview_iframe" t-ref="iframe" />
|
|
</div>
|
|
</t>
|
|
</templates>
|