diff options
Diffstat (limited to 'demos/blog/protected/Pages')
-rw-r--r-- | demos/blog/protected/Pages/Admin/ConfigMan.page | 10 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Admin/ConfigMan.php | 2 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Posts/ListPost.page | 6 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Posts/ViewPost.page | 1 | ||||
-rw-r--r-- | demos/blog/protected/Pages/Posts/ViewPost.php | 2 |
5 files changed, 20 insertions, 1 deletions
diff --git a/demos/blog/protected/Pages/Admin/ConfigMan.page b/demos/blog/protected/Pages/Admin/ConfigMan.page index 69ee0899..5c6cd53d 100644 --- a/demos/blog/protected/Pages/Admin/ConfigMan.page +++ b/demos/blog/protected/Pages/Admin/ConfigMan.page @@ -56,6 +56,16 @@ Text="Please enter a number." />
<br/>
+<span class="input-label">Number of recent comments shown</span>
+<com:TTextBox ID="RecentComments" Columns="8"/>
+<com:TRegularExpressionValidator
+ ControlToValidate="RecentComments"
+ ValidationGroup="settings"
+ Display="Dynamic"
+ RegularExpression="[1-9]\d*"
+ Text="Please enter a number." />
+<br/>
+
<com:TCheckBox ID="PostApproval" Text="New posts need approval" />
<br/>
diff --git a/demos/blog/protected/Pages/Admin/ConfigMan.php b/demos/blog/protected/Pages/Admin/ConfigMan.php index 6443e5a0..e4b89b3c 100644 --- a/demos/blog/protected/Pages/Admin/ConfigMan.php +++ b/demos/blog/protected/Pages/Admin/ConfigMan.php @@ -34,6 +34,7 @@ class ConfigMan extends BlogPage $this->MultipleUser->Checked=TPropertyValue::ensureBoolean($parameters['MultipleUser']);
$this->AccountApproval->Checked=TPropertyValue::ensureBoolean($parameters['AccountApproval']);
$this->PostPerPage->Text=$parameters['PostPerPage'];
+ $this->RecentComments->Text=$parameters['RecentComments'];
$this->PostApproval->Checked=TPropertyValue::ensureBoolean($parameters['PostApproval']);
$themes=$this->Service->ThemeManager->AvailableThemes;
$this->ThemeName->DataSource=$themes;
@@ -55,6 +56,7 @@ class ConfigMan extends BlogPage $elements[]=$this->createParameter('MultipleUser',$this->MultipleUser->Checked);
$elements[]=$this->createParameter('AccountApproval',$this->AccountApproval->Checked);
$elements[]=$this->createParameter('PostPerPage',$this->PostPerPage->Text);
+ $elements[]=$this->createParameter('RecentComments',$this->RecentComments->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/Posts/ListPost.page b/demos/blog/protected/Pages/Posts/ListPost.page index 4c96d6fb..1371a5ab 100644 --- a/demos/blog/protected/Pages/Posts/ListPost.page +++ b/demos/blog/protected/Pages/Posts/ListPost.page @@ -3,6 +3,12 @@ <com:TPanel ID="CategoryPanel" Visible="false" CssClass="category">
<div class="category-name">
<%= $this->Category->Name %>
+<com:THyperLink
+ Text="[#]"
+ Tooltip="Edit this category"
+ Visible=<%= $this->User->IsAdmin %>
+ NavigateUrl=<%= $this->Service->constructUrl('Posts.EditCategory',array('id'=>$this->Category->ID)) %>
+ />
<com:TLinkButton
Text="[-]"
Tooltip="Delete this category"
diff --git a/demos/blog/protected/Pages/Posts/ViewPost.page b/demos/blog/protected/Pages/Posts/ViewPost.page index 5bd80a52..c48b8537 100644 --- a/demos/blog/protected/Pages/Posts/ViewPost.page +++ b/demos/blog/protected/Pages/Posts/ViewPost.page @@ -43,6 +43,7 @@ by <prop:ItemTemplate>
<div class="comment">
<div class="comment-header">
+<a name="c<%# $this->DataItem->ID %>"></a>
<com:TLinkButton
Text="Delete"
Attributes.onclick="if(!confirm('Are you sure to delete this comment?')) return false;"
diff --git a/demos/blog/protected/Pages/Posts/ViewPost.php b/demos/blog/protected/Pages/Posts/ViewPost.php index 84f33cff..8d0a7124 100644 --- a/demos/blog/protected/Pages/Posts/ViewPost.php +++ b/demos/blog/protected/Pages/Posts/ViewPost.php @@ -75,7 +75,7 @@ class ViewPost extends BlogPage public function deleteButtonClicked($sender,$param)
{
- $this->DataAccess->deletePost($this->PostID);
+ $this->DataAccess->deletePost($this->CurrentPost->ID);
$this->gotoDefaultPage();
}
|