aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/templates
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/templates')
-rw-r--r--apps/files_sharing/templates/Settings/personal.php12
-rw-r--r--apps/files_sharing/templates/authenticate.php26
-rw-r--r--apps/files_sharing/templates/list.php31
-rw-r--r--apps/files_sharing/templates/part.404.php12
-rw-r--r--apps/files_sharing/templates/public.php124
-rw-r--r--apps/files_sharing/templates/settings-admin.php26
-rw-r--r--apps/files_sharing/templates/settings-personal.php78
-rw-r--r--apps/files_sharing/templates/sharenotfound.php23
8 files changed, 35 insertions, 297 deletions
diff --git a/apps/files_sharing/templates/Settings/personal.php b/apps/files_sharing/templates/Settings/personal.php
new file mode 100644
index 00000000000..5b4f9891b93
--- /dev/null
+++ b/apps/files_sharing/templates/Settings/personal.php
@@ -0,0 +1,12 @@
+<?php
+declare(strict_types=1);
+/**
+ * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
+ */
+
+\OCP\Util::addScript(\OCA\Files_Sharing\AppInfo\Application::APP_ID, 'personal-settings', 'core');
+
+?>
+<div id="files-sharing-personal-settings" class="section">
+</div>
diff --git a/apps/files_sharing/templates/authenticate.php b/apps/files_sharing/templates/authenticate.php
deleted file mode 100644
index 909e839177c..00000000000
--- a/apps/files_sharing/templates/authenticate.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
- /** @var $_ array */
- /** @var $l OC_L10N */
- style('files_sharing', 'authenticate');
- script('files_sharing', 'authenticate');
-?>
-<form method="post">
- <fieldset>
- <?php if (!isset($_['wrongpw'])): ?>
- <div class="warning-info"><?php p($l->t('This share is password-protected')); ?></div>
- <?php endif; ?>
- <?php if (isset($_['wrongpw'])): ?>
- <div class="warning"><?php p($l->t('The password is wrong. Try again.')); ?></div>
- <?php endif; ?>
- <p>
- <label for="password" class="infield"><?php p($l->t('Password')); ?></label>
- <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
- <input type="password" name="password" id="password"
- placeholder="<?php p($l->t('Password')); ?>" value=""
- autocomplete="off" autocapitalize="off" autocorrect="off"
- autofocus />
- <input type="submit" id="password-submit"
- class="svg icon-confirm input-button-inline" value="" disabled="disabled" />
- </p>
- </fieldset>
-</form>
diff --git a/apps/files_sharing/templates/list.php b/apps/files_sharing/templates/list.php
deleted file mode 100644
index fa0365c749c..00000000000
--- a/apps/files_sharing/templates/list.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php /** @var $l OC_L10N */ ?>
-<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">
- <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>
- </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 ae00b01dca2..00000000000
--- a/apps/files_sharing/templates/public.php
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-/** @var $l OC_L10N */
-/** @var $_ array */
-
-OCP\Util::addScript('files', 'file-upload');
-OCP\Util::addStyle('files_sharing', 'public');
-OCP\Util::addStyle('files_sharing', 'mobile');
-OCP\Util::addScript('files_sharing', 'public');
-OCP\Util::addScript('files', 'fileactions');
-OCP\Util::addScript('files', 'fileactionsmenu');
-OCP\Util::addScript('files', 'jquery.iframe-transport');
-OCP\Util::addScript('files', 'jquery.fileupload');
-
-// JS required for folders
-OCP\Util::addStyle('files', 'files');
-OCP\Util::addStyle('files', 'upload');
-OCP\Util::addScript('files', 'filesummary');
-OCP\Util::addScript('files', 'breadcrumb');
-OCP\Util::addScript('files', 'fileinfomodel');
-OCP\Util::addScript('files', 'newfilemenu');
-OCP\Util::addScript('files', 'files');
-OCP\Util::addScript('files', 'filelist');
-OCP\Util::addscript('files', 'keyboardshortcuts');
-
-$thumbSize = 1024;
-?>
-
-<?php if ($_['previewSupported']): /* This enables preview images for links (e.g. on Facebook, Google+, ...)*/?>
- <link rel="image_src" href="<?php p(\OC::$server->getURLGenerator()->linkToRoute( 'core_ajax_public_preview', array('x' => $thumbSize, 'y' => $thumbSize, 'file' => $_['directory_path'], 't' => $_['dirToken']))); ?>" />
-<?php endif; ?>
-
-<div id="notification-container">
- <div id="notification" style="display: none;"></div>
-</div>
-
-<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">
-<input type="hidden" name="downloadURL" value="<?php p($_['downloadURL']) ?>" id="downloadURL">
-<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="filesize" value="<?php p($_['nonHumanFileSize']); ?>" id="filesize">
-<input type="hidden" name="maxSizeAnimateGif" value="<?php p($_['maxSizeAnimateGif']); ?>" id="maxSizeAnimateGif">
-
-
-<header><div id="header" class="<?php p((isset($_['folder']) ? 'share-folder' : 'share-file')) ?>">
- <a href="<?php print_unescaped(link_to('', 'index.php')); ?>"
- title="" id="owncloud">
- <div class="logo-icon svg">
- </div>
- </a>
-
- <div class="header-appname-container">
- <h1 class="header-appname">
- <?php
- if(OC_Util::getEditionString() === '') {
- p($theme->getName());
- } else {
- print_unescaped($theme->getHTMLName());
- }
- ?>
- </h1>
- </div>
-
- <div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
- <div class="header-right">
- <span id="details">
- <?php
- if ($_['server2serversharing']) {
- ?>
- <span id="save" data-protected="<?php p($_['protected']) ?>"
- data-owner-display-name="<?php p($_['displayName']) ?>" data-owner="<?php p($_['owner']) ?>" data-name="<?php p($_['filename']) ?>">
- <button id="save-button"><?php p($l->t('Add to your ownCloud')) ?></button>
- <form class="save-form hidden" action="#">
- <input type="text" id="remote_address" placeholder="example.com/owncloud"/>
- <button id="save-button-confirm" class="icon-confirm svg" disabled></button>
- </form>
- </span>
- <?php } ?>
- <a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
- <img class="svg" alt="" src="<?php print_unescaped(image_path("core", "actions/download.svg")); ?>"/>
- <span id="download-text"><?php p($l->t('Download'))?></span>
- </a>
- </span>
- </div>
-</div></header>
-<div id="content-wrapper">
- <div id="content">
- <div id="preview">
- <?php if (isset($_['folder'])): ?>
- <?php print_unescaped($_['folder']); ?>
- <?php else: ?>
- <?php if ($_['previewEnabled'] && substr($_['mimetype'], 0, strpos($_['mimetype'], '/')) == 'video'): ?>
- <div id="imgframe">
- <video tabindex="0" controls="" preload="none">
- <source src="<?php p($_['downloadURL']); ?>" type="<?php p($_['mimetype']); ?>" />
- </video>
- </div>
- <?php else: ?>
- <!-- Preview frame is filled via JS to support SVG images for modern browsers -->
- <div id="imgframe"></div>
- <?php endif; ?>
- <div class="directDownload">
- <a href="<?php p($_['downloadURL']); ?>" id="downloadFile" class="button">
- <img class="svg" alt="" src="<?php print_unescaped(image_path("core", "actions/download.svg")); ?>"/>
- <?php p($l->t('Download %s', array($_['filename'])))?> (<?php p($_['fileSize']) ?>)
- </a>
- </div>
- <div class="directLink">
- <label for="directLink"><?php p($l->t('Direct link')) ?></label>
- <input id="directLink" type="text" readonly value="<?php p($_['downloadURL']); ?>">
- </div>
- <?php endif; ?>
- </div>
- </div>
- <footer>
- <p class="info">
- <?php print_unescaped($theme->getLongFooter()); ?>
- </p>
- </footer>
-</div>
diff --git a/apps/files_sharing/templates/settings-admin.php b/apps/files_sharing/templates/settings-admin.php
deleted file mode 100644
index 64b6b8e72a3..00000000000
--- a/apps/files_sharing/templates/settings-admin.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/** @var OC_L10N $l */
-/** @var array $_ */
-?>
-<div id="fileSharingSettings">
- <h3><?php p($l->t('Federated Cloud Sharing'));?></h3>
- <a target="_blank" rel="noreferrer" class="icon-info svg"
- title="<?php p($l->t('Open documentation'));?>"
- href="<?php p(link_to_docs('admin-sharing-federated')); ?>"></a>
-
- <p>
- <input type="checkbox" name="outgoing_server2server_share_enabled" id="outgoingServer2serverShareEnabled" class="checkbox"
- value="1" <?php if ($_['outgoingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> />
- <label for="outgoingServer2serverShareEnabled">
- <?php p($l->t('Allow users on this server to send shares to other servers'));?>
- </label>
- </p>
-
- <p>
- <input type="checkbox" name="incoming_server2server_share_enabled" id="incomingServer2serverShareEnabled" class="checkbox"
- value="1" <?php if ($_['incomingServer2serverShareEnabled']) print_unescaped('checked="checked"'); ?> />
- <label for="incomingServer2serverShareEnabled">
- <?php p($l->t('Allow users on this server to receive shares from other servers'));?>
- </label><br/>
- </p>
-</div>
diff --git a/apps/files_sharing/templates/settings-personal.php b/apps/files_sharing/templates/settings-personal.php
deleted file mode 100644
index ea9aae038a7..00000000000
--- a/apps/files_sharing/templates/settings-personal.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-/** @var OC_L10N $l */
-/** @var array $_ */
-script('files_sharing', 'settings-personal');
-style('files_sharing', 'settings-personal');
-if ($_['showShareIT']) {
- script('files_sharing', '3rdparty/gs-share/gs-share');
- style('files_sharing', '3rdparty/gs-share/style');
-}
-?>
-
-<?php if ($_['outgoingServer2serverShareEnabled']): ?>
- <div id="fileSharingSettings" class="section">
- <h2><?php p($l->t('Federated Cloud')); ?></h2>
-
- <p>
- <?php p($l->t('Your Federated Cloud ID:')); ?>
- <strong><?php p($_['cloudId']); ?></strong>
- </p>
-
- <br>
-
- <?php if ($_['showShareIT']) {?>
- <p>
- <?php p($l->t('Share it:')); ?>
- <div class="gs-share">
- <button data-url="<?php p(urlencode($_['reference'])); ?>"
- data-title='<?php p(urlencode($_['message_without_URL'])); ?>'
- class='js-gs-share social-gnu'>
- GNU Social
- </button>
- </div>
- <button class="social-diaspora pop-up"
- data-url='https://sharetodiaspora.github.io/?title=<?php p($_['message_without_URL']); ?>&url=<?php p(urlencode($_['reference'])); ?>'>
- Diaspora
- </button>
- <button class="social-twitter pop-up"
- data-url='https://twitter.com/intent/tweet?text=<?php p(urlencode($_['message_with_URL'])); ?>'>
- Twitter
- </button>
- <button class="social-facebook pop-up"
- data-url='https://www.facebook.com/sharer/sharer.php?u=<?php p(urlencode($_['reference'])); ?>'>
- Facebook
- </button>
- <button class="social-googleplus pop-up"
- data-url='https://plus.google.com/share?url=<?php p(urlencode($_['reference'])); ?>'/>
- Google+
- </button>
- <button id="oca-files-sharing-add-to-your-website">
- <?php p($l->t('Add to your website')) ?>
- </button>
- </p>
-
- <div class="hidden" id="oca-files-sharing-add-to-your-website-expanded">
- <p style="margin: 10px 0">
- <a target="_blank" rel="noreferrer" href="<?php p($_['reference']); ?>"
- style="padding:10px;background-color:#1d2d44;color:#fff;border-radius:3px;padding-left:4px;">
- <img src="<?php p($_['owncloud_logo_path']); ?>"
- style="width:50px;position:relative;top:8px;">
- <?php p($l->t('Share with me via ownCloud')); ?>
- </a>
- </p>
-
- <p>
- <?php p($l->t('HTML Code:')); ?>
- <xmp><a target="_blank" rel="noreferrer" href="<?php p($_['reference']); ?>"
- style="padding:10px;background-color:#1d2d44;color:#fff;border-radius:3px;padding-left:4px;">
- <img src="<?php p(\OC::$server->getURLGenerator()->getAbsoluteURL($_['owncloud_logo_path'])); ?>"
- style="width:50px;position:relative;top:8px;">
- <?php p($l->t('Share with me via ownCloud')); ?>
-
-</a></xmp>
- </p>
- </div>
- <?php } ?>
-
- </div>
-<?php endif; ?>
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>