forked from OCA/knowledge
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathurl.xml
More file actions
41 lines (41 loc) · 1.56 KB
/
url.xml
File metadata and controls
41 lines (41 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8" ?>
<!-- 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">
<t t-inherit="mail.Chatter" t-inherit-mode="extension">
<xpath expr="//AttachmentList//..//FileUploader/t/*" position="replace">
<div class="d-flex mx-auto">$0</div>
</xpath>
<xpath expr="//AttachmentList//..//FileUploader//button" position="after">
<button
class="btn btn-link"
type="button"
t-att-disabled="!state.thread.hasWriteAccess"
t-on-click="_onAddUrl"
>
<i class="fa fa-plus-square" /> Add URL
</button>
</xpath>
</t>
<t t-inherit="mail.AttachmentList" t-inherit-mode="extension">
<xpath
expr="//div[hasclass('o-mail-AttachmentCard-image')]"
position="attributes"
>
<attribute
name="t-if"
>attachment.mimetype !== 'application/link'</attribute>
</xpath>
<xpath expr="//div[hasclass('o-mail-AttachmentCard-image')]" position="before">
<a
class="o_Attachment_url_ico o_image flex-shrink-0 m-1"
t-att-href="attachmentUrl"
target="_blank"
t-if="attachment.mimetype === 'application/link'"
>
<i class="fa fa-link fa-2x" />
</a>
</xpath>
</t>
</templates>