chore(files): cleanup old templates

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
pull/43104/head
John Molakvoæ 10 months ago
parent f108ed98e3
commit 92d5fbb151
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
  1. 45
      apps/files/list.php
  2. 35
      apps/files/simplelist.php
  3. 93
      apps/files/templates/appnavigation.php
  4. 31
      apps/files/templates/fileexists.html
  5. 39
      apps/files/templates/simplelist.php
  6. 40
      apps/files_sharing/list.php
  7. 43
      apps/files_sharing/public.php
  8. 30
      apps/files_sharing/templates/list.php
  9. 12
      apps/files_sharing/templates/part.404.php
  10. 38
      apps/files_trashbin/list.php
  11. 47
      apps/files_trashbin/templates/index.php
  12. 25
      apps/systemtags/list.php
  13. 37
      apps/systemtags/templates/list.php

@ -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();

@ -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();

@ -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
}
}

@ -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>

@ -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>

@ -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();

@ -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());
}

@ -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>

@ -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>

@ -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();

@ -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>

@ -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();

@ -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>
Loading…
Cancel
Save