Commit 6d4ea4f5 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't show drag cursor when moving files is not enabled

parent 9fe32f95
......@@ -469,7 +469,7 @@ function pieform_element_filebrowser_createfolder(Pieform $form, $element, $data
function pieform_element_filebrowser_update(Pieform $form, $element, $data) {
global $USER;
$collide = $data['collide'] ? $data['collide'] : 'fail';
$collide = !empty($data['collide']) ? $data['collide'] : 'fail';
$artefact = artefact_instance_from_id($data['artefact']);
if (!$USER->can_edit_artefact($artefact)) {
......
......@@ -16,9 +16,13 @@
{foreach from=$filelist item=file}
<tr id="file:{$file->id}" class="r{cycle values=0,1} directory-item{if $file->isparent} parentfolder{/if}{if $file->artefacttype == 'folder'} folder{/if}{if !empty($highlight) && $highlight == $file->id} highlight-file{/if}{if $edit == $file->id} hidden{/if}">
<td>
{if $editable}
<div{if !$file->isparent} class="icon-drag" id="drag:{$file->id}"{/if}>
<img src="{if $file->artefacttype == 'image'}{$WWWROOT}artefact/file/download.php?file={$file->id}&size=20x20{else}{$THEMEURL}images/{$file->artefacttype}.gif{/if}"{if !$file->isparent} title="{str tag=clickanddragtomovefile section=artefact.file arg1=$file->title}"{/if}>
</div>
{else}
<img src="{if $file->artefacttype == 'image'}{$WWWROOT}artefact/file/download.php?file={$file->id}&size=20x20{else}{$THEMEURL}images/{$file->artefacttype}.gif{/if}">
{/if}
</td>
<td class="filename">
{if $file->artefacttype == 'folder'}
......
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