aboutsummaryrefslogtreecommitdiff
path: root/app/views/feed/contentSelectorPreview.phtml
diff options
context:
space:
mode:
authorGravatar Julien-Pierre Avérous <github@sourcemac.com> 2020-02-13 19:22:35 +0200
committerGravatar GitHub <noreply@github.com> 2020-02-13 18:22:35 +0100
commitd30ac40772ec1b4706922afd8acab8448af39a9e (patch)
tree6b7cec8455a542875959a09f7bdcc7a2af285fa1 /app/views/feed/contentSelectorPreview.phtml
parent4ddd1821bb0fc1186937551d59100294b8833727 (diff)
Enhance content path feature (#2778)
- Add a maintenance section to be able to clear cache and force reload a feed. - Add an icon next to path field to show a pop-up with the result of the content path. Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr> Co-authored-by: Marien Fressinaud <dev@marienfressinaud.fr>
Diffstat (limited to 'app/views/feed/contentSelectorPreview.phtml')
-rw-r--r--app/views/feed/contentSelectorPreview.phtml36
1 files changed, 36 insertions, 0 deletions
diff --git a/app/views/feed/contentSelectorPreview.phtml b/app/views/feed/contentSelectorPreview.phtml
new file mode 100644
index 000000000..3bb27859a
--- /dev/null
+++ b/app/views/feed/contentSelectorPreview.phtml
@@ -0,0 +1,36 @@
+<?php FreshRSS::preLayout(); ?>
+<!DOCTYPE html>
+<html class="preview_background" lang="<?= FreshRSS_Context::$user_conf->language ?>" xml:lang="<?= FreshRSS_Context::$user_conf->language ?>">
+ <head>
+ <?= self::headStyle() ?>
+ <script src="<?= Minz_Url::display('/scripts/preview.js?' . @filemtime(PUBLIC_PATH . '/scripts/preview.js')) ?>"></script>
+ </head>
+ <body class="preview_background">
+ <?php if ($this->fatalError != '') { ?>
+ <p class="alert alert-warn"><?= $this->fatalError ?></p>
+ <?php } else { ?>
+ <?php if ($this->selectorSuccess === false) { ?>
+ <p class="alert alert-warn">
+ <?= _t('feedback.sub.feed.selector_preview.no_result') ?>
+ </p>
+ <?php } ?>
+
+ <div class="preview_controls">
+ <label for="freshrss_rendered">
+ <input type="radio" id="freshrss_rendered" name="freshrss_type" checked="checked" />
+ <?= _t('sub.feed.selector_preview.show_rendered') ?>
+ </label>
+
+ <label for="freshrss_raw">
+ <input type="radio" id="freshrss_raw" name="freshrss_type" />
+ <?= _t('sub.feed.selector_preview.show_raw') ?>
+ </label>
+ </div>
+
+ <div class="content large">
+ <div dir="auto" id="freshrss_rendered_view"><?= $this->htmlContent ?></div>
+ <pre id="freshrss_raw_view" hidden="hidden"> <?= htmlspecialchars($this->htmlContent) ?></pre>
+ </div>
+ <?php } ?>
+ </body>
+</html>