Esempio n. 1
0
function determineIcon($file, $sharingRoot, $sharingToken)
{
    // for folders we simply reuse the files logic
    if ($file['type'] == 'dir') {
        return \OCA\Files\Helper::determineIcon($file);
    }
    $relativePath = substr($file['path'], 6);
    $relativePath = substr($relativePath, strlen($sharingRoot));
    if ($file['isPreviewAvailable']) {
        return OCP\publicPreview_icon($relativePath, $sharingToken) . '&c=' . $file['etag'];
    }
    return OCP\mimetype_icon($file['mimetype']);
}
Esempio n. 2
0
">
			<div id='new' class='button'>
				<a><?php 
    echo $l->t('New');
    ?>
</a>
				<ul class="popup popupTop">
					<li style="background-image:url('<?php 
    echo OCP\mimetype_icon('text/plain');
    ?>
')" data-type='file'><p><?php 
    echo $l->t('Text file');
    ?>
</p></li>
					<li style="background-image:url('<?php 
    echo OCP\mimetype_icon('dir');
    ?>
')" data-type='folder'><p><?php 
    echo $l->t('Folder');
    ?>
</p></li>
					<li style="background-image:url('<?php 
    echo OCP\image_path('core', 'actions/public.png');
    ?>
')" data-type='web'><p><?php 
    echo $l->t('From url');
    ?>
</p></li>
				</ul>
			</div>
			<div class="file_upload_wrapper svg">
Esempio n. 3
0
			<div id="new" class="button">
				<a><?php 
    p($l->t('New'));
    ?>
</a>
				<ul>
					<li style="background-image:url('<?php 
    p(OCP\mimetype_icon('text/plain'));
    ?>
')"
						data-type='file'><p><?php 
    p($l->t('Text file'));
    ?>
</p></li>
					<li style="background-image:url('<?php 
    p(OCP\mimetype_icon('dir'));
    ?>
')"
						data-type='folder'><p><?php 
    p($l->t('Folder'));
    ?>
</p></li>
					<li style="background-image:url('<?php 
    p(OCP\image_path('core', 'actions/public.png'));
    ?>
')"
						data-type='web'><p><?php 
    p($l->t('From link'));
    ?>
</p></li>
				</ul>
Esempio n. 4
0
    p($file['permissions']);
    ?>
'>
		<td class="filename svg"
		<?php 
    if ($file['type'] == 'dir') {
        ?>
			style="background-image:url(<?php 
        print_unescaped(OCP\mimetype_icon('dir'));
        ?>
)"
		<?php 
    } else {
        ?>
			style="background-image:url(<?php 
        print_unescaped(OCP\mimetype_icon($file['mimetype']));
        ?>
)"
		<?php 
    }
    ?>
			>
		<?php 
    if (!isset($_['readonly']) || !$_['readonly']) {
        ?>
<input type="checkbox" /><?php 
    }
    ?>
		<?php 
    if ($file['type'] == 'dir') {
        ?>
    ?>
" data-mime="<?php 
    echo $file['mimetype'];
    ?>
" data-size='<?php 
    echo $file['size'];
    ?>
' data-write='<?php 
    echo $write;
    ?>
'>
				<td class="filename svg" style="background-image:url(<?php 
    if ($file['type'] == 'dir') {
        echo OCP\mimetype_icon('dir');
    } else {
        echo OCP\mimetype_icon($file['mimetype']);
    }
    ?>
)">
					<?php 
    if (!isset($_['readonly']) || !$_['readonly']) {
        ?>
<input type="checkbox" /><?php 
    }
    ?>
					<a class="name" href="<?php 
    if ($file['type'] == 'dir') {
        echo $_['baseURL'] . $directory . '/' . $name;
    } else {
        echo $_['downloadURL'] . $directory . '/' . $name;
    }