X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=application%2Fshipsimu%2Ftemplates%2Fde%2Fcode%2Fgovernment_failed_main.ctp;fp=application%2Fshipsimu%2Ftemplates%2Fde%2Fcode%2Fgovernment_failed_main.ctp;h=b07313280524ae863c7dab0d7fd4b64e0d38621d;hp=0000000000000000000000000000000000000000;hb=02a6b02f96d2193d2161e70477bf8f18a199389f;hpb=4f70843ae8428f051d70ccff5bb43fc4c03dda8d diff --git a/application/shipsimu/templates/de/code/government_failed_main.ctp b/application/shipsimu/templates/de/code/government_failed_main.ctp new file mode 100644 index 0000000..b073132 --- /dev/null +++ b/application/shipsimu/templates/de/code/government_failed_main.ctp @@ -0,0 +1,106 @@ +prefetchValueInstance('user'); + +// Assign fields with template variables +$blockInstance->assignField('username'); +$blockInstance->assignFieldWithFilter('user_status', "user_status_translator"); + +// Shall we include registration date? +if ($blockInstance->ifIncludeRegistrationStamp()) { + // Then assign it as well! + $blockInstance->assignFieldWithFilter('registered', 'formatTimestamp'); +} // END - if + +// Flush the content out to a template variable +$blockInstance->flushContent(); + +////////////////////////////////////// +// Assign the shipping company data // +////////////////////////////////////// + +// Get a new instance for personal data +$blockInstance = ObjectFactory::createObjectByConfiguredName('web_block_helper', array($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' , "company_overview"); + $blockInstance->assignMessageField('company', "link_text_company_overview"); + $blockInstance->assignMessageField('company_title', "link_title_company_overview"); +} elseif ($blockInstance->getValueInstance()->ifUserIsOwner()) { + // User owns the company + $blockInstance->assignMessageField('company_status', "user_is_company_owner"); + $blockInstance->assignLinkFieldWithAction('company' , "company_overview"); + $blockInstance->assignMessageField('company', "link_text_company_overview"); + $blockInstance->assignMessageField('company_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' , "employee_overview"); + $blockInstance->assignMessageField('company', "link_text_employee_overview"); + $blockInstance->assignMessageField('company_title', "link_title_employee_overview"); +} else { + // No company participation! + $blockInstance->assignMessageField('company_status', "user_not_assigned_company"); + $blockInstance->assignLinkFieldWithAction('company' , "company"); + $blockInstance->assignMessageField('company', "link_text_company"); + $blockInstance->assignMessageField('company_title', "link_title_company"); +} + +// Flush the content out to a template variable +$blockInstance->flushContent(); + +// Get helper instance +$linkInstance = ObjectFactory::createObjectByConfiguredName('web_link_helper', array($this, 'logout')); + +// Add action +$linkInstance->addActionLinkById('logout', 'logout'); + +// Flush the content +$linkInstance->flushContent(); + +// [EOC] +?> +
+ Willkommen zum Staat in {?app_full_name?}! +
+ +
+ {?government_failed_content?} +
+ +
+
+ Account-Infos: +
+ +
+ {?persona_data?} +
+ +
+ {?logout?} +
+
+ +
+
+ Reederei-Infos: +
+ +
+ {?company_data?} +
+