From 3ddd6c2a5beed917cd66fb6f638cafbf5b37ed6e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 30 Jun 2008 20:24:58 +0000 Subject: [PATCH] Login area - company page now with more stubs --- .../web/class_WebLoginCompanyAction.php | 3 +- .../de/code/action_login_company.ctp | 41 +++++++++++++++++-- .../templates/de/code/block_persona_data.ctp | 2 +- 3 files changed, 41 insertions(+), 5 deletions(-) diff --git a/application/ship-simu/main/actions/web/class_WebLoginCompanyAction.php b/application/ship-simu/main/actions/web/class_WebLoginCompanyAction.php index f3ffdcd..30c6376 100644 --- a/application/ship-simu/main/actions/web/class_WebLoginCompanyAction.php +++ b/application/ship-simu/main/actions/web/class_WebLoginCompanyAction.php @@ -61,9 +61,10 @@ class WebLoginCompanyAction extends BaseAction implements Commandable, Registera * @param $requestInstance An instance of a class with an Requestable interface * @param $responseInstance An instance of a class with an Responseable interface * @return void + * @todo Maybe add fetching company list of current user here? */ public function execute (Requestable $requestInstance, Responseable $responseInstance) { - $this->partialStub("Maybe add fetching company list here."); + // Unfinished method } /** diff --git a/application/ship-simu/templates/de/code/action_login_company.ctp b/application/ship-simu/templates/de/code/action_login_company.ctp index a00b8cc..2747805 100644 --- a/application/ship-simu/templates/de/code/action_login_company.ctp +++ b/application/ship-simu/templates/de/code/action_login_company.ctp @@ -1,3 +1,40 @@ +prefetchValueInstance('user'); + +// Maximum of allowed companies reached? +if ($linkInstance->getValueInstance()->ifUserCreatedMaximumAllowedCompanies()) { + // No more companies allowed to create +} elseif ($linkInstance->getValueInstance()->ifUserPointsEnougth('found_new_company')) { + // Enough money to found company +} elseif ($linkInstance->getValueInstance()->ifUserPointsEnougth('write_applications')) { + // Enough money to write applications to other companies +} elseif ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) { + // Display link to goverment for startup help +} // END - if + +if ($linkInstance->getValueInstance()->ifUserAllowTakeCreditsFromMoneyBank()) { + // Display link to money bank page +} elseif ($linkInstance->getValueInstance()->ifUserHasMaximumCreditsWithMoneyBank()) { + // Maximum credits reached which a money bank can lent +} else { + // Money bank is closed! +} + +if ($linkInstance->getValueInstance()->ifRefillPageActive()) { + // Display link to refill page +} else { + // Refill page not active +} + +// Flush content to the template +$linkInstance->flushContent(); + +// End of PHP commands +?>
Auflistung der Reedereien, an denenen du dich beteiligst:
@@ -7,7 +44,5 @@ diff --git a/application/ship-simu/templates/de/code/block_persona_data.ctp b/application/ship-simu/templates/de/code/block_persona_data.ctp index f51077b..b12393f 100644 --- a/application/ship-simu/templates/de/code/block_persona_data.ctp +++ b/application/ship-simu/templates/de/code/block_persona_data.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); -- 2.39.2