diff options
author | xue <> | 2006-05-30 03:26:33 +0000 |
---|---|---|
committer | xue <> | 2006-05-30 03:26:33 +0000 |
commit | 6e0338629774fffe5fbe7136dfce34ce83844a5c (patch) | |
tree | 9520eaa7c3c278b5ebf525a0d1e09f0a4cdf7779 /demos/blog/protected/Pages/Admin | |
parent | 7f508e187e4539a16cdbb1dd6a4b1133c53cf24d (diff) |
Blog demo is completed.
Diffstat (limited to 'demos/blog/protected/Pages/Admin')
-rw-r--r-- | demos/blog/protected/Pages/Admin/AdminMenu.php | 17 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Admin/ConfigMan.page | 20 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Admin/ConfigMan.php | 19 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Admin/PostMan.php | 21 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Admin/Settings.page | 4 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Admin/UserMan.php | 17 |
6 files changed, 89 insertions, 9 deletions
diff --git a/demos/blog/protected/Pages/Admin/AdminMenu.php b/demos/blog/protected/Pages/Admin/AdminMenu.php index 40f40b88..9e46acea 100644 --- a/demos/blog/protected/Pages/Admin/AdminMenu.php +++ b/demos/blog/protected/Pages/Admin/AdminMenu.php @@ -1,5 +1,22 @@ <?php
+/**
+ * AdminMenu class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Revision: $ $Date: $
+ */
+/**
+ * AdminMenu class
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ */
class AdminMenu extends TTemplateControl
{
}
diff --git a/demos/blog/protected/Pages/Admin/ConfigMan.page b/demos/blog/protected/Pages/Admin/ConfigMan.page index 0f5ef03d..69ee0899 100644 --- a/demos/blog/protected/Pages/Admin/ConfigMan.page +++ b/demos/blog/protected/Pages/Admin/ConfigMan.page @@ -36,7 +36,7 @@ <com:TPanel GroupingText="Account settings">
-<com:TCheckBox ID="MultipleUser" Text="Allow multiple users" />
+<com:TCheckBox ID="MultipleUser" Text="Allow creating new accounts" />
<br/>
<com:TCheckBox ID="AccountApproval" Text="New accounts need approval" />
@@ -46,12 +46,26 @@ <com:TPanel GroupingText="Post settings">
+<span class="input-label">Number of posts per page</span>
+<com:TTextBox ID="PostPerPage" Columns="8"/>
+<com:TRegularExpressionValidator
+ ControlToValidate="PostPerPage"
+ ValidationGroup="settings"
+ Display="Dynamic"
+ RegularExpression="[1-9]\d*"
+ Text="Please enter a number." />
+<br/>
+
<com:TCheckBox ID="PostApproval" Text="New posts need approval" />
<br/>
</com:TPanel>
-
-<com:TLinkButton Text="Save" OnClick="saveButtonClicked" />
+<br/>
+<com:TLinkButton
+ Text="Save"
+ ValidationGroup="settings"
+ CssClass="link-button"
+ OnClick="saveButtonClicked" />
<com:TLabel ID="Result" Visible=<%= $this->IsPostBack && $this->IsValid %> Text="Your changes have been saved." />
</com:TContent>
\ No newline at end of file diff --git a/demos/blog/protected/Pages/Admin/ConfigMan.php b/demos/blog/protected/Pages/Admin/ConfigMan.php index fc652bb3..6443e5a0 100644 --- a/demos/blog/protected/Pages/Admin/ConfigMan.php +++ b/demos/blog/protected/Pages/Admin/ConfigMan.php @@ -1,5 +1,22 @@ <?php
+/**
+ * ConfigMan class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Revision: $ $Date: $
+ */
+/**
+ * ConfigMan class
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ */
class ConfigMan extends BlogPage
{
const CONFIG_FILE='Application.Data.Settings';
@@ -16,6 +33,7 @@ class ConfigMan extends BlogPage $this->AdminEmail->Text=$parameters['AdminEmail'];
$this->MultipleUser->Checked=TPropertyValue::ensureBoolean($parameters['MultipleUser']);
$this->AccountApproval->Checked=TPropertyValue::ensureBoolean($parameters['AccountApproval']);
+ $this->PostPerPage->Text=$parameters['PostPerPage'];
$this->PostApproval->Checked=TPropertyValue::ensureBoolean($parameters['PostApproval']);
$themes=$this->Service->ThemeManager->AvailableThemes;
$this->ThemeName->DataSource=$themes;
@@ -36,6 +54,7 @@ class ConfigMan extends BlogPage $elements[]=$this->createParameter('AdminEmail',$this->AdminEmail->Text);
$elements[]=$this->createParameter('MultipleUser',$this->MultipleUser->Checked);
$elements[]=$this->createParameter('AccountApproval',$this->AccountApproval->Checked);
+ $elements[]=$this->createParameter('PostPerPage',$this->PostPerPage->Text);
$elements[]=$this->createParameter('PostApproval',$this->PostApproval->Checked);
$themeName=$this->ThemeName->SelectedItem->Text;
$elements[]=$this->createParameter('ThemeName',$themeName);
diff --git a/demos/blog/protected/Pages/Admin/PostMan.php b/demos/blog/protected/Pages/Admin/PostMan.php index a99332eb..349278fc 100644 --- a/demos/blog/protected/Pages/Admin/PostMan.php +++ b/demos/blog/protected/Pages/Admin/PostMan.php @@ -1,13 +1,30 @@ <?php
+/**
+ * PostMan class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Revision: $ $Date: $
+ */
+/**
+ * PostMan class
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ */
class PostMan extends BlogPage
{
protected function bindData()
{
$offset=$this->PostGrid->CurrentPageIndex*$this->PostGrid->PageSize;
$limit=$this->PostGrid->PageSize;
- $this->PostGrid->DataSource=$this->DataAccess->queryPosts('','','','ORDER BY a.status DESC, create_time DESC',"LIMIT $offset,$limit");
- $this->PostGrid->VirtualItemCount=$this->DataAccess->queryPostCount('','','');
+ $this->PostGrid->DataSource=$this->DataAccess->queryPosts('','','ORDER BY a.status DESC, create_time DESC',"LIMIT $offset,$limit");
+ $this->PostGrid->VirtualItemCount=$this->DataAccess->queryPostCount('','');
$this->PostGrid->dataBind();
}
diff --git a/demos/blog/protected/Pages/Admin/Settings.page b/demos/blog/protected/Pages/Admin/Settings.page deleted file mode 100644 index 48dfde96..00000000 --- a/demos/blog/protected/Pages/Admin/Settings.page +++ /dev/null @@ -1,4 +0,0 @@ -<com:TContent ID="main" >
-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/blog/protected/Pages/Admin/UserMan.php b/demos/blog/protected/Pages/Admin/UserMan.php index 1cb62482..b13703a1 100644 --- a/demos/blog/protected/Pages/Admin/UserMan.php +++ b/demos/blog/protected/Pages/Admin/UserMan.php @@ -1,5 +1,22 @@ <?php
+/**
+ * UserMan class file
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ * @version $Revision: $ $Date: $
+ */
+/**
+ * UserMan class
+ *
+ * @author Qiang Xue <qiang.xue@gmail.com>
+ * @link http://www.pradosoft.com/
+ * @copyright Copyright © 2006 PradoSoft
+ * @license http://www.pradosoft.com/license/
+ */
class UserMan extends BlogPage
{
protected function bindData()
|