Files
FreshRSS/app/views/feed/contentSelectorPreview.phtml
Alexandre Alapetite 77e9877316 Add PHPStan (#4021)
* Add PHPStan
#fix https://github.com/FreshRSS/FreshRSS/issues/4016
https://phpstan.org/

```sh
composer run-script phpstan
```

* More fixes

* Fix global variables

* Add .phtml

* Fix merge
https://github.com/FreshRSS/FreshRSS/pull/4090

* Fix more warnings

* Fix view errors and enable in CI

* ReturnTypeWillChange

* Dynamic view type

* Fix Minz static/self bug
2021-12-31 17:00:51 +01:00

40 lines
1.4 KiB
PHTML

<?php
/** @var FreshRSS_View $this */
FreshRSS::preLayout();
?>
<!DOCTYPE html>
<html class="preview_background" lang="<?= FreshRSS_Context::$user_conf->language ?>" xml:lang="<?= FreshRSS_Context::$user_conf->language ?>">
<head>
<?= FreshRSS_View::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>