diff options
author | Devlin Junker <devlin.junker@gmail.com> | 2022-11-09 21:52:11 -0800 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-11-17 14:50:53 +0100 |
commit | c6b4bcc00e5202e85388a0624d149e8b1df386f8 (patch) | |
tree | 7063a29710dfd0a363f3462fee8a0e8185488e15 /templates-old | |
parent | 760c44288256b104b662ade7a892a6ec0b898851 (diff) |
upmerging master into vue-rewrite
Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
Diffstat (limited to 'templates-old')
-rw-r--r-- | templates-old/admin.php | 134 | ||||
-rw-r--r-- | templates-old/part.content.warnings.php | 44 |
2 files changed, 28 insertions, 150 deletions
diff --git a/templates-old/admin.php b/templates-old/admin.php index d85af3f83..56c6498a6 100644 --- a/templates-old/admin.php +++ b/templates-old/admin.php @@ -1,132 +1,8 @@ <?php -script('news', 'admin/Admin'); -style('news', 'admin'); +declare(strict_types=1); +// SPDX-FileCopyrightText: 2022 Carl Schwan <carl@carlschwan.eu> +// SPDX-Licence-Identifier: AGPL-3.0-or-later +\OCP\Util::addScript('news', 'build/news-admin-settings'); ?> -<div class="section" id="news"> - <h2>News</h2> - <div class="form-line"> - <p><input type="checkbox" name="news-use-cron-updates" - <?php if ($_['useCronUpdates']) p('checked'); ?>> - <label for="news-use-cron-updates"> - <?php p($l->t('Use system cron for updates')); ?> - </label> - </p> - <p> - <em><?php p($l->t( - 'Disable this if you use a custom updater.' - )); ?></em> - </p> - </div> - <div class="form-line"> - <p> - <label for="news-auto-purge-minimum-interval"> - <?php p($l->t('Purge interval')); ?></p> - </label> - <p> - <em> - <?php p($l->t( - 'Minimum amount of seconds after deleted feeds and folders ' . - 'are removed from the database; values below 60 seconds are ' . - 'ignored.' - )); ?></em> - </p> - <p><input type="text" name="news-auto-purge-minimum-interval" - value="<?php p($_['autoPurgeMinimumInterval']); ?>"></p> - </div> - <div class="form-line"> - <p> - <label for="news-auto-purge-count"> - <?php p($l->t('Maximum read count per feed')); ?> - </label> - </p> - <p> - <em> - <?php p($l->t( - 'Defines the maximum amount of articles that can be read per ' . - "feed which won't be deleted by the cleanup job; ". - 'if old articles reappear after being read, increase ' . - 'this value; negative values such as -1 will turn this ' . - 'feature off.' - )); ?></em> - </p> - <p><input type="text" name="news-auto-purge-count" - value="<?php p($_['autoPurgeCount']); ?>"></p> - </div> - <div class="form-line"> - <p> - <label for="news-max-redirects"> - <?php p($l->t('Maximum redirects')); ?> - </label> - </p> - <p> - <em> - <?php p($l->t( - 'How many redirects the feed fetcher should follow.' - )); ?> - </em> - </p> - <p><input type="text" name="news-max-redirects" - value="<?php p($_['maxRedirects']); ?>"></p> - </div> - <div class="form-line"> - <p> - <label for="news-feed-fetcher-timeout"> - <?php p($l->t('Feed fetcher timeout')); ?> - </label> - </p> - <p> - <em> - <?php p($l->t( - 'Maximum number of seconds to wait for an RSS or Atom feed ' . - 'to load; if it takes longer the update will be aborted.' - )); ?></em> - </p> - <p><input type="text" name="news-feed-fetcher-timeout" - value="<?php p($_['feedFetcherTimeout']); ?>"></p> - </div> - <div class="form-line"> - <p> - <label for="news-explore-url"> - <?php p($l->t('Explore Service URL')); ?> - </label> - </p> - <p> - <em> - <?php p($l->t( - 'If given, this service\'s URL will be queried for ' . - 'displaying the feeds in the explore feed section. To ' . - 'fall back to the built in explore service, leave this ' . - 'input empty.' - )); ?> - </em> - <a href="https://nextcloud.github.io/news/admin/"><?php p($l->t( - 'For more information check the wiki.' - )); ?></a> - </p> - <p><input type="text" name="news-explore-url" - value="<?php p($_['exploreUrl']); ?>"></p> - </div> - <div class="form-line"> - <p> - <label for="news-updater-interval"> - <?php p($l->t('Update interval')); ?> - </label> - </p> - <p> - <em> - <?php p($l->t( - 'Interval in seconds in which the feeds will be updated.' - )); ?> - </em> - <a href="https://nextcloud.github.io/news/admin/"><?php p($l->t( - 'For more information check the documentation.' - )); ?></a> - </p> - <p><input type="text" name="news-update-interval" - value="<?php p($_['updateInterval']); ?>"></p> - </div> - <div id="news-saved-message"> - <span class="msg success"><?php p($l->t('Saved')); ?></span> - </div> -</div> +<div id="vue-admin-news"></div> diff --git a/templates-old/part.content.warnings.php b/templates-old/part.content.warnings.php index e8578b299..37cf1af9d 100644 --- a/templates-old/part.content.warnings.php +++ b/templates-old/part.content.warnings.php @@ -1,25 +1,27 @@ <?php if ($_['warnings']['improperlyConfiguredCron']) { ?> <news-instant-notification id="cron-warning"> - <p><?php p($l->t('Ajax or webcron mode detected! Your feeds will not be updated!')); ?></p> - <ul> - <li> - <a href="https://docs.nextcloud.org/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#cron" - target="_blank" - rel="noreferrer"> - <?php - p($l->t('How to set up the operating system cron')); - ?> - </a> - </li> - <li> - <a href="https://github.com/nextcloud/news-updater" - target="_blank" - rel="noreferrer"> - <?php - p($l->t('Install and set up a faster parallel updater that uses the News app\'s update API')); - ?> - </a> - </li> - </ul> + <div style="<?= $_['nc_major_version'] >= 25 ? 'padding: 12px;' : ''; ?>"> + <p><?php p($l->t('Ajax or webcron mode detected! Your feeds will not be updated!')); ?></p> + <ul> + <li> + <a href="https://docs.nextcloud.org/server/latest/admin_manual/configuration_server/background_jobs_configuration.html#cron" + target="_blank" + rel="noreferrer"> + <?php + p($l->t('How to set up the operating system cron')); + ?> + </a> + </li> + <li> + <a href="https://github.com/nextcloud/news-updater" + target="_blank" + rel="noreferrer"> + <?php + p($l->t('Install and set up a faster parallel updater that uses the News app\'s update API')); + ?> + </a> + </li> + </ul> + </div> </news-instant-notification> <?php }; ?> |