diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-18 23:22:34 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-01-18 23:22:34 +0100 |
commit | afb5de955e00490be5762247e817b20722091f37 (patch) | |
tree | 035b826eacc5a21244c383075138731eaafeaebc /apps/files | |
parent | 130c9cad030ca777e23ef70b76822553ea1c6411 (diff) | |
parent | 31cc9aa80d4284e13dc95d2ef1428bed78c22d65 (diff) | |
download | nextcloud-server-afb5de955e00490be5762247e817b20722091f37.tar.gz nextcloud-server-afb5de955e00490be5762247e817b20722091f37.zip |
Merge branch 'master' into fixing-998-master
Conflicts:
apps/files/ajax/upload.php
apps/files/js/files.js
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/ajax/delete.php | 16 | ||||
-rw-r--r-- | apps/files/ajax/getstoragestats.php | 16 | ||||
-rw-r--r-- | apps/files/ajax/scan.php | 3 | ||||
-rw-r--r-- | apps/files/ajax/upload.php | 35 | ||||
-rw-r--r-- | apps/files/css/files.css | 4 | ||||
-rw-r--r-- | apps/files/index.php | 55 | ||||
-rw-r--r-- | apps/files/js/fileactions.js | 14 | ||||
-rw-r--r-- | apps/files/js/files.js | 87 | ||||
-rw-r--r-- | apps/files/js/jquery-visibility.js | 32 | ||||
-rw-r--r-- | apps/files/l10n/de.php | 12 | ||||
-rw-r--r-- | apps/files/l10n/de_DE.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/es.php | 3 | ||||
-rw-r--r-- | apps/files/l10n/es_AR.php | 6 | ||||
-rw-r--r-- | apps/files/l10n/gl.php | 6 | ||||
-rw-r--r-- | apps/files/l10n/ko.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/nl.php | 4 | ||||
-rw-r--r-- | apps/files/l10n/pl.php | 3 | ||||
-rw-r--r-- | apps/files/l10n/ro.php | 7 | ||||
-rw-r--r-- | apps/files/l10n/ru.php | 8 | ||||
-rw-r--r-- | apps/files/l10n/zh_CN.php | 8 | ||||
-rw-r--r-- | apps/files/templates/part.breadcrumb.php | 20 | ||||
-rw-r--r-- | apps/files/templates/part.list.php | 136 |
22 files changed, 335 insertions, 148 deletions
diff --git a/apps/files/ajax/delete.php b/apps/files/ajax/delete.php index 6532b76df21..293543c547f 100644 --- a/apps/files/ajax/delete.php +++ b/apps/files/ajax/delete.php @@ -21,8 +21,20 @@ foreach($files as $file) { } } +// updated max file size after upload +$l=new OC_L10N('files'); +$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); +$maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize); +$maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize; + if($success) { - OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $files ))); + OCP\JSON::success(array("data" => array( "dir" => $dir, "files" => $files, + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ))); } else { - OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError ))); + OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError, + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ))); } diff --git a/apps/files/ajax/getstoragestats.php b/apps/files/ajax/getstoragestats.php new file mode 100644 index 00000000000..e55e346ed67 --- /dev/null +++ b/apps/files/ajax/getstoragestats.php @@ -0,0 +1,16 @@ +<?php + +// only need filesystem apps +$RUNTIME_APPTYPES = array('filesystem'); + +OCP\JSON::checkLoggedIn(); + +$l=new OC_L10N('files'); +$maxUploadFilesize = OCP\Util::maxUploadFilesize($dir); +$maxHumanFilesize = OCP\Util::humanFileSize($maxUploadFilesize); +$maxHumanFilesize = $l->t('Upload') . ' max. ' . $maxHumanFilesize; + +// send back json +OCP\JSON::success(array('data' => array('uploadMaxFilesize' => $maxUploadFilesize, + 'maxHumanFilesize' => $maxHumanFilesize +))); diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index 5cd9572d7f9..a819578e309 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -6,13 +6,14 @@ $force=isset($_GET['force']) and $_GET['force']=='true'; $dir=isset($_GET['dir'])?$_GET['dir']:''; $checkOnly=isset($_GET['checkonly']) and $_GET['checkonly']=='true'; +$eventSource=false; if(!$checkOnly) { $eventSource=new OC_EventSource(); } session_write_close(); -//create the file cache if necesary +//create the file cache if necessary if($force or !OC_FileCache::inCache('')) { if(!$checkOnly) { OCP\DB::beginTransaction(); diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index b6705db6712..8f0084e2bc0 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -10,8 +10,17 @@ OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); $l=OC_L10N::get('files'); +// current max upload size +$l=new OC_L10N('files'); +$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); +$maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize); +$maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize; + if (!isset($_FILES['files'])) { - OCP\JSON::error(array('data' => array( 'message' => $l->t( 'No file was uploaded. Unknown error' )))); + OCP\JSON::error(array('data' => array( 'message' => $l->t( 'No file was uploaded. Unknown error' ), + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ))); exit(); } @@ -28,7 +37,10 @@ foreach ($_FILES['files']['error'] as $error) { UPLOAD_ERR_NO_TMP_DIR=>$l->t('Missing a temporary folder'), UPLOAD_ERR_CANT_WRITE=>$l->t('Failed to write to disk'), ); - OCP\JSON::error(array('data' => array( 'message' => $errors[$error] ))); + OCP\JSON::error(array('data' => array( 'message' => $errors[$error], + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ))); exit(); } } @@ -42,7 +54,9 @@ foreach($files['size'] as $size) { $totalSize+=$size; } if($totalSize>OC_Filesystem::free_space($dir)) { - OCP\JSON::error(array('data' => array( 'message' => $l->t( 'Not enough storage available' )))); + OCP\JSON::error(array('data' => array( 'message' => $l->t( 'Not enough storage available' ), + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize))); exit(); } @@ -56,11 +70,19 @@ if(strpos($dir, '..') === false) { if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) { $meta = OC_FileCache::get($target); $id = OC_FileCache::getId($target); + // updated max file size after upload + $maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); + $maxHumanFilesize=OCP\Util::humanFileSize($maxUploadFilesize); + $maxHumanFilesize=$l->t('Upload') . ' max. '.$maxHumanFilesize; + $result[]=array( 'status' => 'success', 'mime'=>$meta['mimetype'], 'size'=>$meta['size'], 'id'=>$id, - 'name'=>basename($target)); + 'name'=>basename($target), + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize + ); } } OCP\JSON::encodedPrint($result); @@ -69,4 +91,7 @@ if(strpos($dir, '..') === false) { $error=$l->t( 'Invalid directory.' ); } -OCP\JSON::error(array('data' => array('message' => $error ))); +OCP\JSON::error(array('data' => array('message' => $error, + 'uploadMaxFilesize'=>$maxUploadFilesize, + 'maxHumanFilesize'=>$maxHumanFilesize +))); diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 36a1e5c954b..0c97b009b88 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -23,7 +23,7 @@ #new>ul>li>p { cursor:pointer; } #new>ul>li>form>input { padding:0.3em; margin:-0.3em; } -#upload { +#upload { height:27px; padding:0; margin-left:0.2em; overflow:hidden; } #upload a { @@ -35,7 +35,7 @@ } .file_upload_target { display:none; } .file_upload_form { display:inline; float:left; margin:0; padding:0; cursor:pointer; overflow:visible; } -#file_upload_start { +#file_upload_start { left:0; top:0; width:28px; height:27px; padding:0; font-size:1em; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; diff --git a/apps/files/index.php b/apps/files/index.php index 9d3eb410791..2c6b689b0c9 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -28,6 +28,7 @@ OCP\User::checkLoggedIn(); OCP\Util::addStyle('files', 'files'); OCP\Util::addscript('files', 'jquery.iframe-transport'); OCP\Util::addscript('files', 'jquery.fileupload'); +OCP\Util::addscript('files', 'jquery-visibility'); OCP\Util::addscript('files', 'files'); OCP\Util::addscript('files', 'filelist'); OCP\Util::addscript('files', 'fileactions'); @@ -38,36 +39,36 @@ OCP\App::setActiveNavigationEntry('files_index'); $dir = isset($_GET['dir']) ? stripslashes($_GET['dir']) : ''; // Redirect if directory does not exist if (!OC_Filesystem::is_dir($dir . '/')) { - header('Location: ' . $_SERVER['SCRIPT_NAME'] . ''); - exit(); + header('Location: ' . $_SERVER['SCRIPT_NAME'] . ''); + exit(); } $files = array(); foreach (OC_Files::getdirectorycontent($dir) as $i) { - $i['date'] = OCP\Util::formatDate($i['mtime']); - if ($i['type'] == 'file') { - $fileinfo = pathinfo($i['name']); - $i['basename'] = $fileinfo['filename']; - if (!empty($fileinfo['extension'])) { - $i['extension'] = '.' . $fileinfo['extension']; - } else { - $i['extension'] = ''; - } - } - if ($i['directory'] == '/') { - $i['directory'] = ''; - } - $files[] = $i; + $i['date'] = OCP\Util::formatDate($i['mtime']); + if ($i['type'] == 'file') { + $fileinfo = pathinfo($i['name']); + $i['basename'] = $fileinfo['filename']; + if (!empty($fileinfo['extension'])) { + $i['extension'] = '.' . $fileinfo['extension']; + } else { + $i['extension'] = ''; + } + } + if ($i['directory'] == '/') { + $i['directory'] = ''; + } + $files[] = $i; } // Make breadcrumb $breadcrumb = array(); $pathtohere = ''; foreach (explode('/', $dir) as $i) { - if ($i != '') { - $pathtohere .= '/' . $i; - $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i); - } + if ($i != '') { + $pathtohere .= '/' . $i; + $breadcrumb[] = array('dir' => $pathtohere, 'name' => $i); + } } // make breadcrumb und filelist markup @@ -79,23 +80,17 @@ $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', ''); $breadcrumbNav->assign('breadcrumb', $breadcrumb, false); $breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=', false); -$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize')); -$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size')); -$maxUploadFilesize = min($upload_max_filesize, $post_max_size); - -$freeSpace = OC_Filesystem::free_space($dir); -$freeSpace = max($freeSpace, 0); -$maxUploadFilesize = min($maxUploadFilesize, $freeSpace); +$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); $permissions = OCP\PERMISSION_READ; if (OC_Filesystem::isUpdatable($dir . '/')) { - $permissions |= OCP\PERMISSION_UPDATE; + $permissions |= OCP\PERMISSION_UPDATE; } if (OC_Filesystem::isDeletable($dir . '/')) { - $permissions |= OCP\PERMISSION_DELETE; + $permissions |= OCP\PERMISSION_DELETE; } if (OC_Filesystem::isSharable($dir . '/')) { - $permissions |= OCP\PERMISSION_SHARE; + $permissions |= OCP\PERMISSION_SHARE; } // information about storage capacities diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 80b9c01f838..f5ee363a4c8 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -70,23 +70,23 @@ var FileActions = { } parent.children('a.name').append('<span class="fileactions" />'); var defaultAction = FileActions.getDefault(FileActions.getCurrentMimeType(), FileActions.getCurrentType(), FileActions.getCurrentPermissions()); - + var actionHandler = function (event) { event.stopPropagation(); event.preventDefault(); FileActions.currentFile = event.data.elem; var file = FileActions.getCurrentFile(); - + event.data.actionFunc(file); }; - + $.each(actions, function (name, action) { // NOTE: Temporary fix to prevent rename action in root of Shared directory if (name === 'Rename' && $('#dir').val() === '/Shared') { return true; } - + if ((name === 'Download' || action !== defaultAction) && name !== 'Delete') { var img = FileActions.icons[name]; if (img.call) { @@ -97,16 +97,16 @@ var FileActions = { html += '<img class ="svg" src="' + img + '" /> '; } html += t('files', name) + '</a>'; - + var element = $(html); element.data('action', name); //alert(element); element.on('click',{a:null, elem:parent, actionFunc:actions[name]},actionHandler); parent.find('a.name>span.fileactions').append(element); } - + }); - + if (actions['Delete']) { var img = FileActions.icons['Delete']; if (img.call) { diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 426f91c7928..f4d572b6954 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -26,6 +26,23 @@ Files={ }); procesSelection(); }, + updateMaxUploadFilesize:function(response) { + if(response == undefined) { + return; + } + if(response.data !== undefined && response.data.uploadMaxFilesize !== undefined) { + $('#max_upload').val(response.data.uploadMaxFilesize); + $('#data-upload-form a').attr('original-title', response.data.maxHumanFilesize); + } + if(response[0] == undefined) { + return; + } + if(response[0].uploadMaxFilesize !== undefined) { + $('#max_upload').val(response[0].uploadMaxFilesize); + $('#data-upload-form a').attr('original-title', response[0].maxHumanFilesize); + } + + }, isFileNameValid:function (name) { if (name === '.') { OC.Notification.show(t('files', '\'.\' is an invalid file name.')); @@ -47,19 +64,19 @@ Files={ OC.Notification.hide(); return true; }, - displayStorageWarnings: function() { - var usedSpacePercent = $('#usedSpacePercent').val(); - if (usedSpacePercent > 98) { + displayStorageWarnings: function() { + var usedSpacePercent = $('#usedSpacePercent').val(); + if (usedSpacePercent > 98) { OC.Notification.show(t('files', 'Your storage is full, files can not be updated or synced anymore!')); return; - } - if (usedSpacePercent > 90) { + } + if (usedSpacePercent > 90) { OC.Notification.show(t('files', 'Your storage is almost full ({usedSpacePercent}%)', {usedSpacePercent: usedSpacePercent})); - } - } + } + } }; $(document).ready(function() { - Files.bindKeyboardShortcuts(document, jQuery); + Files.bindKeyboardShortcuts(document, jQuery); $('#fileList tr').each(function(){ //little hack to set unescape filenames in attribute $(this).attr('data-file',decodeURIComponent($(this).attr('data-file'))); @@ -94,8 +111,8 @@ $(document).ready(function() { // Sets the file link behaviour : $('td.filename a').live('click',function(event) { - event.preventDefault(); if (event.ctrlKey || event.shiftKey) { + event.preventDefault(); if (event.shiftKey) { var last = $(lastChecked).parent().parent().prevAll().length; var first = $(this).parent().parent().prevAll().length; @@ -137,6 +154,7 @@ $(document).ready(function() { var permissions = $(this).parent().parent().data('permissions'); var action=FileActions.getDefault(mime,type, permissions); if(action){ + event.preventDefault(); action(filename); } } @@ -319,8 +337,9 @@ $(document).ready(function() { var response; response=jQuery.parseJSON(result); if(response[0] == undefined || response[0].status != 'success') { - OC.Notification.show(t('files', response.data.message)); + OC.Notification.show(t('files', response.data.message)); } + Files.updateMaxUploadFilesize(response); var file=response[0]; // TODO: this doesn't work if the file name has been changed server side delete uploadingFiles[dirName][file.name]; @@ -371,6 +390,8 @@ $(document).ready(function() { .success(function(result, textStatus, jqXHR) { var response; response=jQuery.parseJSON(result); + Files.updateMaxUploadFilesize(response); + if(response[0] != undefined && response[0].status == 'success') { var file=response[0]; delete uploadingFiles[file.name]; @@ -382,18 +403,18 @@ $(document).ready(function() { //TODO update file upload size limit FileList.loadingDone(file.name, file.id); } else { - Files.cancelUpload(this.files[0].name); + Files.cancelUpload(this.files[0].name); OC.Notification.show(t('files', response.data.message)); $('#fileList > tr').not('[data-mime]').fadeOut(); $('#fileList > tr').not('[data-mime]').remove(); } - }) - .error(function(jqXHR, textStatus, errorThrown) { - if(errorThrown === 'abort') { - Files.cancelUpload(this.files[0].name); - OC.Notification.show(t('files', 'Upload cancelled.')); - } - }); + }) + .error(function(jqXHR, textStatus, errorThrown) { + if(errorThrown === 'abort') { + Files.cancelUpload(this.files[0].name); + OC.Notification.show(t('files', 'Upload cancelled.')); + } + }); uploadingFiles[uniqueName] = jqXHR; } } @@ -401,6 +422,7 @@ $(document).ready(function() { data.submit().success(function(data, status) { // in safari data is a string response = jQuery.parseJSON(typeof data === 'string' ? data : data[0].body.innerText); + Files.updateMaxUploadFilesize(response); if(response[0] != undefined && response[0].status == 'success') { var file=response[0]; delete uploadingFiles[file.name]; @@ -412,7 +434,7 @@ $(document).ready(function() { //TODO update file upload size limit FileList.loadingDone(file.name, file.id); } else { - //TODO Files.cancelUpload(/*where do we get the filename*/); + //TODO Files.cancelUpload(/*where do we get the filename*/); OC.Notification.show(t('files', response.data.message)); $('#fileList > tr').not('[data-mime]').fadeOut(); $('#fileList > tr').not('[data-mime]').remove(); @@ -713,6 +735,32 @@ $(document).ready(function() { // display storage warnings setTimeout ( "Files.displayStorageWarnings()", 100 ); OC.Notification.setDefault(Files.displayStorageWarnings); + + // file space size sync + function update_storage_statistics() { + $.getJSON(OC.filePath('files','ajax','getstoragestats.php'),function(response) { + Files.updateMaxUploadFilesize(response); + }); + } + + // start on load - we ask the server every 5 minutes + var update_storage_statistics_interval = 5*60*1000; + var update_storage_statistics_interval_id = setInterval(update_storage_statistics, update_storage_statistics_interval); + + // Use jquery-visibility to de-/re-activate file stats sync + if ($.support.pageVisibility) { + $(document).on({ + 'show.visibility': function() { + if (!update_storage_statistics_interval_id) { + update_storage_statistics_interval_id = setInterval(update_storage_statistics, update_storage_statistics_interval); + } + }, + 'hide.visibility': function() { + clearInterval(update_storage_statistics_interval_id); + update_storage_statistics_interval_id = 0; + } + }); + } }); function scanFiles(force,dir){ @@ -742,6 +790,7 @@ scanFiles.scanning=false; function boolOperationFinished(data, callback) { result = jQuery.parseJSON(data.responseText); + Files.updateMaxUploadFilesize(result); if(result.status == 'success'){ callback.call(); } else { diff --git a/apps/files/js/jquery-visibility.js b/apps/files/js/jquery-visibility.js new file mode 100644 index 00000000000..a824bf68730 --- /dev/null +++ b/apps/files/js/jquery-visibility.js @@ -0,0 +1,32 @@ +/*! http://mths.be/visibility v1.0.5 by @mathias */ +(function (window, document, $, undefined) { + + var prefix, + property, +// In Opera, `'onfocusin' in document == true`, hence the extra `hasFocus` check to detect IE-like behavior + eventName = 'onfocusin' in document && 'hasFocus' in document ? 'focusin focusout' : 'focus blur', + prefixes = ['', 'moz', 'ms', 'o', 'webkit'], + $support = $.support, + $event = $.event; + + while ((property = prefix = prefixes.pop()) != undefined) { + property = (prefix ? prefix + 'H' : 'h') + 'idden'; + if ($support.pageVisibility = typeof document[property] == 'boolean') { + eventName = prefix + 'visibilitychange'; + break; + } + } + + $(/blur$/.test(eventName) ? window : document).on(eventName, function (event) { + var type = event.type, + originalEvent = event.originalEvent, + toElement = originalEvent.toElement; +// If it’s a `{focusin,focusout}` event (IE), `fromElement` and `toElement` should both be `null` or `undefined`; +// else, the page visibility hasn’t changed, but the user just clicked somewhere in the doc. +// In IE9, we need to check the `relatedTarget` property instead. + if (!/^focus./.test(type) || (toElement == undefined && originalEvent.fromElement == undefined && originalEvent.relatedTarget == undefined)) { + $event.trigger((property && document[property] || /^(?:blur|focusout)$/.test(type) ? 'hide' : 'show') + '.visibility'); + } + }); + +}(this, document, jQuery)); diff --git a/apps/files/l10n/de.php b/apps/files/l10n/de.php index 1c0af30be5c..089ce1c0a26 100644 --- a/apps/files/l10n/de.php +++ b/apps/files/l10n/de.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Konnte %s nicht verschieben - Datei mit diesem Namen existiert bereits.", +"Could not move %s" => "Konnte %s nicht verschieben", +"Unable to rename file" => "Konnte Datei nicht umbenennen", "No file was uploaded. Unknown error" => "Keine Datei hochgeladen. Unbekannter Fehler", "There is no error, the file uploaded with success" => "Datei fehlerfrei hochgeladen.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Die hochgeladene Datei überschreitet die upload_max_filesize Vorgabe in php.ini", @@ -8,7 +11,7 @@ "Missing a temporary folder" => "Temporärer Ordner fehlt.", "Failed to write to disk" => "Fehler beim Schreiben auf die Festplatte", "Not enough space available" => "Nicht genug Speicherplatz verfügbar", -"Invalid directory." => "Ungültiges Verzeichnis.", +"Invalid directory." => "Ungültiges Verzeichnis", "Files" => "Dateien", "Unshare" => "Nicht mehr freigeben", "Delete" => "Löschen", @@ -22,8 +25,8 @@ "replaced {new_name} with {old_name}" => "{old_name} ersetzt durch {new_name}", "unshared {files}" => "Freigabe von {files} aufgehoben", "deleted {files}" => "{files} gelöscht", -"'.' is an invalid file name." => "'.' ist kein gültiger Dateiname.", -"File name cannot be empty." => "Der Dateiname darf nicht leer sein.", +"'.' is an invalid file name." => "'.' ist kein gültiger Dateiname", +"File name cannot be empty." => "Der Dateiname darf nicht leer sein", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Ungültiger Name, '\\', '/', '<', '>', ':', '\"', '|', '?' und '*' sind nicht zulässig.", "generating ZIP-file, it may take some time." => "Erstelle ZIP-Datei. Dies kann eine Weile dauern.", "Unable to upload your file as it is a directory or has 0 bytes" => "Deine Datei kann nicht hochgeladen werden, da sie entweder ein Verzeichnis oder 0 Bytes groß ist.", @@ -34,7 +37,8 @@ "{count} files uploading" => "{count} Dateien werden hochgeladen", "Upload cancelled." => "Upload abgebrochen.", "File upload is in progress. Leaving the page now will cancel the upload." => "Dateiupload läuft. Wenn Du die Seite jetzt verlässt, wird der Upload abgebrochen.", -"URL cannot be empty." => "Die URL darf nicht leer sein.", +"URL cannot be empty." => "Die URL darf nicht leer sein", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ungültiger Verzeichnisname. Die Nutzung von \"Shared\" ist ownCloud vorbehalten.", "{count} files scanned" => "{count} Dateien wurden gescannt", "error while scanning" => "Fehler beim Scannen", "Name" => "Name", diff --git a/apps/files/l10n/de_DE.php b/apps/files/l10n/de_DE.php index a7526d35646..5cd4ef70425 100644 --- a/apps/files/l10n/de_DE.php +++ b/apps/files/l10n/de_DE.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Konnte %s nicht verschieben - Datei mit diesem Namen existiert bereits", +"Could not move %s" => "Konnte %s nicht verschieben", +"Unable to rename file" => "Konnte Datei nicht umbenennen", "No file was uploaded. Unknown error" => "Keine Datei hochgeladen. Unbekannter Fehler", "There is no error, the file uploaded with success" => "Es sind keine Fehler aufgetreten. Die Datei wurde erfolgreich hochgeladen.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Die hochgeladene Datei überschreitet die upload_max_filesize Vorgabe in php.ini", @@ -35,6 +38,7 @@ "Upload cancelled." => "Upload abgebrochen.", "File upload is in progress. Leaving the page now will cancel the upload." => "Der Dateiupload läuft. Wenn Sie die Seite jetzt verlassen, wird der Upload abgebrochen.", "URL cannot be empty." => "Die URL darf nicht leer sein.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ungültiger Verzeichnisname. Die Nutzung von \"Shared\" ist ownCloud vorbehalten", "{count} files scanned" => "{count} Dateien wurden gescannt", "error while scanning" => "Fehler beim Scannen", "Name" => "Name", diff --git a/apps/files/l10n/es.php b/apps/files/l10n/es.php index 7489d3b555e..885ed3770e9 100644 --- a/apps/files/l10n/es.php +++ b/apps/files/l10n/es.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "No se puede mover %s - Ya existe un archivo con ese nombre", +"Could not move %s" => "No se puede mover %s", +"Unable to rename file" => "No se puede renombrar el archivo", "No file was uploaded. Unknown error" => "Fallo no se subió el fichero", "There is no error, the file uploaded with success" => "No se ha producido ningún error, el archivo se ha subido con éxito", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "El archivo que intentas subir sobrepasa el tamaño definido por la variable upload_max_filesize en php.ini", diff --git a/apps/files/l10n/es_AR.php b/apps/files/l10n/es_AR.php index 6863f701e65..650a3149e4f 100644 --- a/apps/files/l10n/es_AR.php +++ b/apps/files/l10n/es_AR.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "No se pudo mover %s - Un archivo con este nombre ya existe", +"Could not move %s" => "No se pudo mover %s ", +"Unable to rename file" => "No fue posible cambiar el nombre al archivo", "No file was uploaded. Unknown error" => "El archivo no fue subido. Error desconocido", "There is no error, the file uploaded with success" => "No se han producido errores, el archivo se ha subido con éxito", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "El archivo que intentás subir excede el tamaño definido por upload_max_filesize en el php.ini:", @@ -22,6 +25,8 @@ "replaced {new_name} with {old_name}" => "reemplazado {new_name} con {old_name}", "unshared {files}" => "{files} se dejaron de compartir", "deleted {files}" => "{files} borrados", +"'.' is an invalid file name." => "'.' es un nombre de archivo inválido.", +"File name cannot be empty." => "El nombre del archivo no puede quedar vacío.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nombre invalido, '\\', '/', '<', '>', ':', '\"', '|', '?' y '*' no están permitidos.", "generating ZIP-file, it may take some time." => "generando un archivo ZIP, puede llevar un tiempo.", "Unable to upload your file as it is a directory or has 0 bytes" => "No fue posible subir el archivo porque es un directorio o porque su tamaño es 0 bytes", @@ -33,6 +38,7 @@ "Upload cancelled." => "La subida fue cancelada", "File upload is in progress. Leaving the page now will cancel the upload." => "La subida del archivo está en proceso. Si salís de la página ahora, la subida se cancelará.", "URL cannot be empty." => "La URL no puede estar vacía", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nombre de carpeta inválido. El uso de 'Shared' está reservado por ownCloud", "{count} files scanned" => "{count} archivos escaneados", "error while scanning" => "error mientras se escaneaba", "Name" => "Nombre", diff --git a/apps/files/l10n/gl.php b/apps/files/l10n/gl.php index 5bd30e95d17..c15066163cf 100644 --- a/apps/files/l10n/gl.php +++ b/apps/files/l10n/gl.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Non se moveu %s - Xa existe un ficheiro con ese nome.", +"Could not move %s" => "Non se puido mover %s", +"Unable to rename file" => "Non se pode renomear o ficheiro", "No file was uploaded. Unknown error" => "Non se subiu ningún ficheiro. Erro descoñecido.", "There is no error, the file uploaded with success" => "Non hai erros. O ficheiro enviouse correctamente", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "O ficheiro subido excede a directiva indicada polo tamaño_máximo_de_subida de php.ini", @@ -22,6 +25,8 @@ "replaced {new_name} with {old_name}" => "substituír {new_name} polo {old_name}", "unshared {files}" => "{files} sen compartir", "deleted {files}" => "{files} eliminados", +"'.' is an invalid file name." => "'.' é un nonme de ficheiro non válido", +"File name cannot be empty." => "O nome de ficheiro non pode estar baldeiro", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nome non válido, '\\', '/', '<', '>', ':', '\"', '|', '?' e '*' non se permiten.", "generating ZIP-file, it may take some time." => "xerando un ficheiro ZIP, o que pode levar un anaco.", "Unable to upload your file as it is a directory or has 0 bytes" => "Non se puido subir o ficheiro pois ou é un directorio ou ten 0 bytes", @@ -33,6 +38,7 @@ "Upload cancelled." => "Subida cancelada.", "File upload is in progress. Leaving the page now will cancel the upload." => "A subida do ficheiro está en curso. Saír agora da páxina cancelará a subida.", "URL cannot be empty." => "URL non pode quedar baleiro.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Nome de cartafol non válido. O uso de 'Shared' está reservado por Owncloud", "{count} files scanned" => "{count} ficheiros escaneados", "error while scanning" => "erro mentres analizaba", "Name" => "Nome", diff --git a/apps/files/l10n/ko.php b/apps/files/l10n/ko.php index dd7df1c0862..928b7cbb7e4 100644 --- a/apps/files/l10n/ko.php +++ b/apps/files/l10n/ko.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "%s 항목을 이동시키지 못하였음 - 파일 이름이 이미 존재함", +"Could not move %s" => "%s 항목을 이딩시키지 못하였음", +"Unable to rename file" => "파일 이름바꾸기 할 수 없음", "No file was uploaded. Unknown error" => "파일이 업로드되지 않았습니다. 알 수 없는 오류입니다", "There is no error, the file uploaded with success" => "업로드에 성공하였습니다.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "업로드한 파일이 php.ini의 upload_max_filesize보다 큽니다:", @@ -35,6 +38,7 @@ "Upload cancelled." => "업로드가 취소되었습니다.", "File upload is in progress. Leaving the page now will cancel the upload." => "파일 업로드가 진행 중입니다. 이 페이지를 벗어나면 업로드가 취소됩니다.", "URL cannot be empty." => "URL을 입력해야 합니다.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "폴더 이름이 유효하지 않습니다. ", "{count} files scanned" => "파일 {count}개 검색됨", "error while scanning" => "검색 중 오류 발생", "Name" => "이름", diff --git a/apps/files/l10n/nl.php b/apps/files/l10n/nl.php index 77219abcf20..48c4ac74c2b 100644 --- a/apps/files/l10n/nl.php +++ b/apps/files/l10n/nl.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Kon %s niet verplaatsen - Er bestaat al een bestand met deze naam", +"Could not move %s" => "Kon %s niet verplaatsen", +"Unable to rename file" => "Kan bestand niet hernoemen", "No file was uploaded. Unknown error" => "Er was geen bestand geladen. Onbekende fout", "There is no error, the file uploaded with success" => "Geen fout opgetreden, bestand successvol geupload.", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Het geüploade bestand overscheidt de upload_max_filesize optie in php.ini:", @@ -35,6 +38,7 @@ "Upload cancelled." => "Uploaden geannuleerd.", "File upload is in progress. Leaving the page now will cancel the upload." => "Bestandsupload is bezig. Wanneer de pagina nu verlaten wordt, stopt de upload.", "URL cannot be empty." => "URL kan niet leeg zijn.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Ongeldige mapnaam. Gebruik van'Gedeeld' is voorbehouden aan Owncloud", "{count} files scanned" => "{count} bestanden gescanned", "error while scanning" => "Fout tijdens het scannen", "Name" => "Naam", diff --git a/apps/files/l10n/pl.php b/apps/files/l10n/pl.php index b96048cf002..226dae896c2 100644 --- a/apps/files/l10n/pl.php +++ b/apps/files/l10n/pl.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Nie można było przenieść %s - Plik o takiej nazwie już istnieje", +"Could not move %s" => "Nie można było przenieść %s", +"Unable to rename file" => "Nie można zmienić nazwy pliku", "No file was uploaded. Unknown error" => "Plik nie został załadowany. Nieznany błąd", "There is no error, the file uploaded with success" => "Przesłano plik", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Wgrany plik przekracza wartość upload_max_filesize zdefiniowaną w php.ini: ", diff --git a/apps/files/l10n/ro.php b/apps/files/l10n/ro.php index b816311fac7..afa41da5212 100644 --- a/apps/files/l10n/ro.php +++ b/apps/files/l10n/ro.php @@ -1,4 +1,6 @@ <?php $TRANSLATIONS = array( +"Could not move %s" => "Nu s-a putut muta %s", +"Unable to rename file" => "Nu s-a putut redenumi fișierul", "No file was uploaded. Unknown error" => "Nici un fișier nu a fost încărcat. Eroare necunoscută", "There is no error, the file uploaded with success" => "Nicio eroare, fișierul a fost încărcat cu succes", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Fisierul incarcat depaseste upload_max_filesize permisi in php.ini: ", @@ -7,6 +9,8 @@ "No file was uploaded" => "Niciun fișier încărcat", "Missing a temporary folder" => "Lipsește un dosar temporar", "Failed to write to disk" => "Eroare la scriere pe disc", +"Not enough space available" => "Nu este suficient spațiu disponibil", +"Invalid directory." => "Director invalid.", "Files" => "Fișiere", "Unshare" => "Anulează partajarea", "Delete" => "Șterge", @@ -20,6 +24,8 @@ "replaced {new_name} with {old_name}" => "{new_name} inlocuit cu {old_name}", "unshared {files}" => "nedistribuit {files}", "deleted {files}" => "Sterse {files}", +"'.' is an invalid file name." => "'.' este un nume invalid de fișier.", +"File name cannot be empty." => "Numele fișierului nu poate rămâne gol.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Nume invalid, '\\', '/', '<', '>', ':', '\"', '|', '?' si '*' nu sunt permise.", "generating ZIP-file, it may take some time." => "se generază fișierul ZIP, va dura ceva timp.", "Unable to upload your file as it is a directory or has 0 bytes" => "Nu s-a putut încărca fișierul tău deoarece pare să fie un director sau are 0 bytes.", @@ -31,6 +37,7 @@ "Upload cancelled." => "Încărcare anulată.", "File upload is in progress. Leaving the page now will cancel the upload." => "Fișierul este în curs de încărcare. Părăsirea paginii va întrerupe încărcarea.", "URL cannot be empty." => "Adresa URL nu poate fi goală.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Invalid folder name. Usage of 'Shared' is reserved by Ownclou", "{count} files scanned" => "{count} fisiere scanate", "error while scanning" => "eroare la scanarea", "Name" => "Nume", diff --git a/apps/files/l10n/ru.php b/apps/files/l10n/ru.php index bbbeebc93d0..49ead61f67e 100644 --- a/apps/files/l10n/ru.php +++ b/apps/files/l10n/ru.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "Невозможно переместить %s - файл с таким именем уже существует", +"Could not move %s" => "Невозможно переместить %s", +"Unable to rename file" => "Невозможно переименовать файл", "No file was uploaded. Unknown error" => "Файл не был загружен. Неизвестная ошибка", "There is no error, the file uploaded with success" => "Файл успешно загружен", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "Файл превышает размер установленный upload_max_filesize в php.ini:", @@ -7,6 +10,8 @@ "No file was uploaded" => "Файл не был загружен", "Missing a temporary folder" => "Невозможно найти временную папку", "Failed to write to disk" => "Ошибка записи на диск", +"Not enough space available" => "Недостаточно свободного места", +"Invalid directory." => "Неправильный каталог.", "Files" => "Файлы", "Unshare" => "Отменить публикацию", "Delete" => "Удалить", @@ -20,6 +25,8 @@ "replaced {new_name} with {old_name}" => "заменено {new_name} на {old_name}", "unshared {files}" => "не опубликованные {files}", "deleted {files}" => "удаленные {files}", +"'.' is an invalid file name." => "'.' - неправильное имя файла.", +"File name cannot be empty." => "Имя файла не может быть пустым.", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "Неправильное имя, '\\', '/', '<', '>', ':', '\"', '|', '?' и '*' недопустимы.", "generating ZIP-file, it may take some time." => "создание ZIP-файла, это может занять некоторое время.", "Unable to upload your file as it is a directory or has 0 bytes" => "Не удается загрузить файл размером 0 байт в каталог", @@ -31,6 +38,7 @@ "Upload cancelled." => "Загрузка отменена.", "File upload is in progress. Leaving the page now will cancel the upload." => "Файл в процессе загрузки. Покинув страницу вы прервёте загрузку.", "URL cannot be empty." => "Ссылка не может быть пустой.", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "Неправильное имя каталога. Имя 'Shared' зарезервировано.", "{count} files scanned" => "{count} файлов просканировано", "error while scanning" => "ошибка во время санирования", "Name" => "Название", diff --git a/apps/files/l10n/zh_CN.php b/apps/files/l10n/zh_CN.php index 0b26a4b174f..124bb2c3b6c 100644 --- a/apps/files/l10n/zh_CN.php +++ b/apps/files/l10n/zh_CN.php @@ -1,4 +1,7 @@ <?php $TRANSLATIONS = array( +"Could not move %s - File with this name already exists" => "无法移动 %s - 同名文件已存在", +"Could not move %s" => "无法移动 %s", +"Unable to rename file" => "无法重命名文件", "No file was uploaded. Unknown error" => "没有文件被上传。未知错误", "There is no error, the file uploaded with success" => "没有发生错误,文件上传成功。", "The uploaded file exceeds the upload_max_filesize directive in php.ini: " => "上传文件大小已超过php.ini中upload_max_filesize所规定的值", @@ -7,6 +10,8 @@ "No file was uploaded" => "文件没有上传", "Missing a temporary folder" => "缺少临时目录", "Failed to write to disk" => "写入磁盘失败", +"Not enough space available" => "没有足够可用空间", +"Invalid directory." => "无效文件夹。", "Files" => "文件", "Unshare" => "取消分享", "Delete" => "删除", @@ -20,6 +25,8 @@ "replaced {new_name} with {old_name}" => "已将 {old_name}替换成 {new_name}", "unshared {files}" => "取消了共享 {files}", "deleted {files}" => "删除了 {files}", +"'.' is an invalid file name." => "'.' 是一个无效的文件名。", +"File name cannot be empty." => "文件名不能为空。", "Invalid name, '\\', '/', '<', '>', ':', '\"', '|', '?' and '*' are not allowed." => "无效名称,'\\', '/', '<', '>', ':', '\"', '|', '?' 和 '*' 不被允许使用。", "generating ZIP-file, it may take some time." => "正在生成 ZIP 文件,可能需要一些时间", "Unable to upload your file as it is a directory or has 0 bytes" => "无法上传文件,因为它是一个目录或者大小为 0 字节", @@ -31,6 +38,7 @@ "Upload cancelled." => "上传已取消", "File upload is in progress. Leaving the page now will cancel the upload." => "文件正在上传中。现在离开此页会导致上传动作被取消。", "URL cannot be empty." => "URL不能为空", +"Invalid folder name. Usage of 'Shared' is reserved by Owncloud" => "无效文件夹名。'共享' 是 Owncloud 预留的文件夹名。", "{count} files scanned" => "{count} 个文件已扫描。", "error while scanning" => "扫描时出错", "Name" => "名称", diff --git a/apps/files/templates/part.breadcrumb.php b/apps/files/templates/part.breadcrumb.php index a298f1ccc4b..7df2afc1f52 100644 --- a/apps/files/templates/part.breadcrumb.php +++ b/apps/files/templates/part.breadcrumb.php @@ -1,10 +1,10 @@ - <?php for($i=0; $i<count($_["breadcrumb"]); $i++): - $crumb = $_["breadcrumb"][$i]; - $dir = str_replace('+', '%20', urlencode($crumb["dir"])); - $dir = str_replace('%2F', '/', $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;
\ No newline at end of file +<?php for($i=0; $i<count($_["breadcrumb"]); $i++): + $crumb = $_["breadcrumb"][$i]; + $dir = str_replace('+', '%20', urlencode($crumb["dir"])); + $dir = str_replace('%2F', '/', $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;
\ No newline at end of file diff --git a/apps/files/templates/part.list.php b/apps/files/templates/part.list.php index 4c765adb7af..dfac43d1b12 100644 --- a/apps/files/templates/part.list.php +++ b/apps/files/templates/part.list.php @@ -1,70 +1,70 @@ - <script type="text/javascript"> - <?php if ( array_key_exists('publicListView', $_) && $_['publicListView'] == true ) :?> - var publicListView = true; +<script type="text/javascript"> +<?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']); + // 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']); + // 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" + <?php if($file['type'] == 'dir'): ?> + style="background-image:url(<?php echo OCP\mimetype_icon('dir'); ?>)" <?php else: ?> - var publicListView = false; + style="background-image:url(<?php echo OCP\mimetype_icon($file['mimetype']); ?>)" <?php endif; ?> - </script> - - <?php foreach($_['files'] as $file): - $simple_file_size = OCP\simple_file_size($file['size']); - // 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']); - // 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" - <?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 endif;?> - </span> - <?php if($file['type'] == 'dir'):?> - <span class="uploadtext" currentUploads="0"> - </span> - <?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> - </tr> - <?php endforeach;
\ No newline at end of file + > + <?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 endif;?> + </span> + <?php if($file['type'] == 'dir'):?> + <span class="uploadtext" currentUploads="0"> + </span> + <?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> + </tr> +<?php endforeach;
\ No newline at end of file |