]> git.mxchange.org Git - shipsimu.git/blob - application/ship-simu/templates/de/code/login_main.ctp
More stubs added, code "made" generic:
[shipsimu.git] / application / ship-simu / templates / de / code / login_main.ctp
1 <?php
2 ///////////////////////////////
3 // Assign personal user data //
4 ///////////////////////////////
5
6 // Get a new instance for personal data
7 $blockInstance = WebBlockHelper::createWebBlockHelper($this, 'persona_data');
8
9 // Set the data source instance which must exist in registry
10 $blockInstance->prefetchValueInstance('user');
11
12 // Assign fields with template variables
13 $blockInstance->assignField('username');
14
15 // Shall we include registration date?
16 if ($blockInstance->ifIncludeRegistrationStamp()) {
17         // Then assign it as well!
18         $blockInstance->assignFieldWithFilter('registered', 'formatTimestamp');
19 } // END - if
20
21 // Flush the content out to a template variable
22 $blockInstance->flushContent();
23
24 //////////////////////////////////////
25 // Assign the shipping company data //
26 //////////////////////////////////////
27
28 // Get a new instance for personal data
29 $blockInstance = WebBlockHelper::createWebBlockHelper($this, 'company_data');
30
31 // Set the data source instance
32 $blockInstance->prefetchValueInstance('company', 'user');
33
34 // Assign the company name
35 if ($blockInstance->getValueInstance()->ifUserIsFounder()) {
36         // User is the founder of the company
37         $blockInstance->assignMessageField('company_stats', "user_is_company_founder");
38         $blockInstance->assignLinkFieldWithAction('company_link' , "company_overview");
39 } elseif ($blockInstance->getValueInstance()->ifUserIsOwner()) {
40         // User owns the company
41         $blockInstance->assignMessageField('company_stats', "user_is_company_owner");
42         $blockInstance->assignLinkFieldWithAction('company_link' , "company_overview");
43 } elseif ($blockInstance->getValueInstance()->ifUserIsEmployee()) {
44         // User is employed in company
45         $blockInstance->assignMessageField('company_stats', "user_is_employed_in_company");
46         $blockInstance->assignLinkFieldWithAction('company_link' , "employee_overview");
47 } else {
48         // No company participation!
49         $blockInstance->assignMessageField('company_stats', "user_not_assigned_company");
50         $blockInstance->assignLinkFieldWithAction('company_link' , "found_new_company");
51 }
52
53 // Flush the content out to a template variable
54 $blockInstance->flushContent();
55
56 // End of all PHP commands
57 ?>
58 <div id="content_header">
59         Willkommen im Loginbereich  von {?app_full_name?}!
60 </div>
61
62 <div id="content_body">
63         {?login_content?}
64 </div>
65
66 <div id="persona_data" title="Informationen zu Deinem Spieleaccount">
67         <div id="persona_header">
68                 Account-Infos:
69         </div>
70
71         <div id="persona_body">
72                 {?persona_data?}
73         </div>
74
75         <div id="logout_link">
76                 [<a href="$config[base_url]/index.php?app=ship-simu&amp;page=login_area&amp;action=logout"
77                  title="Aus dem Spiel ausloggen">Ausloggen</a>]
78         </div>
79 </div>
80
81 <div id="company_data" title="Informationen zu der aktuell ausgew&auml;hlten Reederei">
82         <div id="company_header">
83                 Reederei-Infos:
84         </div>
85
86         <div id="company_body">
87                 {?company_data?}
88         </div>
89 </div>