diff options
Diffstat (limited to 'demos/personal/protected')
-rw-r--r-- | demos/personal/protected/Pages/Layout.tpl | 2 | ||||
-rw-r--r-- | demos/personal/protected/Pages/Settings.page | 2 | ||||
-rw-r--r-- | demos/personal/protected/Pages/config.php | 16 | ||||
-rw-r--r-- | demos/personal/protected/application.php | 41 | ||||
-rw-r--r-- | demos/personal/protected/application.xml | 3 |
5 files changed, 62 insertions, 2 deletions
diff --git a/demos/personal/protected/Pages/Layout.tpl b/demos/personal/protected/Pages/Layout.tpl index 3ffb5306..d650a689 100644 --- a/demos/personal/protected/Pages/Layout.tpl +++ b/demos/personal/protected/Pages/Layout.tpl @@ -8,7 +8,7 @@ <div class="header">
<h1>Your Name Here</h1>
-<h2>My Personal Site</h2>
+<h2><%$siteName%></h2>
<div class="mainmenu">
<com:MainMenu />
diff --git a/demos/personal/protected/Pages/Settings.page b/demos/personal/protected/Pages/Settings.page index 48dfde96..f461fa13 100644 --- a/demos/personal/protected/Pages/Settings.page +++ b/demos/personal/protected/Pages/Settings.page @@ -1,4 +1,4 @@ -<com:TContent ID="main" >
+<com:TContent ID="content" >
Welcome, <com:TLabel Text=<%= $this->User->Name %> />!
This page contains site settings accessible only to site admin.
</com:TContent>
\ No newline at end of file diff --git a/demos/personal/protected/Pages/config.php b/demos/personal/protected/Pages/config.php new file mode 100644 index 00000000..7a42d866 --- /dev/null +++ b/demos/personal/protected/Pages/config.php @@ -0,0 +1,16 @@ +<?php +return array( + 'authorization' => array( + array( + 'action' => 'deny', + 'pages' => 'Settings', + 'users' => '?', + ), + ), + 'pages' => array( + 'properties' => array( + 'MasterClass' => 'Application.Pages.Layout', + 'Theme' => 'White', + ), + ), +);
\ No newline at end of file diff --git a/demos/personal/protected/application.php b/demos/personal/protected/application.php new file mode 100644 index 00000000..0d9cadd4 --- /dev/null +++ b/demos/personal/protected/application.php @@ -0,0 +1,41 @@ +<?php +return array( + 'application' => array( + 'id' => 'personal', + 'mode' => 'Debug', + ), + 'paths' => array( + 'using'=>array('Application.common.*'), + ), + 'modules' => array( + ), + 'services' => array( + 'page' => array( + 'class' => 'TPageService', + 'properties' => array( + 'basePath' => 'Application.Pages', + ), + 'modules' => array( + 'users' => array( + 'class' => 'System.Security.TUserManager', + 'properties' => array( + 'passwordMode' => 'Clear', + ), + 'users' => array( + array('name'=>'demo','password'=>'demo'), + ), + ), // users + 'auth' => array( + 'class' => 'System.Security.TAuthManager', + 'properties' => array( + 'userManager' => 'users', + 'loginPage' => 'UserLogin', + ), + ), + ), + ), + ), + 'parameters' => array( + 'siteName' => 'My Personal Site (PHP Config)', + ) +);
\ No newline at end of file diff --git a/demos/personal/protected/application.xml b/demos/personal/protected/application.xml index d2affe24..b67df94a 100644 --- a/demos/personal/protected/application.xml +++ b/demos/personal/protected/application.xml @@ -33,4 +33,7 @@ </modules>
</service>
</services>
+ <parameters>
+ <parameter id="siteName" value="My Personal Site" />
+ </parameters>
</application>
\ No newline at end of file |