diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2024-01-25 10:16:29 +0100 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2024-01-25 10:24:48 +0100 |
commit | 92d5fbb15177f5c858914913d6b336362ac91777 (patch) | |
tree | d5968fa11bd045e28db9c0d587f3cadc09ab1d54 /apps | |
parent | f108ed98e36965a4f1722e6bad87814ef47c7483 (diff) | |
download | nextcloud-server-92d5fbb15177f5c858914913d6b336362ac91777.tar.gz nextcloud-server-92d5fbb15177f5c858914913d6b336362ac91777.zip |
chore(files): cleanup old templates
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/list.php | 45 | ||||
-rw-r--r-- | apps/files/simplelist.php | 35 | ||||
-rw-r--r-- | apps/files/templates/appnavigation.php | 93 | ||||
-rw-r--r-- | apps/files/templates/fileexists.html | 31 | ||||
-rw-r--r-- | apps/files/templates/simplelist.php | 39 | ||||
-rw-r--r-- | apps/files_sharing/list.php | 40 | ||||
-rw-r--r-- | apps/files_sharing/public.php | 43 | ||||
-rw-r--r-- | apps/files_sharing/templates/list.php | 30 | ||||
-rw-r--r-- | apps/files_sharing/templates/part.404.php | 12 | ||||
-rw-r--r-- | apps/files_trashbin/list.php | 38 | ||||
-rw-r--r-- | apps/files_trashbin/templates/index.php | 47 | ||||
-rw-r--r-- | apps/systemtags/list.php | 25 | ||||
-rw-r--r-- | apps/systemtags/templates/list.php | 37 |
13 files changed, 0 insertions, 515 deletions
diff --git a/apps/files/list.php b/apps/files/list.php deleted file mode 100644 index 5f1bc07f499..00000000000 --- a/apps/files/list.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ <skjnldsv@protonmail.com> - * @author Robin Appelman <robin@icewind.nl> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ -use OCP\IConfig; -use OCP\IUserSession; -use OCP\Server; -use OCP\Share\IManager; - -$config = Server::get(IConfig::class); -$userSession = Server::get(IUserSession::class); -// TODO: move this to the generated config.js -/** @var IManager $shareManager */ -$shareManager = Server::get(IManager::class); -$publicUploadEnabled = $shareManager->shareApiLinkAllowPublicUpload() ? 'yes' : 'no'; - -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); - -// renders the controls and table headers template -$tmpl = new OCP\Template('files', 'list', ''); - -// gridview not available for ie -$tmpl->assign('showgridview', $showgridview); -$tmpl->assign('publicUploadEnabled', $publicUploadEnabled); -$tmpl->printPage(); diff --git a/apps/files/simplelist.php b/apps/files/simplelist.php deleted file mode 100644 index b20bdcc9c63..00000000000 --- a/apps/files/simplelist.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ <skjnldsv@protonmail.com> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ -// TODO: move to handlebars -$config = \OC::$server->getConfig(); -$userSession = \OC::$server->getUserSession(); - -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); - -// renders the controls and table headers template -$tmpl = new OCP\Template('files', 'simplelist', ''); - -// gridview not available for ie -$tmpl->assign('showgridview', $showgridview); -$tmpl->printPage(); diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php deleted file mode 100644 index d2b57b03eca..00000000000 --- a/apps/files/templates/appnavigation.php +++ /dev/null @@ -1,93 +0,0 @@ -<div id="app-navigation-files" role="navigation"></div> -<div class="hidden"> - <ul class="with-icon" tabindex="0"> - <?php - $pinned = 0; - foreach ($_['navigationItems'] as $item) { - $pinned = NavigationListElements($item, $l, $pinned); - } - ?> - </ul> -</div> - - -<?php - -/** - * Prints the HTML for a single Entry. - * - * @param $item The item to be added - * @param $l Translator - * @param $pinned IntegerValue to count the pinned entries at the bottom - * - * @return int Returns the pinned value - */ -function NavigationListElements($item, $l, $pinned) { - strpos($item['classes'] ?? '', 'pinned') !== false ? $pinned++ : ''; ?> - <li - data-id="<?php p($item['id']) ?>" - <?php if (isset($item['dir'])) { ?> data-dir="<?php p($item['dir']); ?>" <?php } ?> - <?php if (isset($item['view'])) { ?> data-view="<?php p($item['view']); ?>" <?php } ?> - <?php if (isset($item['expandedState'])) { ?> data-expandedstate="<?php p($item['expandedState']); ?>" <?php } ?> - class="nav-<?php p($item['id']) ?> - <?php if (isset($item['classes'])) { - p($item['classes']); - } ?> - <?php p($pinned === 1 ? 'first-pinned' : '') ?> - <?php if (isset($item['defaultExpandedState']) && $item['defaultExpandedState']) { ?> open<?php } ?>" - <?php if (isset($item['folderPosition'])) { ?> folderposition="<?php p($item['folderPosition']); ?>" <?php } ?>> - - <a href="<?php p($item['href'] ?? '#') ?>" - class="nav-icon-<?php p(isset($item['icon']) && $item['icon'] !== '' ? $item['icon'] : $item['id']) ?> svg"><?php p($item['name']); ?></a> - - - <?php - NavigationElementMenu($item); - if (isset($item['sublist'])) { - ?> - <button class="collapse app-navigation-noclose" aria-expanded="<?= !empty($item['defaultExpandedState']) ? 'true' : 'false' ?>" - aria-label="<?php p($l->t('Toggle %1$s sublist', $item['name'])) ?>" - <?php if (sizeof($item['sublist']) == 0) { ?> style="display: none" <?php } ?>> - </button> - <ul id="sublist-<?php p($item['id']); ?>"> - <?php - foreach ($item['sublist'] as $item) { - $pinned = NavigationListElements($item, $l, $pinned); - } ?> - </ul> - <?php - } ?> - </li> - - - <?php - return $pinned; -} - -/** - * Prints the HTML for a dotmenu. - * - * @param $item The item to be added - * - * @return void - */ -function NavigationElementMenu($item) { - if (isset($item['menubuttons']) && $item['menubuttons'] === 'true') { - ?> - <div id="dotmenu-<?php p($item['id']); ?>" - class="app-navigation-entry-utils" <?php if (isset($item['enableMenuButton']) && $item['enableMenuButton'] === 0) { ?> style="display: none"<?php } ?>> - <ul> - <li class="app-navigation-entry-utils-menu-button svg"> - <button id="dotmenu-button-<?php p($item['id']) ?>"></button> - </li> - </ul> - </div> - <div id="dotmenu-content-<?php p($item['id']) ?>" - class="app-navigation-entry-menu"> - <ul> - - </ul> - </div> - <?php - } -} diff --git a/apps/files/templates/fileexists.html b/apps/files/templates/fileexists.html deleted file mode 100644 index e3513237d2b..00000000000 --- a/apps/files/templates/fileexists.html +++ /dev/null @@ -1,31 +0,0 @@ -<div id="{dialog_name}" title="{title}" class="fileexists"> - <span class="why">{why}<!-- Which files do you want to keep --></span><br/> - <span class="what">{what}<!-- If you select both versions, the copied file will have a number added to its name. --></span><br/> - <br/> - <table> - <th><input id="checkbox-allnewfiles" class="allnewfiles checkbox" type="checkbox" /><label for="checkbox-allnewfiles">{allnewfiles}<span class="count"></span></label></th> - <th><input id="checkbox-allexistingfiles" class="allexistingfiles checkbox" type="checkbox" /><label for="checkbox-allexistingfiles">{allexistingfiles}<span class="count"></span></label></th> - </table> - <div class="conflicts"> - <div class="template"> - <div class="filename"></div> - <div class="replacement"> - <input type="checkbox" class="checkbox u-left"/> - <label> - <span class="svg icon"></span> - <div class="mtime"></div> - <div class="size"></div> - </label> - </div> - <div class="original"> - <input type="checkbox" class="checkbox u-left" /> - <label> - <span class="svg icon"></span> - <div class="mtime"></div> - <div class="size"></div> - <div class="message"></div> - </label> - </div> - </div> - </div> -</div> diff --git a/apps/files/templates/simplelist.php b/apps/files/templates/simplelist.php deleted file mode 100644 index fc0a9fb38c9..00000000000 --- a/apps/files/templates/simplelist.php +++ /dev/null @@ -1,39 +0,0 @@ -<div class="emptyfilelist emptycontent hidden"> - <div class="icon-starred"></div> - <h2><?php p($l->t('No favorites yet')); ?></h2> - <p><?php p($l->t('Files and folders you mark as favorite will show up here')); ?></p> -</div> - -<div class="nofilterresults emptycontent hidden"> - <div class="icon-search"></div> - <h2><?php p($l->t('No entries found in this folder')); ?></h2> - <p></p> -</div> -<table class="files-filestable list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>"> - <thead> - <tr> - <th class="hidden column-name"> - <div class="column-name-container"> - <a class="name sort columntitle" onclick="event.preventDefault()" href="#" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> - </div> - </th> - <th class="hidden column-size"> - <a class="size sort columntitle" onclick="event.preventDefault()" href="#" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a> - </th> - <th class="hidden column-mtime"> - <a class="columntitle" onclick="event.preventDefault()" href="#" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a> - <span class="selectedActions"> - <a onclick="event.preventDefault()" href="#" class="delete-selected"> - <img class="svg" alt="" - src="<?php print_unescaped(OCP\Template::image_path("core", "actions/delete.svg")); ?>" /> - <?php p($l->t('Delete'))?> - </a> - </span> - </th> - </tr> - </thead> - <tbody class="files-fileList"> - </tbody> - <tfoot> - </tfoot> -</table> diff --git a/apps/files_sharing/list.php b/apps/files_sharing/list.php deleted file mode 100644 index f43aed21427..00000000000 --- a/apps/files_sharing/list.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ <skjnldsv@protonmail.com> - * @author Morris Jobke <hey@morrisjobke.de> - * @author Robin Appelman <robin@icewind.nl> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ -use OCP\IConfig; -use OCP\IUserSession; -use OCP\Server; - -$config = Server::get(IConfig::class); -$userSession = Server::get(IUserSession::class); - -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); - -$tmpl = new OCP\Template('files_sharing', 'list', ''); - -// gridview not available for ie -$tmpl->assign('showgridview', $showgridview); - -$tmpl->printPage(); diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php deleted file mode 100644 index 0213247b604..00000000000 --- a/apps/files_sharing/public.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ <skjnldsv@protonmail.com> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Morris Jobke <hey@morrisjobke.de> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ -// This file is just used to redirect the legacy sharing URLs (< ownCloud 8) to the new ones - -$urlGenerator = \OC::$server->getURLGenerator(); -$token = $_GET['t'] ?? ''; -$route = isset($_GET['download']) ? 'files_sharing.sharecontroller.downloadShare' : 'files_sharing.sharecontroller.showShare'; - -if ($token !== '') { - $protocol = \OC::$server->getRequest()->getHttpProtocol(); - if ($protocol == 'HTTP/1.0') { - http_response_code(302); - } else { - http_response_code(307); - } - header('Location: ' . $urlGenerator->linkToRoute($route, ['token' => $token])); -} else { - http_response_code(404); - $tmpl = new OCP\Template('', '404', 'guest'); - print_unescaped($tmpl->fetchPage()); -} diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php deleted file mode 100644 index 066736013b9..00000000000 --- a/apps/files_sharing/templates/list.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php /** @var \OCP\IL10N $l */ ?> - -<div class="emptyfilelist emptycontent hidden"></div> - -<div class="nofilterresults emptycontent hidden"> - <div class="icon-search"></div> - <h2><?php p($l->t('No entries found in this folder')); ?></h2> -</div> - -<table class="files-filestable list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>"> - <thead> - <tr> - <th class="hidden column-name"> - <div class="column-name-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> - </div> - </th> - <th class="hidden column-mtime"> - <a class="columntitle" data-sort="mtime"><span><?php p($l->t('Share time')); ?></span><span class="sort-indicator"></span></a> - </th> - <th class="hidden column-expiration"> - <a class="columntitle"><span><?php p($l->t('Expiration date')); ?></span></a> - </th> - </tr> - </thead> - <tbody class="files-fileList"> - </tbody> - <tfoot> - </tfoot> -</table> diff --git a/apps/files_sharing/templates/part.404.php b/apps/files_sharing/templates/part.404.php deleted file mode 100644 index 2aa55383847..00000000000 --- a/apps/files_sharing/templates/part.404.php +++ /dev/null @@ -1,12 +0,0 @@ -<ul> - <li class="error error-broken-link"> - <p><?php p($l->t('Sorry, this link does not seem to work anymore.')) ?></p> - <p><?php p($l->t('Reasons might be:')); ?></p> - <ul> - <li><?php p($l->t('the item was removed')); ?></li> - <li><?php p($l->t('the link expired')); ?></li> - <li><?php p($l->t('sharing is disabled')); ?></li> - </ul> - <p><?php p($l->t('For more info, please ask the person who sent this link.')); ?></p> - </li> -</ul> diff --git a/apps/files_trashbin/list.php b/apps/files_trashbin/list.php deleted file mode 100644 index 117d3b4ddfe..00000000000 --- a/apps/files_trashbin/list.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Bart Visscher <bartv@thisnet.nl> - * @author Björn Schießle <bjoern@schiessle.org> - * @author Christoph Wurst <christoph@winzerhof-wurst.at> - * @author John Molakvoæ <skjnldsv@protonmail.com> - * @author Roeland Jago Douma <roeland@famdouma.nl> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -$config = \OC::$server->getConfig(); -$userSession = \OC::$server->getUserSession(); - -$showgridview = $config->getUserValue($userSession->getUser()->getUID(), 'files', 'show_grid', false); - -$tmpl = new OCP\Template('files_trashbin', 'index', ''); - -// gridview not available for ie -$tmpl->assign('showgridview', $showgridview); -OCP\Util::addScript('files_trashbin', 'files_trashbin'); -$tmpl->printPage(); diff --git a/apps/files_trashbin/templates/index.php b/apps/files_trashbin/templates/index.php deleted file mode 100644 index 5fe2fab4333..00000000000 --- a/apps/files_trashbin/templates/index.php +++ /dev/null @@ -1,47 +0,0 @@ -<?php /** @var \OCP\IL10N $l */ ?> -<div class="files-controls"> - <div></div> -</div> - -<div class="emptyfilelist emptycontent hidden"> - <div class="icon-delete"></div> - <h2><?php p($l->t('No deleted files')); ?></h2> - <p><?php p($l->t('You will be able to recover deleted files from here')); ?></p> -</div> - -<div class="nofilterresults emptycontent hidden"> - <div class="icon-search"></div> - <h2><?php p($l->t('No entries found in this folder')); ?></h2> - <p></p> -</div> - -<table class="files-filestable list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>"> - <thead> - <tr> - <th class="hidden column-selection"> - <input type="checkbox" id="select_all_trash" class="select-all checkbox"/> - <label for="select_all_trash"> - <span class="hidden-visually"><?php p($l->t('Select all'))?></span> - </label> - </th> - <th class="hidden column-name"> - <div class="column-name-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> - <span class='selectedActions'> - <a href="#" class="actions-selected"> - <span class="icon icon-more"></span> - <span><?php p($l->t('Actions'))?></span> - </a> - </span> - </div> - </th> - <th class="hidden column-mtime"> - <a class="columntitle" data-sort="mtime"><span><?php p($l->t('Deleted')); ?></span><span class="sort-indicator"></span></a> - </th> - </tr> - </thead> - <tbody class="files-fileList"> - </tbody> - <tfoot> - </tfoot> -</table> diff --git a/apps/systemtags/list.php b/apps/systemtags/list.php deleted file mode 100644 index b5bbf223f29..00000000000 --- a/apps/systemtags/list.php +++ /dev/null @@ -1,25 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Morris Jobke <hey@morrisjobke.de> - * @author Vincent Petry <vincent@nextcloud.com> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program 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, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ - -$tmpl = new OCP\Template('systemtags', 'list', ''); -$tmpl->printPage(); diff --git a/apps/systemtags/templates/list.php b/apps/systemtags/templates/list.php deleted file mode 100644 index 6e4ef04ee8b..00000000000 --- a/apps/systemtags/templates/list.php +++ /dev/null @@ -1,37 +0,0 @@ -<div class="files-controls"> -</div> - -<div class="emptyfilelist emptycontent hidden"> - <div class="icon-folder"></div> - <h2><?php p($l->t('No files in here')); ?></h2> - <p class="uploadmessage hidden"></p> -</div> - -<div class="nofilterresults emptycontent hidden"> - <div class="icon-search"></div> - <h2><?php p($l->t('No entries found in this folder')); ?></h2> - <p></p> -</div> - -<table data-preview-x="250" data-preview-y="250" class="files-filestable list-container"> - <thead> - <tr> - <th class="hidden column-name"> - <div class="column-name-container"> - <a class="name sort columntitle" data-sort="name"><span><?php p($l->t('Name')); ?></span><span class="sort-indicator"></span></a> - </div> - </th> - <th class="hidden column-size"> - <a class="size sort columntitle" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a> - </th> - <th class="hidden column-mtime"> - <a class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a> - </th> - </tr> - </thead> - <tbody class="files-fileList"> - </tbody> - <tfoot> - </tfoot> -</table> - |