diff --git a/src/Controller/CommunityController.php b/src/Controller/CommunityController.php index 239d47c..77b1aa3 100644 --- a/src/Controller/CommunityController.php +++ b/src/Controller/CommunityController.php @@ -71,8 +71,6 @@ class CommunityController implements IAuthenticationRequired return new HtmlContent('communities/community', [ 'community' => $community, - 'members' => $this->getMembers($community), - 'currencies' => $this->getCurrencies($community), 'upcomingEvents' => [], 'debtItems' => $debtItems, 'debtBalance' => $debtBalance, @@ -83,6 +81,20 @@ class CommunityController implements IAuthenticationRequired ]); } + public function getCommunitySettings(): ?IContent + { + if (!$this->checkPermission(\Container::$request->query('communityId'), false, $community, $ownCommunityMember)) { + return null; + } + + return new HtmlContent('communities/community_settings', [ + 'community' => $community, + 'members' => $this->getMembers($community), + 'currencies' => $this->getCurrencies($community), + 'editPermission' => $ownCommunityMember->getOwner() + ]); + } + public function getCommunityNew(): IContent { return new HtmlContent('communities/community_edit'); diff --git a/src/Controller/TransactionController.php b/src/Controller/TransactionController.php index c6b484d..3f075c9 100644 --- a/src/Controller/TransactionController.php +++ b/src/Controller/TransactionController.php @@ -86,6 +86,7 @@ class TransactionController implements IAuthenticationRequired, ISecured 'exchangeRateCalculator' => $exchangeRateCalculator, 'pages' => $pages, 'currentPage' => $currentPage, + 'numberOfTransactions' => $numberOfTransactions, 'transactions' => $transactions ]); } diff --git a/views/communities/community.php b/views/communities/community.php index 2e62a09..13ce2dc 100644 --- a/views/communities/community.php +++ b/views/communities/community.php @@ -1,35 +1,16 @@ @extends(templates/layout_normal) @section(main) -
- getId() === $community->getMainCurrencyId()): ?> - = $currency->getCode() ?> - - = $currency->getCode() ?> - -
- - -= $member->getUser()->getDisplayName() ?>
+ ++ getId() === $community->getMainCurrencyId()): ?> + = $currency->getCode() ?> + + = $currency->getCode() ?> + +
+ +- « - ‹ - - - = $i + 1 ?> - - = $i + 1 ?> - - - › - » -
- + 0): ?> + 1): ?> ++ « + ‹ + + + = $i + 1 ?> + + = $i + 1 ?> + + + › + » +
+ - - -= $transaction->getDescription() ?>
-= $transaction->getPayerUser()->getDisplayName() ?> ► = $transaction->getPayeeUser() ? $transaction->getPayeeUser()->getDisplayName() : '[common]' ?>
-= $transaction->getTimeDate()->format('Y-m-d H:i') ?>
-= number_format($transaction->getSum(), $transaction->getCurrency()->getRoundDigits()) ?> = $transaction->getCurrency()->getCode() ?>
- + + += $transaction->getDescription() ?>
+= $transaction->getPayerUser()->getDisplayName() ?> ► = $transaction->getPayeeUser() ? $transaction->getPayeeUser()->getDisplayName() : '[common]' ?>
+= $transaction->getTimeDate()->format('Y-m-d H:i') ?>
+= number_format($transaction->getSum(), $transaction->getCurrency()->getRoundDigits()) ?> = $transaction->getCurrency()->getCode() ?>
+ ++ « + ‹ + + + = $i + 1 ?> + + = $i + 1 ?> + + + › + » +
+ + + + +There are no transactions yet.
- « - ‹ - - - = $i + 1 ?> - - = $i + 1 ?> - - - › - » -
- - @endsection diff --git a/views/home.php b/views/home.php index cc3a6a6..f88aa66 100644 --- a/views/home.php +++ b/views/home.php @@ -3,7 +3,10 @@ @section(main)