aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/templates
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/templates')
-rw-r--r--apps/files/templates/appnavigation.php138
-rw-r--r--apps/files/templates/fileexists.html31
-rw-r--r--apps/files/templates/index.php41
-rw-r--r--apps/files/templates/list.php48
-rw-r--r--apps/files/templates/recentlist.php44
-rw-r--r--apps/files/templates/settings-personal.php24
-rw-r--r--apps/files/templates/simplelist.php43
7 files changed, 35 insertions, 334 deletions
diff --git a/apps/files/templates/appnavigation.php b/apps/files/templates/appnavigation.php
deleted file mode 100644
index 8e654567946..00000000000
--- a/apps/files/templates/appnavigation.php
+++ /dev/null
@@ -1,138 +0,0 @@
-<?php
-script(\OCA\Files\AppInfo\Application::APP_ID, 'dist/files-app-settings');
-?>
-<div id="app-navigation">
- <ul class="with-icon">
-
- <?php
-
- $pinned = 0;
- foreach ($_['navigationItems'] as $item) {
- $pinned = NavigationListElements($item, $l, $pinned);
- }
- ?>
-
- <?php if ($_['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED): ?>
- <li id="quota" class="pinned <?php p($pinned === 0 ? 'first-pinned ' : '') ?>">
- <a href="#" class="icon-quota svg">
- <p><?php p($l->t('%s used', [$_['usage']])); ?></p>
- </a>
- </li>
- <?php else: ?>
- <li id="quota" class="has-tooltip pinned <?php p($pinned === 0 ? 'first-pinned ' : '') ?>"
- title="<?php p($l->t('%s%% of %s used', [$_['usage_relative'], $_['total_space']])); ?>">
- <a href="#" class="icon-quota svg">
- <p id="quotatext"><?php p($l->t('%1$s of %2$s used', [$_['usage'], $_['total_space']])); ?></p>
- <div class="quota-container">
- <progress value="<?php p($_['usage_relative']); ?>" max="100" class="<?= ($_['usage_relative'] > 80) ? 'warn' : '' ?>"></progress>
- </div>
- </a>
- </li>
- <?php endif; ?>
- </ul>
- <div id="app-settings">
- <div id="app-settings-header">
- <button class="settings-button"
- data-apps-slide-toggle="#app-settings-content">
- <?php p($l->t('Settings')); ?>
- </button>
- </div>
- <div id="app-settings-content">
- <div id="files-app-settings"></div>
- <div id="files-setting-showhidden">
- <input class="checkbox" id="showhiddenfilesToggle"
- checked="checked" type="checkbox">
- <label for="showhiddenfilesToggle"><?php p($l->t('Show hidden files')); ?></label>
- </div>
- <div id="files-setting-cropimagepreviews">
- <input class="checkbox" id="cropimagepreviewsToggle"
- checked="checked" type="checkbox">
- <label for="cropimagepreviewsToggle"><?php p($l->t('Crop image previews')); ?></label>
- </div>
- <label for="webdavurl"><?php p($l->t('WebDAV')); ?></label>
- <input id="webdavurl" type="text" readonly="readonly"
- value="<?php p($_['webdav_url']); ?>"/>
- <em><a href="<?php echo link_to_docs('user-webdav') ?>" target="_blank" rel="noreferrer noopener"><?php p($l->t('Use this address to access your Files via WebDAV')) ?> ↗</a></em>
- </div>
- </div>
-
-</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(isset($item['href']) ? $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" <?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/index.php b/apps/files/templates/index.php
index 8b6e2b0b91b..5281220282a 100644
--- a/apps/files/templates/index.php
+++ b/apps/files/templates/index.php
@@ -1,36 +1,7 @@
-<?php /** @var \OCP\IL10N $l */ ?>
-<?php $_['appNavigation']->printPage(); ?>
-<div id="app-content">
+<?php
- <?php if (!$_['isIE']) { ?>
- <input type="checkbox" class="hidden-visually" id="showgridview"
- <?php if ($_['showgridview']) { ?>checked="checked" <?php } ?>/>
- <label id="view-toggle" for="showgridview" class="button <?php p($_['showgridview'] ? 'icon-toggle-filelist' : 'icon-toggle-pictures') ?>"
- title="<?php p($l->t('Toggle grid view'))?>"></label>
- <?php } ?>
-
- <?php foreach ($_['appContents'] as $content) { ?>
- <div id="app-content-<?php p($content['id']) ?>" class="hidden viewcontainer">
- <?php print_unescaped($content['content']) ?>
- </div>
- <?php } ?>
- <div id="searchresults" class="hidden"></div>
-</div><!-- closing app-content -->
-
-<!-- config hints for javascript -->
-<input type="hidden" name="filesApp" id="filesApp" value="1" />
-<input type="hidden" name="usedSpacePercent" id="usedSpacePercent" value="<?php p($_['usedSpacePercent']); ?>" />
-<input type="hidden" name="owner" id="owner" value="<?php p($_['owner']); ?>" />
-<input type="hidden" name="ownerDisplayName" id="ownerDisplayName" value="<?php p($_['ownerDisplayName']); ?>" />
-<input type="hidden" name="fileNotFound" id="fileNotFound" value="<?php p($_['fileNotFound']); ?>" />
-<?php if (!$_['isPublic']) :?>
-<input type="hidden" name="allowShareWithLink" id="allowShareWithLink" value="<?php p($_['allowShareWithLink']) ?>" />
-<input type="hidden" name="defaultFileSorting" id="defaultFileSorting" value="<?php p($_['defaultFileSorting']) ?>" />
-<input type="hidden" name="defaultFileSortingDirection" id="defaultFileSortingDirection" value="<?php p($_['defaultFileSortingDirection']) ?>" />
-<input type="hidden" name="showHiddenFiles" id="showHiddenFiles" value="<?php p($_['showHiddenFiles']); ?>" />
-<input type="hidden" name="cropImagePreviews" id="cropImagePreviews" value="<?php p($_['cropImagePreviews']); ?>" />
-<?php endif;
-
-foreach ($_['hiddenFields'] as $name => $value) {?>
-<input type="hidden" name="<?php p($name) ?>" id="<?php p($name) ?>" value="<?php p($value) ?>" />
-<?php }
+/**
+ * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+// Empty template
diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php
index ff79c771c0a..85e3b24043f 100644
--- a/apps/files/templates/list.php
+++ b/apps/files/templates/list.php
@@ -1,16 +1,24 @@
-<div id="controls">
+<?php
+
+/**
+ * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-FileCopyrightText: 2014-2016 ownCloud, Inc.
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+?>
+<div class="files-controls">
<div class="actions creatable hidden">
<div id="uploadprogresswrapper">
</div>
</div>
- <div id="file_action_panel"></div>
<div class="notCreatable notPublic hidden">
- <?php p($l->t('You don’t have permission to upload or create files here'))?>
+ <div class="icon-alert-outline"></div>
+ <?php p($l->t('You do not have permission to upload or create files here.'))?>
</div>
<?php /* Note: the template attributes are here only for the public page. These are normally loaded
through ajax instead (updateStorageStatistics).
*/ ?>
- <input type="hidden" name="permissions" value="" id="permissions">
+ <input type="hidden" id="permissions" value="">
<input type="hidden" id="free_space" value="<?php isset($_['freeSpace']) ? p($_['freeSpace']) : '' ?>">
<?php if (isset($_['dirToken'])):?>
<input type="hidden" id="publicUploadRequestToken" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
@@ -19,9 +27,9 @@
<input type="hidden" class="max_human_file_size"
value="(max <?php isset($_['uploadMaxHumanFilesize']) ? p($_['uploadMaxHumanFilesize']) : ''; ?>)">
</div>
-<div id="filelist-header"></div>
+<div class="filelist-header"></div>
-<div id="emptycontent" class="hidden">
+<div class="emptyfilelist emptycontent hidden">
<div class="icon-folder"></div>
<h2><?php p($l->t('No files in here')); ?></h2>
<p class="uploadmessage hidden"><?php p($l->t('Upload some content or sync with your devices!')); ?></p>
@@ -32,49 +40,47 @@
<h2><?php p($l->t('No entries found in this folder')); ?></h2>
<p></p>
</div>
-<table id="filestable" class="list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="250" data-preview-y="250">
+<table class="files-filestable list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>" data-allow-public-upload="<?php p($_['publicUploadEnabled'])?>" data-preview-x="250" data-preview-y="250">
<thead>
<tr>
- <th id="headerSelection" class="hidden column-selection">
+ <th class="hidden column-selection">
<input type="checkbox" id="select_all_files" class="select-all checkbox"/>
<label for="select_all_files">
<span class="hidden-visually"><?php p($l->t('Select all'))?></span>
</label>
</th>
- <th id='headerName' class="hidden column-name">
- <div id="headerName-container">
- <a class="name sort columntitle" data-sort="name">
+ <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>
- <span id="selectedActionsList" class="selectedActions">
- <a href="" class="actions-selected">
+ <span class="selectedActions">
+ <a href="#" onclick="event.preventDefault()" class="actions-selected">
<span class="icon icon-more"></span>
<span><?php p($l->t('Actions'))?></span>
</a>
</span>
</div>
</th>
- <th id="headerSize" 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 class="hidden column-size">
+ <a class="size sort columntitle" href="#" onclick="event.preventDefault()" data-sort="size"><span><?php p($l->t('Size')); ?></span><span class="sort-indicator"></span></a>
</th>
- <th id="headerDate" class="hidden column-mtime">
- <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a>
+ <th class="hidden column-mtime">
+ <a class="columntitle" href="#" onclick="event.preventDefault()" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a>
</th>
</tr>
</thead>
- <tbody id="fileList">
+ <tbody class="files-fileList">
</tbody>
<tfoot>
</tfoot>
</table>
-<div id="filelist-footer"></div>
-<input type="hidden" name="dir" id="dir" value="" />
+<div class="filelist-footer"></div>
<div class="hiddenuploadfield">
<input type="file" id="file_upload_start" class="hiddenuploadfield" name="files[]" />
</div>
-<div id="editor"></div><!-- FIXME Do not use this div in your app! It is deprecated and will be removed in the future! -->
<div id="uploadsize-message" title="<?php p($l->t('Upload too large'))?>">
<p>
<?php p($l->t('The files you are trying to upload exceed the maximum size for file uploads on this server.'));?>
diff --git a/apps/files/templates/recentlist.php b/apps/files/templates/recentlist.php
deleted file mode 100644
index 95997288193..00000000000
--- a/apps/files/templates/recentlist.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php /** @var \OCP\IL10N $l */ ?>
-<div id='notification'></div>
-
-<div id="emptycontent" class="hidden"></div>
-
-<input type="hidden" name="dir" value="" id="dir">
-
-<div class="nofilterresults hidden">
- <div class="icon-search"></div>
- <h2><?php p($l->t('No entries found in this folder')); ?></h2>
- <p></p>
-</div>
-
-<table id="filestable" class="list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>">
- <thead>
- <tr>
- <th id='headerName' class="hidden column-name">
- <div id="headerName-container">
- <a class="name sort columntitle"
- data-sort="name"><span><?php p($l->t('Name')); ?></span></a>
- </div>
- </th>
- <th id="headerSize" class="hidden column-size">
- <a class="size sort columntitle"
- data-sort="size"><span><?php p($l->t('Size')); ?></span></a>
- </th>
- <th id="headerDate" class="hidden column-mtime">
- <a id="modified" class="columntitle"
- data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span
- class="sort-indicator"></span></a>
- <span class="selectedActions">
- <a href="" class="delete-selected">
- <span class="icon icon-delete"></span>
- <span><?php p($l->t('Delete')) ?></span>
- </a>
- </span>
- </th>
- </tr>
- </thead>
- <tbody id="fileList">
- </tbody>
- <tfoot>
- </tfoot>
-</table>
diff --git a/apps/files/templates/settings-personal.php b/apps/files/templates/settings-personal.php
index 1cddae3d33d..0ca3846d699 100644
--- a/apps/files/templates/settings-personal.php
+++ b/apps/files/templates/settings-personal.php
@@ -1,29 +1,9 @@
<?php
/**
- * @copyright 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * 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
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
-
-
-script(\OCA\Files\AppInfo\Application::APP_ID, 'dist/personal-settings');
-
?>
<div id="files-personal-settings" class="section">
</div>
diff --git a/apps/files/templates/simplelist.php b/apps/files/templates/simplelist.php
deleted file mode 100644
index ee07cd0955c..00000000000
--- a/apps/files/templates/simplelist.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<div id='notification'></div>
-
-<div id="emptycontent" class="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>
-
-<input type="hidden" name="dir" value="" id="dir">
-
-<div class="nofilterresults hidden">
- <div class="icon-search"></div>
- <h2><?php p($l->t('No entries found in this folder')); ?></h2>
- <p></p>
-</div>
-<table id="filestable" class="list-container <?php p($_['showgridview'] ? 'view-grid' : '') ?>">
- <thead>
- <tr>
- <th id='headerName' class="hidden column-name">
- <div id="headerName-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 id="headerSize" 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 id="headerDate" class="hidden column-mtime">
- <a id="modified" class="columntitle" data-sort="mtime"><span><?php p($l->t('Modified')); ?></span><span class="sort-indicator"></span></a>
- <span class="selectedActions">
- <a 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 id="fileList">
- </tbody>
- <tfoot>
- </tfoot>
-</table>