From 7218cb584f42412c13d8ae39b89c82a584a85b31 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 22 Nov 2008 01:51:01 +0000 Subject: [PATCH] Typo in 'goverment' fixed ('government' is correct) --- .gitattributes | 31 +++-- application/ship-simu/config.php | 10 +- ...pSimuLoginGovernmentStartupHelpAction.php} | 0 ...ShipSimuLoginGovernmentTrainingAction.php} | 0 .../web/{goverment => government}/.htaccess | 0 ...ass_WebGovernmentFailedStartupCommand.php} | 0 ...s_WebShipsimuGovernmentStartupCommand.php} | 0 ...> class_WebGovernmentFailedController.php} | 0 .../{goverment => government}/.htaccess | 0 ...ipSimuGovernmentPaysStartupHelpFilter.php} | 0 ..._ShipSimuGovernmentPaysTrainingFilter.php} | 0 .../main/{goverment => government}/.htaccess | 0 .../class_SimplifiedGoverment.php | 0 .../government/class_SimplifiedGovernment.php | 129 ++++++++++++++++++ ...ss_WebGovernmentFailedCommandResolver.php} | 0 .../main/user/class_ShipSimuBaseUser.php | 8 +- ...> class_UserGovernmentDatabaseWrapper.php} | 0 .../code/action_ship_simu_login_company.ctp | 30 ++-- ...ip_simu_login_government_startup_help.ctp} | 10 +- ...n_ship_simu_login_government_training.ctp} | 10 +- 20 files changed, 179 insertions(+), 49 deletions(-) rename application/ship-simu/main/actions/web/{class_WebShipSimuLoginGovermentStartupHelpAction.php => class_WebShipSimuLoginGovernmentStartupHelpAction.php} (100%) rename application/ship-simu/main/actions/web/{class_WebShipSimuLoginGovermentTrainingAction.php => class_WebShipSimuLoginGovernmentTrainingAction.php} (100%) rename application/ship-simu/main/commands/web/{goverment => government}/.htaccess (100%) rename application/ship-simu/main/commands/web/{goverment/class_WebGovermentFailedStartupCommand.php => government/class_WebGovernmentFailedStartupCommand.php} (100%) rename application/ship-simu/main/commands/web/{goverment/class_WebShipsimuGovermentStartupCommand.php => government/class_WebShipsimuGovernmentStartupCommand.php} (100%) rename application/ship-simu/main/controller/web/{class_WebGovermentFailedController.php => class_WebGovernmentFailedController.php} (100%) rename application/ship-simu/main/filter/{goverment => government}/.htaccess (100%) rename application/ship-simu/main/filter/{goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php => government/class_ShipSimuGovernmentPaysStartupHelpFilter.php} (100%) rename application/ship-simu/main/filter/{goverment/class_ShipSimuGovermentPaysTrainingFilter.php => government/class_ShipSimuGovernmentPaysTrainingFilter.php} (100%) rename application/ship-simu/main/{goverment => government}/.htaccess (100%) rename application/ship-simu/main/{goverment => government}/class_SimplifiedGoverment.php (100%) create mode 100644 application/ship-simu/main/government/class_SimplifiedGovernment.php rename application/ship-simu/main/resolver/web/{class_WebGovermentFailedCommandResolver.php => class_WebGovernmentFailedCommandResolver.php} (100%) rename application/ship-simu/main/wrapper/{class_UserGovermentDatabaseWrapper.php => class_UserGovernmentDatabaseWrapper.php} (100%) rename application/ship-simu/templates/de/code/{action_ship_simu_login_goverment_startup_help.ctp => action_ship_simu_login_government_startup_help.ctp} (94%) rename application/ship-simu/templates/de/code/{action_ship_simu_login_goverment_training.ctp => action_ship_simu_login_government_training.ctp} (92%) diff --git a/.gitattributes b/.gitattributes index 981df5d..a2bece5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -69,8 +69,8 @@ application/ship-simu/main/actions/ship-simu/class_ShipSimuProfileAction.php -te application/ship-simu/main/actions/web/.htaccess -text application/ship-simu/main/actions/web/class_WebShipSimuLogin -text application/ship-simu/main/actions/web/class_WebShipSimuLoginCompanyAction.php -text -application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentStartupHelpAction.php -text -application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentTrainingAction.php -text +application/ship-simu/main/actions/web/class_WebShipSimuLoginGovernmentStartupHelpAction.php -text +application/ship-simu/main/actions/web/class_WebShipSimuLoginGovernmentTrainingAction.php -text application/ship-simu/main/actions/web/class_WebShipSimuLoginLogoutAction.php -text application/ship-simu/main/actions/web/class_WebShipSimuLoginProfileAction.php -text application/ship-simu/main/actions/web/class_WebShipSimuLoginRefillAction.php -text @@ -89,9 +89,9 @@ application/ship-simu/main/commands/web/class_WebShipsimuGuestLoginCommand.php - application/ship-simu/main/commands/web/class_WebShipsimuProfileCommand.php -text application/ship-simu/main/commands/web/class_WebShipsimuRegisterCommand.php -text application/ship-simu/main/commands/web/class_WebShipsimuUserLoginCommand.php -text -application/ship-simu/main/commands/web/goverment/.htaccess -text -application/ship-simu/main/commands/web/goverment/class_WebGovermentFailedStartupCommand.php -text -application/ship-simu/main/commands/web/goverment/class_WebShipsimuGovermentStartupCommand.php -text +application/ship-simu/main/commands/web/government/.htaccess -text +application/ship-simu/main/commands/web/government/class_WebGovernmentFailedStartupCommand.php -text +application/ship-simu/main/commands/web/government/class_WebShipsimuGovernmentStartupCommand.php -text application/ship-simu/main/companies/.htaccess -text application/ship-simu/main/companies/class_ShippingCompany.php -text application/ship-simu/main/constructions/.htaccess -text @@ -108,7 +108,7 @@ application/ship-simu/main/constructions/yards/.htaccess -text application/ship-simu/main/constructions/yards/class_Shipyard.php -text application/ship-simu/main/controller/.htaccess -text application/ship-simu/main/controller/web/.htaccess -text -application/ship-simu/main/controller/web/class_WebGovermentFailedController.php -text +application/ship-simu/main/controller/web/class_WebGovernmentFailedController.php -text application/ship-simu/main/drives/.htaccess -text application/ship-simu/main/drives/class_BaseDrive.php -text application/ship-simu/main/drives/motor/.htaccess -text @@ -118,17 +118,18 @@ application/ship-simu/main/factories/class_ShipSimuWebNewsFactory.php -text application/ship-simu/main/filter/.htaccess -text application/ship-simu/main/filter/class_ -text application/ship-simu/main/filter/class_BaseShipSimuFilter.php -text -application/ship-simu/main/filter/goverment/.htaccess -text -application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php -text -application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php -text +application/ship-simu/main/filter/government/.htaccess -text +application/ship-simu/main/filter/government/class_ShipSimuGovernmentPaysStartupHelpFilter.php -text +application/ship-simu/main/filter/government/class_ShipSimuGovernmentPaysTrainingFilter.php -text application/ship-simu/main/filter/page/.htaccess -text application/ship-simu/main/filter/page/class_RefillPageFilter.php -text application/ship-simu/main/filter/validator/.htaccess -text application/ship-simu/main/filter/validator/class_RefillRequestValidatorFilter.php -text application/ship-simu/main/filter/verifier/.htaccess -text application/ship-simu/main/filter/verifier/class_BirthdayVerifierFilter.php -text -application/ship-simu/main/goverment/.htaccess -text -application/ship-simu/main/goverment/class_SimplifiedGoverment.php -text +application/ship-simu/main/government/.htaccess -text +application/ship-simu/main/government/class_SimplifiedGoverment.php -text +application/ship-simu/main/government/class_SimplifiedGovernment.php -text application/ship-simu/main/login/.htaccess -text application/ship-simu/main/login/class_ShipSimuGuestLogin.php -text application/ship-simu/main/login/class_ShipSimuUserLogin.php -text @@ -146,7 +147,7 @@ application/ship-simu/main/registration/.htaccess -text application/ship-simu/main/registration/class_ShipSimuRegistration.php -text application/ship-simu/main/resolver/.htaccess -text application/ship-simu/main/resolver/web/.htaccess -text -application/ship-simu/main/resolver/web/class_WebGovermentFailedCommandResolver.php -text +application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php -text application/ship-simu/main/ships/.htaccess -text application/ship-simu/main/ships/class_BaseShip.php -text application/ship-simu/main/ships/passenger/.htaccess -text @@ -181,13 +182,13 @@ application/ship-simu/main/user/extended/class_ShipSimuGuest.php -text application/ship-simu/main/user/extended/class_ShipSimuMember.php -text application/ship-simu/main/wrapper/.htaccess -text application/ship-simu/main/wrapper/class_CompanyDatabaseWrapper.php -text -application/ship-simu/main/wrapper/class_UserGovermentDatabaseWrapper.php -text +application/ship-simu/main/wrapper/class_UserGovernmentDatabaseWrapper.php -text application/ship-simu/starter.php -text application/ship-simu/templates/.htaccess -text application/ship-simu/templates/de/.htaccess -text application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp -text -application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp -text -application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp -text +application/ship-simu/templates/de/code/action_ship_simu_login_government_startup_help.ctp -text +application/ship-simu/templates/de/code/action_ship_simu_login_government_training.ctp -text application/ship-simu/templates/de/code/action_ship_simu_login_logout.ctp -text application/ship-simu/templates/de/code/action_ship_simu_login_profile.ctp -text application/ship-simu/templates/de/code/action_ship_simu_login_refill.ctp -text diff --git a/application/ship-simu/config.php b/application/ship-simu/config.php index 363d863..f21e299 100644 --- a/application/ship-simu/config.php +++ b/application/ship-simu/config.php @@ -215,10 +215,10 @@ $cfg->setConfigEntry('refill_request_currency_book_filter', "RefillRequestCurren $cfg->setConfigEntry('payment_discovery_filter', "PaymentDiscoveryFilter"); // CFG: GOVERMENT-PAYS-TRAINING-FILTER -$cfg->setConfigEntry('goverment_pays_training_filter', "ShipSimuGovermentPaysTrainingFilter"); +$cfg->setConfigEntry('goverment_pays_training_filter', "ShipSimuGovernmentPaysTrainingFilter"); // CFG: GOVERMENT-PAYS-STARTUP-HELP-FILTER -$cfg->setConfigEntry('goverment_pays_startup_help_filter', "ShipSimuGovermentPaysStartupHelpFilter"); +$cfg->setConfigEntry('goverment_pays_startup_help_filter', "ShipSimuGovernmentPaysStartupHelpFilter"); // CFG: NEWS-HOME-LIMIT $cfg->setConfigEntry('news_home_limit', 10); @@ -329,7 +329,7 @@ $cfg->setConfigEntry('company_db_wrapper_class', "CompanyDatabaseWrapper"); $cfg->setConfigEntry('user_points_db_wrapper_class', "UserPointsDatabaseWrapper"); // CFG: USER-GOVERMENT-WRAPPER-CLASS -$cfg->setConfigEntry('user_gov_wrapper_class', "UserGovermentDatabaseWrapper"); +$cfg->setConfigEntry('user_gov_wrapper_class', "UserGovernmentDatabaseWrapper"); // CFG: PAYMENT-DB-WRAPPER-CLASS $cfg->setConfigEntry('payment_db_wrapper_class', "PaymentsDatabaseWrapper"); @@ -365,7 +365,7 @@ $cfg->setConfigEntry('write_applications_action_points', 10000); $cfg->setConfigEntry('user_ppints_class', "UserPoints"); // CFG: GOVERMENT-CLASS -$cfg->setConfigEntry('goverment_class', "SimplifiedGoverment"); +$cfg->setConfigEntry('goverment_class', "SimplifiedGovernment"); // CFG: BANK-CLASS $cfg->setConfigEntry('bank_class', "MoneyBank"); @@ -392,7 +392,7 @@ $cfg->setConfigEntry('web_form_helper', "WebFormHelper"); $cfg->setConfigEntry('web_link_helper', "WebLinkHelper"); // CFG: WEB-CMD-GOVERMENT-FAILED-RESOLVER-CLASS -$cfg->setConfigEntry('web_cmd_goverment_failed_resolver_class', "WebGovermentFailedCommandResolver"); +$cfg->setConfigEntry('web_cmd_goverment_failed_resolver_class', "WebGovernmentFailedCommandResolver"); // [EOF] ?> diff --git a/application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentStartupHelpAction.php b/application/ship-simu/main/actions/web/class_WebShipSimuLoginGovernmentStartupHelpAction.php similarity index 100% rename from application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentStartupHelpAction.php rename to application/ship-simu/main/actions/web/class_WebShipSimuLoginGovernmentStartupHelpAction.php diff --git a/application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentTrainingAction.php b/application/ship-simu/main/actions/web/class_WebShipSimuLoginGovernmentTrainingAction.php similarity index 100% rename from application/ship-simu/main/actions/web/class_WebShipSimuLoginGovermentTrainingAction.php rename to application/ship-simu/main/actions/web/class_WebShipSimuLoginGovernmentTrainingAction.php diff --git a/application/ship-simu/main/commands/web/goverment/.htaccess b/application/ship-simu/main/commands/web/government/.htaccess similarity index 100% rename from application/ship-simu/main/commands/web/goverment/.htaccess rename to application/ship-simu/main/commands/web/government/.htaccess diff --git a/application/ship-simu/main/commands/web/goverment/class_WebGovermentFailedStartupCommand.php b/application/ship-simu/main/commands/web/government/class_WebGovernmentFailedStartupCommand.php similarity index 100% rename from application/ship-simu/main/commands/web/goverment/class_WebGovermentFailedStartupCommand.php rename to application/ship-simu/main/commands/web/government/class_WebGovernmentFailedStartupCommand.php diff --git a/application/ship-simu/main/commands/web/goverment/class_WebShipsimuGovermentStartupCommand.php b/application/ship-simu/main/commands/web/government/class_WebShipsimuGovernmentStartupCommand.php similarity index 100% rename from application/ship-simu/main/commands/web/goverment/class_WebShipsimuGovermentStartupCommand.php rename to application/ship-simu/main/commands/web/government/class_WebShipsimuGovernmentStartupCommand.php diff --git a/application/ship-simu/main/controller/web/class_WebGovermentFailedController.php b/application/ship-simu/main/controller/web/class_WebGovernmentFailedController.php similarity index 100% rename from application/ship-simu/main/controller/web/class_WebGovermentFailedController.php rename to application/ship-simu/main/controller/web/class_WebGovernmentFailedController.php diff --git a/application/ship-simu/main/filter/goverment/.htaccess b/application/ship-simu/main/filter/government/.htaccess similarity index 100% rename from application/ship-simu/main/filter/goverment/.htaccess rename to application/ship-simu/main/filter/government/.htaccess diff --git a/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php b/application/ship-simu/main/filter/government/class_ShipSimuGovernmentPaysStartupHelpFilter.php similarity index 100% rename from application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysStartupHelpFilter.php rename to application/ship-simu/main/filter/government/class_ShipSimuGovernmentPaysStartupHelpFilter.php diff --git a/application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php b/application/ship-simu/main/filter/government/class_ShipSimuGovernmentPaysTrainingFilter.php similarity index 100% rename from application/ship-simu/main/filter/goverment/class_ShipSimuGovermentPaysTrainingFilter.php rename to application/ship-simu/main/filter/government/class_ShipSimuGovernmentPaysTrainingFilter.php diff --git a/application/ship-simu/main/goverment/.htaccess b/application/ship-simu/main/government/.htaccess similarity index 100% rename from application/ship-simu/main/goverment/.htaccess rename to application/ship-simu/main/government/.htaccess diff --git a/application/ship-simu/main/goverment/class_SimplifiedGoverment.php b/application/ship-simu/main/government/class_SimplifiedGoverment.php similarity index 100% rename from application/ship-simu/main/goverment/class_SimplifiedGoverment.php rename to application/ship-simu/main/government/class_SimplifiedGoverment.php diff --git a/application/ship-simu/main/government/class_SimplifiedGovernment.php b/application/ship-simu/main/government/class_SimplifiedGovernment.php new file mode 100644 index 0000000..fc27510 --- /dev/null +++ b/application/ship-simu/main/government/class_SimplifiedGovernment.php @@ -0,0 +1,129 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * @todo Find an interface for goverments + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class SimplifiedGovernment extends BaseFrameworkSystem implements Registerable { + // Constants + const STATUS_STARTER_HELP = "STARTER_HELP"; + + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + + // Clean up a little + $this->removeSystemArray(); + $this->removeNumberFormaters(); + } + + /** + * Creates an instance of this goverment class by given user instance + * + * @param $userInstance The user instance + * @return $govermentInstance Instance of the prepared goverment instance + */ + public final static function createSimplifiedGovernment (ManageableAccount $userInstance) { + // Get a new instance + $govermentInstance = new SimplifiedGovernment(); + + // Set the user instance + $govermentInstance->setUserInstance($userInstance); + + // Return the prepared instance + return $govermentInstance; + } + + /** + * Checks wether the goverment has already payed a training course for te + * current user + * + * @return $alreadyPayed Wether the goverment has already payed + */ + public function ifGovernmentAlreadyPayedTraining () { + // Default is not payed + $alreadyPayed = false; + + // Now get a search criteria and set the user's name as criteria + $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class'); + $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId()); + $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP); + $criteriaInstance->setLimit(1); + + // Get a wrapper instance + $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class'); + + // Get result back + $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance); + + // Was the query fine? + if ($resultInstance->getAffectedRows() === 1) { + // Entry was found so the goverment can no more pay a training + $alreadyPayed = true; + } // END - if + + // Return the result + return $alreadyPayed; + } + + /** + * Checks wether the goverment has payed maximum of startup helps to the + * current user + * + * @return $maximumPayed Wether the goverment has already payed + */ + public function ifGovernmentPayedMaxmimumStartupHelp () { + // Default is not payed + $maximumPayed = false; + + // Cache startup help limit + $helpLimit = $this->getConfigInstance()->readConfig('goverment_startup_help_limit'); + + // Now get a search criteria and set the user's name as criteria + $criteriaInstance = ObjectFactory::createObjectByConfiguredName('search_criteria_class'); + $criteriaInstance->addCriteria("gov_uid", $this->getUserInstance()->getUserId()); + $criteriaInstance->addCriteria("gov_activity_status", self::STATUS_STARTER_HELP); + $criteriaInstance->setLimit($helpLimit); + + // Get a wrapper instance + $wrapperInstance = ObjectFactory::createObjectByConfiguredName('user_gov_wrapper_class'); + + // Get result back + $resultInstance = $wrapperInstance->doSelectByCriteria($criteriaInstance); + + // Was the query fine? + if ($resultInstance->getAffectedRows() === $helpLimit) { + // Entry found, so lets have a look if this goverment wants to again... + $maximumPayed = true; + } // END - if + + // Return the result + return $maximumPayed; + } +} + +// [EOF] +?> diff --git a/application/ship-simu/main/resolver/web/class_WebGovermentFailedCommandResolver.php b/application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php similarity index 100% rename from application/ship-simu/main/resolver/web/class_WebGovermentFailedCommandResolver.php rename to application/ship-simu/main/resolver/web/class_WebGovernmentFailedCommandResolver.php diff --git a/application/ship-simu/main/user/class_ShipSimuBaseUser.php b/application/ship-simu/main/user/class_ShipSimuBaseUser.php index 63c9b8d..243218a 100644 --- a/application/ship-simu/main/user/class_ShipSimuBaseUser.php +++ b/application/ship-simu/main/user/class_ShipSimuBaseUser.php @@ -94,7 +94,7 @@ class ShipSimuBaseUser extends BaseUser implements Registerable, Updateable { * * @return $ifGovHelps Wether if goverment helps the user with a virtual training course */ - public function ifGovermentPaysTraining () { + public function ifGovernmentPaysTraining () { // By default they want to help. $ifGovHelps = true; @@ -111,7 +111,7 @@ class ShipSimuBaseUser extends BaseUser implements Registerable, Updateable { } // END - if // Then ask the goverment if they want to pay a "startup help" to the user - if ($govermentInstance->ifGovermentAlreadyPayedTraining()) { + if ($govermentInstance->ifGovernmentAlreadyPayedTraining()) { // Training already given! $ifGovHelps = false; } // END - if @@ -125,7 +125,7 @@ class ShipSimuBaseUser extends BaseUser implements Registerable, Updateable { * * @return $ifGovHelps Wether if goverment helps the user with some startup money */ - public function ifGovermentPaysStartupHelp () { + public function ifGovernmentPaysStartupHelp () { // By default they want to help. $ifGovHelps = true; @@ -142,7 +142,7 @@ class ShipSimuBaseUser extends BaseUser implements Registerable, Updateable { } // END - if // Then ask the goverment if they want to pay a "startup help" to the user - if ($govermentInstance->ifGovermentPayedMaxmimumStartupHelp()) { + if ($govermentInstance->ifGovernmentPayedMaxmimumStartupHelp()) { // They can't pay anymore to the user (excited amount) $ifGovHelps = false; } // END - if diff --git a/application/ship-simu/main/wrapper/class_UserGovermentDatabaseWrapper.php b/application/ship-simu/main/wrapper/class_UserGovernmentDatabaseWrapper.php similarity index 100% rename from application/ship-simu/main/wrapper/class_UserGovermentDatabaseWrapper.php rename to application/ship-simu/main/wrapper/class_UserGovernmentDatabaseWrapper.php diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp index 8197cdf..428e298 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_company.ctp @@ -17,30 +17,30 @@ if ($linkInstance->getValueInstance()->ifUserCreatedMaximumAllowedCompanies()) { $linkInstance->addActionLink('company_found', "Gründe eine virtuelle Firma und mache dich (virtuell) selbstständig."); } -// Add link group for goverment -$linkInstance->addLinkGroup('goverment', "Bewerbe dich bei anderen Firmen und hole dir eine Starthilfe vom virtuellen Staat ab wenn du nicht flüssig bist!"); +// Add link group for government +$linkInstance->addLinkGroup('government', "Bewerbe dich bei anderen Firmen und hole dir eine Starthilfe vom virtuellen Staat ab wenn du nicht flüssig bist!"); if ($linkInstance->getValueInstance()->ifUserHasRequiredPoints('write_applications')) { // Enough money to write applications to other companies $linkInstance->addActionLink('company_list', "Alle Firmen auflisten zum Bewerben."); -} elseif ($linkInstance->getValueInstance()->ifGovermentPaysTraining()) { - // Goverment is able to pay a training in general - $linkInstance->addActionLink('goverment_training', "Jetzt zur virtuellen Kurswelt und ein Training auswählen."); +} elseif ($linkInstance->getValueInstance()->ifGovernmentPaysTraining()) { + // Government is able to pay a training in general + $linkInstance->addActionLink('government_training', "Jetzt zur virtuellen Kurswelt und ein Training auswählen."); - // Can the goverment pay startup help? - if ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) { + // Can the government pay startup help? + if ($linkInstance->getValueInstance()->ifGovernmentPaysStartupHelp()) { // Add link note - $linkInstance->addLinkNote('goverment_startup_help', "Virtuelle Starthilfe beantragen:"); + $linkInstance->addLinkNote('government_startup_help', "Virtuelle Starthilfe beantragen:"); - // Display link to goverment for startup help - $linkInstance->addActionLink('goverment_startup_help', "Direkt zum Antragsformular für deine Starthilfe."); + // Display link to government for startup help + $linkInstance->addActionLink('government_startup_help', "Direkt zum Antragsformular für deine Starthilfe."); } // END - if -} elseif ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) { - // Display link to goverment for startup help - $linkInstance->addActionLink('goverment_startup_help', "Direkt zum Antragsformular für deine Starthilfe."); +} elseif ($linkInstance->getValueInstance()->ifGovernmentPaysStartupHelp()) { + // Display link to government for startup help + $linkInstance->addActionLink('government_startup_help', "Direkt zum Antragsformular für deine Starthilfe."); } else { - // Even goverment cannot help the gamer here - $linkInstance->addLinkNote('goverment_depleted', "Leider kann dir der Staat nicht mehr weiterhelfen, dich zu bewerben, da du zu oft Starthilfen erhalten hast oder ein Training absolviert hast. Hier muss aber noch weiter am Spiel gearbeitet werden. :-)"); + // Even government cannot help the gamer here + $linkInstance->addLinkNote('government_depleted', "Leider kann dir der Staat nicht mehr weiterhelfen, dich zu bewerben, da du zu oft Starthilfen erhalten hast oder ein Training absolviert hast. Hier muss aber noch weiter am Spiel gearbeitet werden. :-)"); } // Add link group for money bank diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_government_startup_help.ctp similarity index 94% rename from application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp rename to application/ship-simu/templates/de/code/action_ship_simu_login_government_startup_help.ctp index 1b6443e..63a6118 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_startup_help.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_government_startup_help.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); @@ -51,12 +51,12 @@ $linkInstance->flushContent(); // [EOC] ?> -
-
+
+
Virtuelle Beantragung von Starthilfe
-
- {?shipsimu_goverment_startup?} +
+ {?shipsimu_government_startup?}
diff --git a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp b/application/ship-simu/templates/de/code/action_ship_simu_login_government_training.ctp similarity index 92% rename from application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp rename to application/ship-simu/templates/de/code/action_ship_simu_login_government_training.ctp index a103b9d..cda3466 100644 --- a/application/ship-simu/templates/de/code/action_ship_simu_login_goverment_training.ctp +++ b/application/ship-simu/templates/de/code/action_ship_simu_login_government_training.ctp @@ -1,6 +1,6 @@ prefetchValueInstance('user'); @@ -44,12 +44,12 @@ $linkInstance->flushContent(); // [EOC] ?> -
-
+
+
Virtuelle Beantragung eines Training-Kursus
-
- {?shipsimu_goverment_training?} +
+ {?shipsimu_government_training?}
-- 2.39.2