]> git.mxchange.org Git - city.git/blob - application/city/templates/code/login_main.ctp
Continued:
[city.git] / application / city / templates / code / login_main.ctp
1 <?php
2 // Import framework stuff
3 use Org\Mxchange\CoreFramework\Factory\ObjectFactory;
4
5 ///////////////////////////////
6 // Assign personal user data //
7 ///////////////////////////////
8
9 // Get a new instance for personal data
10 $blockInstance = ObjectFactory::createObjectByConfiguredName('html_block_helper_class', array($this, 'persona_data'));
11
12 // Set the data source instance which must exist in registry
13 $blockInstance->prefetchValueInstance('user', 'user_points');
14
15 // Assign fields with template variables
16 $blockInstance->assignField('username');
17 $blockInstance->assignFieldWithFilter('user_status', 'user_status_translator');
18 $blockInstance->assignFieldWithFilter('points', 'format_number');
19
20 // Shall we include registration date?
21 if ($blockInstance->ifIncludeRegistrationStamp()) {
22         // Then assign it as well!
23         $blockInstance->assignFieldWithFilter('registered', 'format_timestamp');
24 } // END - if
25
26 // Flush the content out to a template variable
27 $blockInstance->flushContent();
28
29 // Get helper instance
30 $linkInstance = ObjectFactory::createObjectByConfiguredName('html_link_helper_class', array($this, 'logout'));
31
32 // Add action
33 $linkInstance->addActionLinkById('logout', 'logout');
34
35 // Flush the content
36 $linkInstance->flushContent();
37
38 // [EOC]
39 ?>
40 <div id="content_header">
41         Willkommen im Loginbereich von <span class="app_name">{?app_full_name?}</span>!
42 </div>
43
44 <div id="content_body">
45         {?login_content?}
46 </div>
47
48 <div id="persona_data" title="Informationen zu Deinem Spieleaccount">
49         <div id="persona_header">
50                 Account-Infos:
51         </div>
52
53         <div id="persona_body">
54                 {?persona_data?}
55         </div>
56
57         <div id="logout">
58                 {?logout?}
59         </div>
60 </div>