diff options
Diffstat (limited to 'apps/files_sharing/templates')
-rw-r--r-- | apps/files_sharing/templates/Settings/personal.php | 23 | ||||
-rw-r--r-- | apps/files_sharing/templates/list.php | 33 | ||||
-rw-r--r-- | apps/files_sharing/templates/part.404.php | 12 | ||||
-rw-r--r-- | apps/files_sharing/templates/public.php | 149 | ||||
-rw-r--r-- | apps/files_sharing/templates/sharenotfound.php | 23 |
5 files changed, 26 insertions, 214 deletions
diff --git a/apps/files_sharing/templates/Settings/personal.php b/apps/files_sharing/templates/Settings/personal.php index 30caeb16206..5b4f9891b93 100644 --- a/apps/files_sharing/templates/Settings/personal.php +++ b/apps/files_sharing/templates/Settings/personal.php @@ -1,28 +1,11 @@ <?php declare(strict_types=1); /** - * @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl> - * - * @author Roeland Jago Douma <roeland@famdouma.nl> - * - * @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_Sharing\AppInfo\Application::APP_ID, 'personal-settings'); +\OCP\Util::addScript(\OCA\Files_Sharing\AppInfo\Application::APP_ID, 'personal-settings', 'core'); ?> <div id="files-sharing-personal-settings" class="section"> diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php deleted file mode 100644 index 983e70d4433..00000000000 --- a/apps/files_sharing/templates/list.php +++ /dev/null @@ -1,33 +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 emptycontent hidden"> - <div class="icon-search"></div> - <h2><?php p($l->t('No entries found in this folder')); ?></h2> -</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="headerDate" class="hidden column-mtime"> - <a id="modified" 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 id="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 3ef117d7524..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 doesn’t 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_sharing/templates/public.php b/apps/files_sharing/templates/public.php deleted file mode 100644 index 889242fded1..00000000000 --- a/apps/files_sharing/templates/public.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php -/** @var \OCP\IL10N $l */ -/** @var array $_ */ -?> -<div id="app-content"> -<?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?> - <link rel="image_src" href="<?php p($_['previewImage']); ?>" /> -<?php endif; ?> - -<input type="hidden" id="sharingUserId" value="<?php p($_['owner']) ?>"> -<input type="hidden" id="filesApp" name="filesApp" value="1"> -<input type="hidden" id="isPublic" name="isPublic" value="1"> -<input type="hidden" name="dir" value="<?php p($_['dir']) ?>" id="dir"> -<?php if (!$_['hideDownload']): ?> - <input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL"> -<?php endif; ?> -<input type="hidden" name="previewURL" value="<?php p($_['previewURL']) ?>" id="previewURL"> -<input type="hidden" name="sharingToken" value="<?php p($_['sharingToken']) ?>" id="sharingToken"> -<input type="hidden" name="filename" value="<?php p($_['filename']) ?>" id="filename"> -<input type="hidden" name="mimetype" value="<?php p($_['mimetype']) ?>" id="mimetype"> -<input type="hidden" name="previewSupported" value="<?php p($_['previewSupported'] ? 'true' : 'false'); ?>" id="previewSupported"> -<input type="hidden" name="mimetypeIcon" value="<?php p(\OC::$server->getMimeTypeDetector()->mimeTypeIcon($_['mimetype'])); ?>" id="mimetypeIcon"> -<input type="hidden" name="hideDownload" value="<?php p($_['hideDownload'] ? 'true' : 'false'); ?>" id="hideDownload"> -<input type="hidden" id="disclaimerText" value="<?php p($_['disclaimer']) ?>"> -<?php -$upload_max_filesize = OC::$server->get(\bantu\IniGetWrapper\IniGetWrapper::class)->getBytes('upload_max_filesize'); -$post_max_size = OC::$server->get(\bantu\IniGetWrapper\IniGetWrapper::class)->getBytes('post_max_size'); -$maxUploadFilesize = min($upload_max_filesize, $post_max_size); -?> -<input type="hidden" name="maxFilesizeUpload" value="<?php p($maxUploadFilesize); ?>" id="maxFilesizeUpload"> - -<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)): ?> - <input type="hidden" name="filesize" value="<?php p($_['nonHumanFileSize']); ?>" id="filesize"> -<?php endif; ?> -<input type="hidden" name="maxSizeAnimateGif" value="<?php p($_['maxSizeAnimateGif']); ?>" id="maxSizeAnimateGif"> -<?php if (isset($_['note']) && $_['note'] !== '') : ?> - <div id="notemenu" class="hidden"> - <div class="icon-comment-white menutoggle" tabindex="0" role="button" aria-haspopup="true" aria-controls="note-content" aria-expanded="false"> - <span class="hidden-visually"><?php p($l->t('Share note'))?></span> - </div> - <div id="note-content" class="menu" aria-label="Note content"> - <div class="content"> - <?php p($_['note']); ?> - </div> - </div> - </div> -<?php endif; ?> - -<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)) { ?> - <!-- ONLY if this is a folder, we show the grid toggle button --> - <?php if (empty($_['dir']) === false) { ?> - <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 } ?> - - <!-- files listing --> - <div id="files-public-content"> - <div id="preview"> - <?php if (isset($_['folder'])): ?> - <?php print_unescaped($_['folder']); ?> - <?php else: ?> - <?php if ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'audio'): ?> - <div id="imgframe"> - <audio tabindex="0" controls="" preload="none" style="width: 100%; max-width: <?php p($_['previewMaxX']); ?>px; max-height: <?php p($_['previewMaxY']); ?>px" - <?php // See https://github.com/nextcloud/server/pull/27674?> - <?php if ($_['hideDownload']) { ?>controlsList="nodownload" <?php } ?>> - <source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" /> - </audio> - </div> - <?php else: ?> - <!-- Preview frame is filled via JS to support SVG images for modern browsers --> - <div id="imgframe"></div> - <?php if (isset($_['mimetype']) && strpos($_['mimetype'], 'image') === 0) { ?> - <div class="directDownload"> - <div> - <?php p($_['filename'])?> (<?php p($_['fileSize']) ?>) - </div> - <?php if (!$_['hideDownload']) { ?> - <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button"> - <span class="icon icon-download"></span> - <?php p($l->t('Download'))?> - </a> - <?php } ?> - </div> - <?php } ?> - <?php endif; ?> - <?php if ($_['previewURL'] === $_['downloadURL'] && !$_['hideDownload']): ?> - <div class="directDownload"> - <div> - <?php p($_['filename'])?> (<?php p($_['fileSize']) ?>) - </div> - <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button"> - <span class="icon icon-download"></span> - <?php p($l->t('Download'))?> - </a> - </div> - <?php endif; ?> - <?php endif; ?> - </div> - </div> -<?php } else { ?> - <input type="hidden" id="upload-only-interface" value="1"/> - <div id="public-upload"> - <div - id="emptycontent" - class="<?php if (!empty($_['note'])) { ?>has-note<?php } ?>"> - <?php if ($_['shareOwner']) { ?> - <div id="displayavatar"><div class="avatardiv"></div></div> - <h2><?php p($l->t('Upload files to %s', [$_['shareOwner']])) ?></h2> - <p><span class="icon-folder"></span> <?php p($_['filename']) ?></p> - <?php } else { ?> - <div id="displayavatar"><span class="icon-folder"></span></div> - <h2><?php p($l->t('Upload files to %s', [$_['filename']])) ?></h2> - <?php } ?> - - <?php if (empty($_['note']) === false) { ?> - <h3><?php p($l->t('Note')); ?></h3> - <p class="note"><?php p($_['note']); ?></p> - <?php } ?> - - <input type="file" name="files[]" class="hidden" multiple> - <a href="#" class="button icon-upload"><?php p($l->t('Select or drop files')) ?></a> - <div id="drop-upload-progress-indicator" style="padding-top: 25px;" class="hidden"><span class="icon-loading-small"></span><?php p($l->t('Uploading files')) ?></div> - <div id="drop-upload-done-indicator" style="padding-top: 25px;" class="hidden"><?php p($l->t('Uploaded files:')) ?></div> - <ul id="drop-uploaded-files"></ul> - - <?php if (!empty($_['disclaimer'])) { ?> - <div> - <?php - echo $l->t('By uploading files, you agree to the %1$sterms of service%2$s.', [ - '<span id="show-terms-dialog">', '</span>' - ]); - ?> - </div> - <?php } ?> - </div> - </div> -<?php } ?> - -<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] !== true)): ?> - <input type="hidden" name="dir" id="dir" value="" /> - <div class="hiddenuploadfield"> - <input type="file" id="file_upload_start" class="hiddenuploadfield" name="files[]" - data-url="<?php p(\OC::$server->getURLGenerator()->linkTo('files', 'ajax/upload.php')); ?>" /> - </div> -<?php endif; ?> -</div> diff --git a/apps/files_sharing/templates/sharenotfound.php b/apps/files_sharing/templates/sharenotfound.php new file mode 100644 index 00000000000..fe653d4ad5a --- /dev/null +++ b/apps/files_sharing/templates/sharenotfound.php @@ -0,0 +1,23 @@ +<?php +/** + * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +use OCP\IURLGenerator; +use OCP\Server; + +$urlGenerator = Server::get(IURLGenerator::class); +?> +<div class="body-login-container update"> + <div> + <svg xmlns="http://www.w3.org/2000/svg" height="70" viewBox="0 -960 960 960" width="70"> + <path fill="currentColor" d="m674-456-50-50 69-70-69-69 50-51 70 70 69-70 51 51-70 69 70 70-51 50-69-69-70 69Zm-290-24q-60 0-102-42t-42-102q0-60 42-102t102-42q60 0 102 42t42 102q0 60-42 102t-102 42ZM96-192v-92q0-26 12.5-47.5T143-366q55-32 116-49t125-17q64 0 125 17t116 49q22 13 34.5 34.5T672-284v92H96Z"/> + </svg> + </div> + <h2><?php p($l->t('Share not found')); ?></h2> + <p class="infogroup"><?php p($_['message'] ?: $l->t('This share does not exist or is no longer available')); ?></p> + <p><a class="button primary" href="<?php p($urlGenerator->linkTo('', 'index.php')) ?>"> + <?php p($l->t('Back to %s', [$theme->getName()])); ?> + </a></p> +</div> |