rvr-nextgen/views/communities/community.php
Pőcze Bence a29d5ce432
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good
fixup! implement community basics
2023-04-16 03:51:38 +02:00

54 lines
2.2 KiB
PHP

@extends(templates/layout_normal)
@section(main)
<h2><?= $community->getName() ?> <span class="small">[<a href="/communities/<?= $community->getId() ?>/edit">edit</a>]</span></h2>
<div class="gridContainer marginTop">
<div>
<h3 class="marginBottom">Members</h3>
<?php foreach ($members as $member): ?>
<p><?= $member->getUser()->getDisplayName() ?></p>
<?php endforeach; ?>
<?php if ($editPermission): ?>
<hr>
<p><a href="/communities/<?= $community->getId() ?>/members">Edit members</a></p>
<?php endif; ?>
</div>
<div>
<h3 class="marginBottom">Currencies</h3>
<p>Main currency: <b><?= $community->getCurrency() ?></b></p>
<p>Further currencies: <b><?= implode(', ', $currencyNames) ?></b></p>
</div>
<div>
<h3 class="marginBottom">Upcoming events</h3>
<?php if (count($upcomingEvents) > 0): ?>
<?php foreach ($upcomingEvents as $event): ?>
<p><a href="/events/<?= $event->getId() ?>"><?= $event->getName() ?></a></p>
<?php endforeach; ?>
<?php else: ?>
<p>There is no upcoming event.</p>
<?php endif; ?>
<!--<hr>
<p><a href="/events?communityId=<?= $community->getId() ?>">All events</a></p>
<p><a href="/communities/<?= $community->getId() ?>/newEvent">New event</a></p>-->
</div>
<div>
<h3 class="marginBottom">Finances</h3>
<table class="fullWidth">
<tr>
<td>You owe</td>
<td style="text-align: right; color: red;">0 <?= $community->getCurrency() ?></td>
</tr>
<tr>
<td>You're owed</td>
<td style="text-align: right; color: green;">0 <?= $community->getCurrency() ?></td>
</tr>
<tr>
<td>Your balance</td>
<td style="text-align: right;">0 <?= $community->getCurrency() ?></td>
</tr>
</table>
</div>
</div>
@endsection