From b80b7d2e07bf247d173b55011db9a6d14d1adc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Stan=C4=9Bk?= Date: Mon, 9 Oct 2017 23:06:46 +0200 Subject: [PATCH] informacni text pri nezaplaceni --- app/WebModule/components/ProgramsContentControl.php | 2 ++ app/WebModule/components/templates/programs_content.latte | 4 ++++ app/lang/web.cs_CZ.neon | 1 + 3 files changed, 7 insertions(+) diff --git a/app/WebModule/components/ProgramsContentControl.php b/app/WebModule/components/ProgramsContentControl.php index b530f1bf0..37d7f5a25 100644 --- a/app/WebModule/components/ProgramsContentControl.php +++ b/app/WebModule/components/ProgramsContentControl.php @@ -66,6 +66,8 @@ public function render($content) $template->guestRole = $user->isInRole($this->roleRepository->findBySystemName(Role::GUEST)->getName()); $template->userHasPermission = $user->isAllowed(Resource::PROGRAM, Permission::CHOOSE_PROGRAMS); + $template->userWaitingForPayment = !$this->settingsRepository->getValue(Settings::IS_ALLOWED_REGISTER_PROGRAMS_BEFORE_PAYMENT) + && $this->userRepository->findById($user->getId())->getWaitingForPaymentApplications()->count() > 0; $template->render(); } diff --git a/app/WebModule/components/templates/programs_content.latte b/app/WebModule/components/templates/programs_content.latte index 54eba3ee0..4fb0f668f 100644 --- a/app/WebModule/components/templates/programs_content.latte +++ b/app/WebModule/components/templates/programs_content.latte @@ -36,6 +36,10 @@
{_web.programs_content.register_programs_not_allowed}
+ {elseif $userWaitingForPayment} +
+ {_web.programs_content.register_programs_allowed_after_payment} +
{/if} {var $userAllowedRegisterPrograms = $registerProgramsAllowed && $userHasPermission} diff --git a/app/lang/web.cs_CZ.neon b/app/lang/web.cs_CZ.neon index d853be27c..c3b31b350 100644 --- a/app/lang/web.cs_CZ.neon +++ b/app/lang/web.cs_CZ.neon @@ -187,6 +187,7 @@ programs_content: login_required_end: "." register_programs_not_allowed: "Zapisování programů není v tuto chvíli povoleno." unapproved_register_programs: "Vaše role nemá právo zapisovat si programy." + register_programs_allowed_after_payment: "Zápis programů je možný až po zaplacení." mandatory_programs_not_registered: "Máte nepřihlášené povinné programy (v kalendáři červeně). Prosíme, zapište si je." category: "Kategorie" lector: "Lektor"