67 lines
3.2 KiB
PHP
67 lines
3.2 KiB
PHP
@extends(templates/layout_normal)
|
|
|
|
@section(main)
|
|
<h2><?= $community->getName() ?> <span class="small">[<a href="<?= Container::$routeCollection->getRoute('community-edit')->generateLink(['communityId' => $community->getId()]) ?>">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="<?= Container::$routeCollection->getRoute('community-members')->generateLink(['communityId' => $community->getId()]) ?>">Edit members</a></p>
|
|
<?php endif; ?>
|
|
</div>
|
|
<div>
|
|
<h3 class="marginBottom">Currencies</h3>
|
|
<?php foreach ($currencies as $currency): ?>
|
|
<p>
|
|
<?php if ($currency->getId() === $community->getMainCurrencyId()): ?>
|
|
<b><?= $currency->getCode() ?></b>
|
|
<?php else: ?>
|
|
<a href="<?= Container::$routeCollection->getRoute('community-currency-exchange-rates')->generateLink(['communityId' => $community->getId(), 'code' => $currency->getCode()]) ?>"><?= $currency->getCode() ?></a>
|
|
<?php endif; ?>
|
|
</p>
|
|
<?php endforeach; ?>
|
|
<?php if ($editPermission): ?>
|
|
<hr>
|
|
<p><a href="<?= Container::$routeCollection->getRoute('community-currencies')->generateLink(['communityId' => $community->getId()]) ?>">Edit currencies</a></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>
|
|
<?php
|
|
$mainCurrencyCode = $community->getMainCurrency()->getCode();
|
|
$mainCurrencyRoundDigits = $community->getMainCurrency()->getRoundDigits();
|
|
?>
|
|
<h3 class="marginBottom">Finances</h3>
|
|
<a href="<?= Container::$routeCollection->getRoute('community.transactions')->generateLink(['communityId' => $community->getId()]) ?>">Transactions</a>
|
|
<table class="fullWidth marginTop">
|
|
<tr>
|
|
<td>You owe</td>
|
|
<td style="text-align: right; color: red;"><?= number_format(0, $mainCurrencyRoundDigits) ?> <?= $mainCurrencyCode ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>You're owed</td>
|
|
<td style="text-align: right; color: green;"><?= number_format(0, $mainCurrencyRoundDigits) ?> <?= $mainCurrencyCode ?></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Your balance</td>
|
|
<td style="text-align: right;"><?= number_format(0, $mainCurrencyRoundDigits) ?> <?= $mainCurrencyCode ?></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
@endsection
|