rvr-nextgen/views/home.php
Pőcze Bence b43ed72040
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good
RVRNEXT-24 replace id-based search to slug-based for communities
2023-05-07 01:54:10 +02:00

30 lines
1.1 KiB
PHP

@extends(templates/layout_normal)
@section(main)
<div class="gridContainer">
<div>
<h3 class="marginBottom">
Communities
<span class="small">[<a href="<?= Container::$routeCollection->getRoute('community.new')->generateLink() ?>">new</a>]</span>
</h3>
<?php if (count($communities) > 0): ?>
<?php foreach ($communities as $community): ?>
<p><a href="<?= Container::$routeCollection->getRoute('community')->generateLink(['communitySlug' => $community->getSlug()]) ?>"><?= $community->getName() ?></a></p>
<?php endforeach; ?>
<?php else: ?>
<p>You have no community.</p>
<?php endif; ?>
</div>
<div>
<h3 class="marginBottom">Upcoming events</h3>
<?php if (count($upcomingEvents) > 0): ?>
<?php foreach ($upcomingEvents as $event): ?>
<!-- todo -->
<?php endforeach; ?>
<?php else: ?>
<p>There is no upcoming event.</p>
<?php endif; ?>
</div>
</div>
@endsection