mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-21 04:42:18 -06:00
[MIG] document_url: Migration to 15.0
This commit is contained in:
committed by
FernandoRomera
parent
0cb4d31789
commit
9b0b25a4c9
@@ -2,43 +2,66 @@
|
||||
<!-- Copyright 2018 Tecnativa - Ernesto Tejeda
|
||||
Copyright 2021 Tecnativa - Víctor Martínez
|
||||
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
|
||||
<templates xml:space="preserve">
|
||||
<templates>
|
||||
<t t-inherit="mail.AttachmentBox" t-inherit-mode="extension" owl="1">
|
||||
<xpath expr="//button[hasclass('o_AttachmentBox_buttonAdd')]" position="after">
|
||||
<button
|
||||
type="button"
|
||||
class="o_add_url_button btn btn-link"
|
||||
t-on-click="_onAddUrl"
|
||||
>
|
||||
<xpath
|
||||
expr="//button[hasclass('o_AttachmentBox_buttonAdd')]"
|
||||
position="replace"
|
||||
>
|
||||
<div align="center">
|
||||
<button
|
||||
class="o_AttachmentBox_buttonAdd btn btn-link"
|
||||
type="button"
|
||||
t-on-click="_onClickAdd"
|
||||
>
|
||||
<i class="fa fa-plus-square" />
|
||||
Add attachments
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="o_add_url_button btn btn-link"
|
||||
t-on-click="_onAddUrl"
|
||||
>
|
||||
<i class="fa fa-plus-square" />
|
||||
Add URL
|
||||
</button>
|
||||
</button>
|
||||
</div>
|
||||
</xpath>
|
||||
</t>
|
||||
<t t-inherit="mail.Attachment" t-inherit-mode="extension" owl="1">
|
||||
|
||||
<t t-inherit="mail.AttachmentCard" t-inherit-mode="extension" owl="1">
|
||||
<xpath
|
||||
expr="//t[@t-if='attachment']/t/div[1][hasclass('o_Attachment_details')]//div[hasclass('o_Attachment_filename')]/t"
|
||||
expr="//div[hasclass('o_AttachmentCard_details')]/t/div"
|
||||
position="replace"
|
||||
>
|
||||
<a t-att-href="attachmentUrl" target="new">
|
||||
<t t-esc="attachment.displayName" />
|
||||
<t t-esc="attachmentCard.attachment.displayName" />
|
||||
</a>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//div[hasclass('o_Attachment_asideItemDownload')]"
|
||||
expr="//div[hasclass('o_AttachmentCard_details')]/t[2]/div"
|
||||
position="replace"
|
||||
>
|
||||
</xpath>
|
||||
<xpath
|
||||
expr="//div[hasclass('o_AttachmentCard_asideItemDownload')]"
|
||||
position="attributes"
|
||||
>
|
||||
<attribute name="t-if">attachment.mimetype != 'application/link'</attribute>
|
||||
<attribute
|
||||
name="t-if"
|
||||
>attachmentCard.attachment.mimetype != 'application/link'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_Attachment_image')]" position="attributes">
|
||||
<attribute name="t-if">attachment.mimetype != 'application/link'</attribute>
|
||||
<xpath expr="//div[hasclass('o_AttachmentCard_image')]" position="attributes">
|
||||
<attribute
|
||||
name="t-if"
|
||||
>attachmentCard.attachment.mimetype != 'application/link'</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_Attachment_image')]" position="before">
|
||||
<xpath expr="//div[hasclass('o_AttachmentCard_image')]" position="before">
|
||||
<a
|
||||
class="o_Attachment_url_icon"
|
||||
t-att-href="attachmentUrl"
|
||||
target="new"
|
||||
t-if="attachment.mimetype=='application/link'"
|
||||
t-if="attachmentCard.attachment.mimetype=='application/link'"
|
||||
>
|
||||
<i class="fa fa-link fa-2x" />
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user