Commit e38d72e6 authored by Ghislain Loas's avatar Ghislain Loas

dev #71715 add public url to file properties

parent f6210361
......@@ -25,6 +25,8 @@ class ZendAfi_View_Helper_Admin_FileManager_File extends ZendAfi_View_Helper_Bas
if(!$settings)
$settings = (new Class_Entity)->setSelectFile(false);
$url = $this->view->absoluteUrl($file->getUrl(), null, true);
$dt = [
$this->_tag('dt', $this->_('Nom :')),
$this->_tag('dd', $file->getName()),
......@@ -49,18 +51,24 @@ class ZendAfi_View_Helper_Admin_FileManager_File extends ZendAfi_View_Helper_Bas
];
if($file->isFile())
$dt = array_merge($dt,
[$this->_tag('dt', $this->_('Url public :')),
$this->_tag('dd', urldecode($url))]);
$dl = $this->_tag('dl', implode(array_filter($dt)));
$url = $this->view->absoluteUrl($file->getUrl(), null, true) . '?version='. time(); // force reload image
$url_reload = $url . '?version='. time(); // force reload image
$open_new_tab = ($file->isFile()
? $this->view->tagAnchor($url,
? $this->view->tagAnchor($url_reload,
$this->_('Accéder à "%s" dans un nouvel onglet.', $file->getName()),
['target' => '_blank'])
: '');
$preview = $this->view->tag('p',
($file->isImage()
? $this->view->tagImg($url)
? $this->view->tagImg($url_reload)
: $this->view->tag('i', '', ['class' => $file->getFontAwesome()])), ['class' => 'main-file']);
$models = ($models = $file->getModels())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment