mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-24 00:07:59 -04:00
* Fix most PHPDocs errors Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 https://phpstan.org/writing-php-code/phpdoc-types * Avoid func_get_args Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list And avoid dynamic functions names when possible to more easily identify calls and unused functions. Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 * PHPStan level 3 * PHPStand level 4 * Update default to PHPStan level 4 * Towards level 5 * Fix level 4 regression * Towards level 5 * Pass PHPStan level 5 * Towards level 6 * Remove erronenous regression from changelog https://github.com/FreshRSS/FreshRSS/pull/4116
94 lines
2.8 KiB
PHTML
94 lines
2.8 KiB
PHTML
<?php
|
|
/** @var FreshRSS_View $this */
|
|
$this->partial('aside_subscription');
|
|
?>
|
|
|
|
<main class="post drop-section">
|
|
<div class="link-back-wrapper">
|
|
<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
|
|
</div>
|
|
|
|
<h1><?= _t('sub.title') ?></h1>
|
|
|
|
<?php if ($this->onlyFeedsWithError): ?>
|
|
<div class="link-showAllFeeds-wrapper">
|
|
<a href="<?= _url('subscription', 'index') ?>">← <?= _t('sub.feed.show.all') ?></a>
|
|
</div>
|
|
<p class="alert alert-warn">
|
|
<?= _t('sub.feed.showing.error') ?>
|
|
</p>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if (!$this->onlyFeedsWithError && $this->signalError){ ?>
|
|
<div>
|
|
<a class="btn" href="<?= _url('subscription', 'index', 'error', '1') ?>"><?= _i('look') ?> <?= _t('sub.feed.show.error') ?></a>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<form id="controller-category" method="post" aria-hidden="true">
|
|
<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
|
|
</form>
|
|
|
|
<?php
|
|
$signalError = false;
|
|
foreach ($this->categories as $cat) {
|
|
$feeds = $cat->feeds();
|
|
?>
|
|
<div class="box">
|
|
<div class="box-title">
|
|
<a class="configure open-slider" href="<?= _url('subscription', 'category', 'id', $cat->id()) ?>"><?= _i('configure') ?></a>
|
|
<?= $cat->name() ?>
|
|
</div>
|
|
<ul class="box-content" data-cat-id="<?= $cat->id() ?>">
|
|
<?php if (!empty($feeds)) { ?>
|
|
<?php
|
|
foreach ($feeds as $feed) {
|
|
if ($this->onlyFeedsWithError && !$feed->inError()) {
|
|
continue;
|
|
}
|
|
$error = $feed->inError() ? ' error' : '';
|
|
$empty = $feed->nbEntries() == 0 ? ' empty' : '';
|
|
?>
|
|
<li class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>"
|
|
draggable="true"
|
|
data-feed-id="<?= $feed->id() ?>"
|
|
dropzone="move">
|
|
<a class="configure open-slider" href="<?= _url('subscription', 'feed', 'id', $feed->id()) ?>"><?= _i('configure') ?></a>
|
|
<?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feed->favicon() ?>" alt="✇" loading="lazy" /><?php endif; ?>
|
|
<?= $feed->name() ?>
|
|
</li>
|
|
<?php }
|
|
} else {
|
|
?>
|
|
<li class="item feed disabled" dropzone="move"><div class="alert-warn"><?= _t('sub.category.empty') ?></div></li>
|
|
<?php } ?>
|
|
<li class="item feed">✚ <a href="<?= _url('subscription', 'add') ?>"><?= _t('sub.feed.add') ?></a></li>
|
|
</ul>
|
|
</div>
|
|
<?php } ?>
|
|
|
|
<div class="box visible-semi">
|
|
<div class="box-title">
|
|
✚ <a href="<?= _url('subscription', 'add') ?>"><?= _t('sub.category.add') ?></a>
|
|
</div>
|
|
<ul class="box-content">
|
|
</ul>
|
|
</div>
|
|
|
|
<?php $class = $this->displaySlider ? ' class="active"' : ''; ?>
|
|
<a href="#" id="close-slider"<?= $class ?>>
|
|
<?= _i('close') ?>
|
|
</a>
|
|
<div id="slider"<?= $class ?>>
|
|
<?php
|
|
if (isset($this->feed)) {
|
|
$this->renderHelper('feed/update');
|
|
} elseif (isset($this->category)) {
|
|
$this->renderHelper('category/update');
|
|
}
|
|
?>
|
|
</div>
|
|
|
|
</main>
|