Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

informacni text pri nezaplaceni #359

Merged
merged 1 commit into from
Oct 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/WebModule/components/ProgramsContentControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
4 changes: 4 additions & 0 deletions app/WebModule/components/templates/programs_content.latte
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
<div class="alert alert-warning alert-forever">
{_web.programs_content.register_programs_not_allowed}
</div>
{elseif $userWaitingForPayment}
<div class="alert alert-warning alert-forever">
{_web.programs_content.register_programs_allowed_after_payment}
</div>
{/if}

{var $userAllowedRegisterPrograms = $registerProgramsAllowed && $userHasPermission}
Expand Down
1 change: 1 addition & 0 deletions app/lang/web.cs_CZ.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down