nextcloud/apps/files/list.php
Vincent Petry 9d38e3602b Namespacing for FileList, FileActions and trashbin app
- FileList is now an instantiable class
- FileActions is now in namespace
- added App class for trashbin app
- moved trashbin overrides into classes extending FileList
- replaced many static calls with "this." or "self." to make the classes
  reusable/extendable
- new URL parameter "view" to specify which view is shown, for example
  "files" or "trashbin"
- added OC.Util.History utility class in core for handling history
- moved URL handling/routing to OCA.Files.App
- popstate will correctly update the current view and notify the view of
  the URL change so it can update the current dir
- added JS unitt tests for the trashbin app
- fixed public app to work with the new namespaces
2014-05-15 17:51:04 +02:00

50 lines
1.8 KiB
PHP

<?php
/**
* ownCloud - Files list
*
* @author Vincent Petry
* @copyright 2014 Vincent Petry <pvince81@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
// Check if we are a user
OCP\User::checkLoggedIn();
// dummy, will be refreshed with an ajax call
$dir = '/';
// information about storage capacities
// FIXME: storage info
/*
$storageInfo=OC_Helper::getStorageInfo($dir, $dirInfo);
$publicUploadEnabled = $config->getAppValue('core', 'shareapi_allow_public_upload', 'yes');
$uploadLimit=OCP\Util::uploadLimit();
$maxUploadFilesize=OCP\Util::maxUploadFilesize($dir, $freeSpace);
$freeSpace=$storageInfo['free'];
*/
$tmpl = new OCP\Template('files', 'list', '');
$tmpl->assign('usedSpacePercent', (int)$storageInfo['relative']);
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); // minimium of freeSpace and uploadLimit
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
$tmpl->assign('uploadLimit', $uploadLimit); // PHP upload limit
$tmpl->assign('freeSpace', $freeSpace);
$tmpl->assign('publicUploadEnabled', $publicUploadEnabled);
$tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
$tmpl->printPage();