Skip to content
Snippets Groups Projects
Commit 6f58eca5 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Change read only check to isCreatable

parent ede2b8a5
Branches
No related tags found
No related merge requests found
...@@ -93,7 +93,7 @@ $tmpl = new OCP\Template( 'files', 'index', 'user' ); ...@@ -93,7 +93,7 @@ $tmpl = new OCP\Template( 'files', 'index', 'user' );
$tmpl->assign( 'fileList', $list->fetchPage(), false ); $tmpl->assign( 'fileList', $list->fetchPage(), false );
$tmpl->assign( 'breadcrumb', $breadcrumbNav->fetchPage(), false ); $tmpl->assign( 'breadcrumb', $breadcrumbNav->fetchPage(), false );
$tmpl->assign( 'dir', $dir); $tmpl->assign( 'dir', $dir);
$tmpl->assign( 'readonly', !OC_Filesystem::is_writable($dir.'/')); $tmpl->assign( 'isCreatable', OC_Filesystem::isCreatable($dir.'/'));
$tmpl->assign( 'files', $files ); $tmpl->assign( 'files', $files );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
$tmpl->assign( 'uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); $tmpl->assign( 'uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
......
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]--> <!--[if IE 8]><style>input[type="checkbox"]{padding:0;}table td{position:static !important;}</style><![endif]-->
<div id="controls"> <div id="controls">
<?php echo($_['breadcrumb']); ?> <?php echo($_['breadcrumb']); ?>
<?php if (!isset($_['readonly']) || !$_['readonly']):?> <?php if ($_['isCreatable']):?>
<div class="actions <?php if (isset($_['files']) and ! $_['readonly'] and count($_['files'])==0):?>emptyfolder<?php endif; ?>"> <div class="actions <?php if (isset($_['files']) and count($_['files'])==0):?>emptyfolder<?php endif; ?>">
<div id='new' class='button'> <div id='new' class='button'>
<a><?php echo $l->t('New');?></a> <a><?php echo $l->t('New');?></a>
<ul class="popup popupTop"> <ul class="popup popupTop">
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</div> </div>
<div id='notification'></div> <div id='notification'></div>
<?php if (isset($_['files']) and ! $_['readonly'] and count($_['files'])==0):?> <?php if (isset($_['files']) and $_['isCreatable'] and count($_['files'])==0):?>
<div id="emptyfolder"><?php echo $l->t('Nothing in here. Upload something!')?></div> <div id="emptyfolder"><?php echo $l->t('Nothing in here. Upload something!')?></div>
<?php endif; ?> <?php endif; ?>
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<thead> <thead>
<tr> <tr>
<th id='headerName'> <th id='headerName'>
<?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" id="select_all" /><?php } ?> <input type="checkbox" id="select_all" />
<span class='name'><?php echo $l->t( 'Name' ); ?></span> <span class='name'><?php echo $l->t( 'Name' ); ?></span>
<span class='selectedActions'> <span class='selectedActions'>
<!-- <a href="" class="share"><img class='svg' alt="Share" src="<?php echo OCP\image_path("core", "actions/share.svg"); ?>" /> <?php echo $l->t('Share')?></a> --> <!-- <a href="" class="share"><img class='svg' alt="Share" src="<?php echo OCP\image_path("core", "actions/share.svg"); ?>" /> <?php echo $l->t('Share')?></a> -->
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<th id="headerDate"><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Delete')?> <img class="svg" alt="<?php echo $l->t('Delete')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span></th> <th id="headerDate"><span id="modified"><?php echo $l->t( 'Modified' ); ?></span><span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Delete')?> <img class="svg" alt="<?php echo $l->t('Delete')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span></th>
</tr> </tr>
</thead> </thead>
<tbody id="fileList" data-readonly="<?php echo $_['readonly'];?>"> <tbody id="fileList">
<?php echo($_['fileList']); ?> <?php echo($_['fileList']); ?>
</tbody> </tbody>
</table> </table>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment