]> git.mxchange.org Git - shipsimu.git/blobdiff - application/shoutbox/templates/de/code/login_main.ctp
A lot rewrites and fixes for weak redirect methods
[shipsimu.git] / application / shoutbox / templates / de / code / login_main.ctp
index df6c2ba1eab660da21d1b83d1a240010ac8ed48b..abeacc7c718d0c3d56669d10aa68890221141c72 100644 (file)
@@ -4,7 +4,7 @@
 ///////////////////////////////
 
 // Get a new instance for personal data
-$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'persona_data');
+$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($this, 'persona_data'));
 
 // Set the data source instance which must exist in registry
 $blockInstance->prefetchValueInstance('user');
@@ -22,48 +22,8 @@ if ($blockInstance->ifIncludeRegistrationStamp()) {
 // Flush the content out to a template variable
 $blockInstance->flushContent();
 
-//////////////////////////////////////
-// Assign the shipping company data //
-//////////////////////////////////////
-
-// Get a new instance for personal data
-$blockInstance = WebBlockHelper::createWebBlockHelper($this, 'company_data');
-
-// Set the data source instance
-$blockInstance->prefetchValueInstance('company', 'user');
-
-// Assign the company name
-if ($blockInstance->getValueInstance()->ifUserIsFounder()) {
-       // User is the founder of the company
-       $blockInstance->assignMessageField('company_status', "user_is_company_founder");
-       $blockInstance->assignLinkFieldWithAction('company_link' , "company_overview");
-       $blockInstance->assignMessageField('company_link_text', "link_text_company_overview");
-       $blockInstance->assignMessageField('company_link_title', "link_title_company_overview");
-} elseif ($blockInstance->getValueInstance()->ifUserIsOwner()) {
-       // User owns the company
-       $blockInstance->assignMessageField('company_status', "user_is_company_owner");
-       $blockInstance->assignLinkFieldWithAction('company_link' , "company_overview");
-       $blockInstance->assignMessageField('company_link_text', "link_text_company_overview");
-       $blockInstance->assignMessageField('company_link_title', "link_title_company_overview");
-} elseif ($blockInstance->getValueInstance()->ifUserIsEmployee()) {
-       // User is employed in company
-       $blockInstance->assignMessageField('company_status', "user_is_employed_in_company");
-       $blockInstance->assignLinkFieldWithAction('company_link' , "employee_overview");
-       $blockInstance->assignMessageField('company_link_text', "link_text_employee_overview");
-       $blockInstance->assignMessageField('company_link_title', "link_title_employee_overview");
-} else {
-       // No company participation!
-       $blockInstance->assignMessageField('company_status', "user_not_assigned_company");
-       $blockInstance->assignLinkFieldWithAction('company_link' , "company");
-       $blockInstance->assignMessageField('company_link_text', "link_text_company");
-       $blockInstance->assignMessageField('company_link_title', "link_title_company");
-}
-
-// Flush the content out to a template variable
-$blockInstance->flushContent();
-
 // Get helper instance
-$helper = WebLinkHelper::createWebLinkHelper($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area');
+$helper = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout_action_link', 'index.php?app={?app_short_name?}&page=login_area'));
 
 // Add action
 $helper->addActionLink('logout', "Ausloggen");
@@ -71,10 +31,10 @@ $helper->addActionLink('logout', "Ausloggen");
 // Flush the content
 $helper->flushContent();
 
-// End of all PHP commands
+// [EOC]
 ?>
 <div id="content_header">
-       Willkommen im Loginbereich  von {?app_full_name?}!
+       Willkommen im Loginbereich  von <span class=\"app_name\">{?app_full_name?}</span>!
 </div>
 
 <div id="content_body">