summaryrefslogtreecommitdiffstats
path: root/apps/files/templates
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2012-12-18 15:41:58 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2012-12-18 15:41:58 +0100
commit586cc9a83b27f54647c3425403cfcfa0cd9210c2 (patch)
tree61305f81a41e0380b65da0fcb20b738ef813d8f6 /apps/files/templates
parentb05666219e43e59cfeab13a53b992cf71ad8bfad (diff)
parentdd5e39ca71d80c97e1b62427642ba1a08f75624d (diff)
downloadnextcloud-server-586cc9a83b27f54647c3425403cfcfa0cd9210c2.tar.gz
nextcloud-server-586cc9a83b27f54647c3425403cfcfa0cd9210c2.zip
merge master into navigation
Diffstat (limited to 'apps/files/templates')
-rw-r--r--apps/files/templates/admin.php22
-rw-r--r--apps/files/templates/index.php73
-rw-r--r--apps/files/templates/part.breadcrumb.php11
-rw-r--r--apps/files/templates/part.list.php69
4 files changed, 121 insertions, 54 deletions
diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php
index 5869ed21072..66fec4cd536 100644
--- a/apps/files/templates/admin.php
+++ b/apps/files/templates/admin.php
@@ -1,17 +1,25 @@
-<?php OCP\Util::addscript('files','admin'); ?>
+<?php OCP\Util::addscript('files', 'admin'); ?>
<form name="filesForm" action='#' method='post'>
<fieldset class="personalblock">
<legend><strong><?php echo $l->t('File handling');?></strong></legend>
<?php if($_['uploadChangable']):?>
- <label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/>(<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)<br/>
+ <label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label>
+ <input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/>
+ (<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)<br/>
<?php endif;?>
- <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1" title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"<?php if ($_['allowZipDownload']) echo ' checked="checked"'; ?> /> <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label> <br/>
+ <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1"
+ title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"
+ <?php if ($_['allowZipDownload']): ?> checked="checked"<?php endif; ?> />
+ <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label><br/>
- <input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> />
- <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files' ); ?> </label><br />
+ <input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php echo $_['maxZipInputSize'] ?>'
+ title="<?php echo $l->t( '0 is unlimited' ); ?>"
+ <?php if (!$_['allowZipDownload']): ?> disabled="disabled"<?php endif; ?> />
+ <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files' ); ?> </label><br />
<input type="hidden" value="<?php echo $_['requesttoken']; ?>" name="requesttoken" />
- <input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings" value="<?php echo $l->t( 'Save' ); ?>"/>
+ <input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings"
+ value="<?php echo $l->t( 'Save' ); ?>"/>
</fieldset>
-</form>
+</form> \ No newline at end of file
diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php
index 7cdff024ddf..bd34c9a76d9 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -3,31 +3,47 @@
<?php echo($_['breadcrumb']); ?>
<?php if ($_['isCreatable']):?>
<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>
<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 link');?></p></li>
+ <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 link');?></p></li>
</ul>
</div>
- <div class="file_upload_wrapper svg">
- <form data-upload-id='1' id="data-upload-form" class="file_upload_form" action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>" method="post" enctype="multipart/form-data" target="file_upload_target_1">
- <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $_['uploadMaxFilesize'] ?>" id="max_upload">
- <!-- Send the requesttoken, this is needed for older IE versions because they don't send the CSRF token via HTTP header in this case -->
+ <div id="upload" class="button">
+ <form data-upload-id='1'
+ id="data-upload-form"
+ class="file_upload_form"
+ action="<?php echo OCP\Util::linkTo('files', 'ajax/upload.php'); ?>"
+ method="post"
+ enctype="multipart/form-data"
+ target="file_upload_target_1">
+ <input type="hidden" name="MAX_FILE_SIZE" id="max_upload"
+ value="<?php echo $_['uploadMaxFilesize'] ?>">
+ <!-- Send the requesttoken, this is needed for older IE versions
+ because they don't send the CSRF token via HTTP header in this case -->
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>" id="requesttoken">
- <input type="hidden" class="max_human_file_size" value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
+ <input type="hidden" class="max_human_file_size"
+ value="(max <?php echo $_['uploadMaxHumanFilesize']; ?>)">
<input type="hidden" name="dir" value="<?php echo $_['dir'] ?>" id="dir">
- <input class="file_upload_start" type="file" name='files[]'/>
- <a href="#" class="file_upload_button_wrapper" onclick="return false;" title="<?php echo $l->t('Upload'); echo ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
- <button class="file_upload_filename"></button>
- <iframe name="file_upload_target_1" class='file_upload_target' src=""></iframe>
+ <input type="file" id="file_upload_start" name='files[]'/>
+ <a href="#" class="svg" onclick="return false;"
+ title="<?php echo $l->t('Upload') . ' max. '.$_['uploadMaxHumanFilesize'] ?>"></a>
+
+ <iframe name="file_upload_target_1" class="file_upload_target" src=""></iframe>
</form>
</div>
- <div id="upload">
- <div id="uploadprogressbar"></div>
- <input type="button" class="stop" style="display:none" value="<?php echo $l->t('Cancel upload');?>" onclick="javascript:Files.cancelUploads();" />
- </div>
+ <div id="uploadprogresswrapper">
+ <div id="uploadprogressbar"></div>
+ <input type="button" class="stop" style="display:none"
+ value="<?php echo $l->t('Cancel upload');?>"
+ onclick="javascript:Files.cancelUploads();"
+ />
+ </div>
</div>
<div id="file_action_panel"></div>
@@ -49,21 +65,32 @@
<input type="checkbox" id="select_all" />
<span class='name'><?php echo $l->t( 'Name' ); ?></span>
<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> -->
<?php if($_['allowZipDownload']) : ?>
- <a href="" class="download"><img class='svg' alt="Download" src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" /> <?php echo $l->t('Download')?></a>
+ <a href="" class="download">
+ <img class="svg" alt="Download"
+ src="<?php echo OCP\image_path("core", "actions/download.svg"); ?>" />
+ <?php echo $l->t('Download')?>
+ </a>
<?php endif; ?>
</span>
</th>
<th id="headerSize"><?php echo $l->t( 'Size' ); ?></th>
<th id="headerDate">
<span id="modified"><?php echo $l->t( 'Modified' ); ?></span>
- <?php if ($_['permissions'] & OCP\Share::PERMISSION_DELETE): ?>
+ <?php if ($_['permissions'] & OCP\PERMISSION_DELETE): ?>
<!-- NOTE: Temporary fix to allow unsharing of files in root of Shared folder -->
<?php if ($_['dir'] == '/Shared'): ?>
- <span class="selectedActions"><a href="" class="delete"><?php echo $l->t('Unshare')?> <img class="svg" alt="<?php echo $l->t('Unshare')?>" src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" /></a></span>
+ <span class="selectedActions"><a href="" class="delete">
+ <?php echo $l->t('Unshare')?>
+ <img class="svg" alt="<?php echo $l->t('Unshare')?>"
+ src="<?php echo OCP\image_path("core", "actions/delete.svg"); ?>" />
+ </a></span>
<?php else: ?>
- <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>
+ <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>
<?php endif; ?>
<?php endif; ?>
</th>
@@ -76,7 +103,7 @@
<div id="editor"></div>
<div id="uploadsize-message" title="<?php echo $l->t('Upload too large')?>">
<p>
- <?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?>
+ <?php echo $l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.');?>
</p>
</div>
<div id="scanning-message">
diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php
index 37b6b63eabd..876cd19bc13 100644
--- a/apps/files/templates/part.breadcrumb.php
+++ b/apps/files/templates/part.breadcrumb.php
@@ -6,8 +6,11 @@
</div>
<?php endif;?>
<?php for($i=0; $i<count($_["breadcrumb"]); $i++):
- $crumb = $_["breadcrumb"][$i]; ?>
- <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo urlencode($crumb["dir"]);?>'>
- <a href="<?php echo $_['baseURL'].urlencode($crumb['dir']); ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a>
+ $crumb = $_["breadcrumb"][$i];
+ $dir = str_replace('+', '%20', urlencode($crumb["dir"])); ?>
+ <div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg"
+ data-dir='<?php echo $dir;?>'
+ style='background-image:url("<?php echo OCP\image_path('core', 'breadcrumb.png');?>")'>
+ <a href="<?php echo $_['baseURL'].$dir; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a>
</div>
- <?php endfor;?>
+ <?php endfor;
diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php
index aaf9c5f57ee..4c765adb7af 100644
--- a/apps/files/templates/part.list.php
+++ b/apps/files/templates/part.list.php
@@ -1,32 +1,49 @@
<script type="text/javascript">
- <?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) {
- echo "var publicListView = true;";
- } else {
- echo "var publicListView = false;";
- }
- ?>
+ <?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) :?>
+ var publicListView = true;
+ <?php else: ?>
+ var publicListView = false;
+ <?php endif; ?>
</script>
<?php foreach($_['files'] as $file):
$simple_file_size = OCP\simple_file_size($file['size']);
- $simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2
+ // the bigger the file, the darker the shade of grey; megabytes*2
+ $simple_size_color = intval(200-$file['size']/(1024*1024)*2);
if($simple_size_color<0) $simple_size_color = 0;
$relative_modified_date = OCP\relative_modified_date($file['mtime']);
- $relative_date_color = round((time()-$file['mtime'])/60/60/24*14); // the older the file, the brighter the shade of grey; days*14
+ // the older the file, the brighter the shade of grey; days*14
+ $relative_date_color = round((time()-$file['mtime'])/60/60/24*14);
if($relative_date_color>200) $relative_date_color = 200;
- $name = str_replace('+','%20', urlencode($file['name']));
- $name = str_replace('%2F','/', $name);
- $directory = str_replace('+','%20', urlencode($file['directory']));
- $directory = str_replace('%2F','/', $directory); ?>
- <tr data-id="<?php echo $file['id']; ?>" data-file="<?php echo $name;?>" data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>" data-mime="<?php echo $file['mimetype']?>" data-size='<?php echo $file['size'];?>' data-permissions='<?php echo $file['permissions']; ?>'>
- <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; ?>" title="">
+ $name = str_replace('+', '%20', urlencode($file['name']));
+ $name = str_replace('%2F', '/', $name);
+ $directory = str_replace('+', '%20', urlencode($file['directory']));
+ $directory = str_replace('%2F', '/', $directory); ?>
+ <tr data-id="<?php echo $file['id']; ?>"
+ data-file="<?php echo $name;?>"
+ data-type="<?php echo ($file['type'] == 'dir')?'dir':'file'?>"
+ data-mime="<?php echo $file['mimetype']?>"
+ data-size='<?php echo $file['size'];?>'
+ data-permissions='<?php echo $file['permissions']; ?>'>
+ <td class="filename svg"
+ <?php if($file['type'] == 'dir'): ?>
+ style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)"
+ <?php else: ?>
+ style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)"
+ <?php endif; ?>
+ >
+ <?php if(!isset($_['readonly']) || !$_['readonly']): ?><input type="checkbox" /><?php endif; ?>
+ <?php if($file['type'] == 'dir'): ?>
+ <a class="name" href="<?php $_['baseURL'].$directory.'/'.$name; ?>)" title="">
+ <?php else: ?>
+ <a class="name" href="<?php echo $_['downloadURL'].$directory.'/'.$name; ?>" title="">
+ <?php endif; ?>
<span class="nametext">
<?php if($file['type'] == 'dir'):?>
<?php echo htmlspecialchars($file['name']);?>
<?php else:?>
- <?php echo htmlspecialchars($file['basename']);?><span class='extension'><?php echo $file['extension'];?></span>
+ <?php echo htmlspecialchars($file['basename']);?><span
+ class='extension'><?php echo $file['extension'];?></span>
<?php endif;?>
</span>
<?php if($file['type'] == 'dir'):?>
@@ -35,7 +52,19 @@
<?php endif;?>
</a>
</td>
- <td class="filesize" title="<?php echo OCP\human_file_size($file['size']); ?>" style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)"><?php echo $simple_file_size; ?></td>
- <td class="date"><span class="modified" title="<?php echo $file['date']; ?>" style="color:rgb(<?php echo $relative_date_color.','.$relative_date_color.','.$relative_date_color ?>)"><?php echo $relative_modified_date; ?></span></td>
+ <td class="filesize"
+ title="<?php echo OCP\human_file_size($file['size']); ?>"
+ style="color:rgb(<?php echo $simple_size_color.','.$simple_size_color.','.$simple_size_color ?>)">
+ <?php echo $simple_file_size; ?>
+ </td>
+ <td class="date">
+ <span class="modified"
+ title="<?php echo $file['date']; ?>"
+ style="color:rgb(<?php echo $relative_date_color.','
+ .$relative_date_color.','
+ .$relative_date_color ?>)">
+ <?php echo $relative_modified_date; ?>
+ </span>
+ </td>
</tr>
- <?php endforeach; ?>
+ <?php endforeach; \ No newline at end of file