summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Pages/Posts
diff options
context:
space:
mode:
Diffstat (limited to 'demos/blog/protected/Pages/Posts')
-rw-r--r--demos/blog/protected/Pages/Posts/ListPost.page6
-rw-r--r--demos/blog/protected/Pages/Posts/ViewPost.page1
-rw-r--r--demos/blog/protected/Pages/Posts/ViewPost.php2
3 files changed, 8 insertions, 1 deletions
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();
}