Skip to content

Commit

Permalink
RexStan-Überprüfung: fragments/neues/list.php
Browse files Browse the repository at this point in the history
  • Loading branch information
christophboecker committed Sep 8, 2024
1 parent eae9131 commit 0b6ccb7
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions fragments/neues/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,35 @@

/** @var rex_fragment $this */

use FriendsOfRedaxo\Neues\Entry;

/** @var rex_pager $pager */
$pager = $this->getVar('pager');

/** @var rex_yform_manager_collection $posts */
/** @var rex_yform_manager_collection<Entry> $posts */
$posts = $this->getVar('posts');
?>

<!-- Entry list -->
<div class="container">
<div class="row row-cols-1 row-cols-md-2 g-3">
<?php foreach ($posts as $post) : ?>
<?php if($post) { ?>
<div class="col">
<?php
$fragment = new rex_fragment();
$fragment->setVar('post', $post);
echo $fragment->parse('neues/list-entry.php');
?>
</div>
<?php } else { ?>
<div class="placeholder">
<?php if(rex_config::get('neues', 'no_entries_placeholder')) { ?>
<?php if(0 < count($posts)) { ?>
<?php foreach ($posts as $post) : ?>
<div class="col">
<?php
$fragment = new rex_fragment();
$fragment->setVar('post', $post);
echo $fragment->parse('neues/list-entry.php');
?>
</div>
<?php endforeach ?>
<?php } else { ?>
<div class="placeholder">
<?php if(null !== rex_config::get('neues', 'no_entries_placeholder')) { ?>
<p><?= rex_i18n::msg('no_entries_placeholder') ?></p>
<?php } ?>
</div>
<?php } ?>
<?php endforeach ?>
</div>
</div>

Expand Down

0 comments on commit 0b6ccb7

Please sign in to comment.