[MIG]web_widget_image_download: Migration to 16.0

This commit is contained in:
manu
2024-07-29 11:10:06 +02:00
parent 9e0a86fc82
commit 0ff51e592e
8 changed files with 56 additions and 96 deletions

View File

@@ -2,17 +2,28 @@
<!-- Copyright 2016 Flavio Corpa <flavio.corpa@tecnativa.com>
License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -->
<template>
<t t-extend="FieldBinaryImage">
<t t-jquery=".o_select_file_button" t-operation="after">
<t t-if="widget.value">
<a
class="o_form_binary_file_download float-left"
title="Download"
<t
t-name="web_widget_image_download.ImageField"
t-inherit="web.ImageField"
t-inherit-mode="extension"
owl="1"
>
<xpath expr="//FileUploader/../.." position="after">
<div
t-attf-class="position-absolute top-0 opacity-0 opacity-100-hover {{isMobile ? 'o_mobile_controls' : ''}}"
aria-atomic="true"
t-att-style="sizeStyle"
>
<button
t-if="props.value and state.isValid"
class="o_form_binary_file_download btn btn-light border-0 rounded-circle m-1 p-1"
data-tooltip="Download"
aria-label="Download"
t-on-click="onFileDownload"
>
<button class="fa fa-download fa-lg" />
</a>
</t>
</t>
<i class="fa fa-download fa-fw" />
</button>
</div>
</xpath>
</t>
</template>