Open wbraswell opened 9 years ago
Here's my work-around code from view.tt:
[%- IF file.image %]
<a href="/static/[% path.join( '/' ) %]/[% file.filename %]"><img src="/static/[% path.join( '/' ) IF path %]/[% file.filename %]" class="filemanager-img" alt="[% file.filename %]" title="Click to select this image"></a>
<br><a href="/static/[% path.join( '/' ) %]/[% file.filename %]">[% file.filename %]</a>
[%- ELSE %]
<a href="/static/[% path.join( '/' ) %]/[% file.filename %]"><img src="/static/images/icons/file.png" class="filemanager-img" alt="[% file.filename %]" title="Click to select file"></a>
<br><a href="/static/[% path.join( '/' ) %]/[% file.filename %]">[% file.filename %]</a>
[%- END %]
The filepicker window is primarily designed to be launched from CKEditor, rather than vice versa. I thought it might be useful to also make it directly visible in the admin area, but in practice it's mostly just caused confusion. I may remove the link from the admin menus until a better UI can be written...
Why can't we just have file download links?
When I invoke root/admin/filemanager/view.tt I should be able to click on each file (either image or non-image) and have something happen. According to the code, CKEditor should be launched with some unknown action, which doesn't work.
BECOMES
Which gives a Javascript syntax error because callFunction has a missing first argument and goes straight to a comma.
If we can't have CKEditor launched for whatever reason, we at least need to make it so that there are valid links to download the files. As it is now, we can only look at a list of files, clicking on the files does nothing!