Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
bibliossimo
opacce
Commits
e38d72e6
Commit
e38d72e6
authored
Feb 16, 2018
by
Ghislain Loas
Browse files
dev #71715 add public url to file properties
parent
f6210361
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
library/ZendAfi/View/Helper/Admin/FileManager/File.php
library/ZendAfi/View/Helper/Admin/FileManager/File.php
+11
-3
No files found.
library/ZendAfi/View/Helper/Admin/FileManager/File.php
View file @
e38d72e6
...
...
@@ -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
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment