aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/views/default/object/blog.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-15 15:35:35 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-15 15:35:35 +0000
commita9e67905b90320bf8566b6919b5edb3354d7fd6d (patch)
tree48a5eb62764cfaad7724df4291911bab2c495eeb /mod/blog/views/default/object/blog.php
parent4c6fce1ea489455e83b4552112ff6e5b332f650f (diff)
downloadelgg-a9e67905b90320bf8566b6919b5edb3354d7fd6d.tar.gz
elgg-a9e67905b90320bf8566b6919b5edb3354d7fd6d.tar.bz2
Blog plugin improvements, including delete on comments
git-svn-id: https://code.elgg.org/elgg/trunk@466 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/views/default/object/blog.php')
-rw-r--r--mod/blog/views/default/object/blog.php43
1 files changed, 10 insertions, 33 deletions
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
index 01fbe4b4c..c4b718045 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -47,10 +47,16 @@
<?php
if ($vars['entity']->canEdit()) {
+
?>
<a href="<?php echo $vars['url']; ?>mod/blog/edit.php?blogpost=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("edit"); ?></a>
- <a href="<?php echo $vars['url']; ?>action.php?action=blog/delete&blogpost=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("delete"); ?></a>
<?php
+
+ echo elgg_view("output/confirmlink", array(
+ 'href' => $vars['url'] . "action.php?action=blog/delete&blogpost=" . $vars['entity']->getGUID(),
+ 'text' => elgg_echo('delete'),
+ 'confirm' => elgg_echo('deleteconfirm'),
+ ));
// Allow the menu to be extended
echo elgg_view("editmenu",array('entity' => $vars['entity']));
@@ -66,41 +72,12 @@
// If we've been asked to display the full view
if (isset($vars['full']) && $vars['full'] == true) {
-
-?>
-
- <div class="blog-comments">
-
-<?php
+ echo elgg_view('object/blog-comments',array('entity' => $vars['entity'], 'comments' => $vars['comments']));
+ }
// Display comments if any
- echo elgg_view('object/blog-comments',array('comments' => $vars['comments']));
+ // echo elgg_view('object/blog-comments',array('entity' => $vars['entity'], 'comments' => $vars['comments']));
-?>
- <form action="<?php echo $vars['url']; ?>action/blog/comments/add" method="post">
- <h3>
- <?php echo elgg_echo("blog:comment:add"); ?>
- </h3>
- <p>
- <label><?php echo elgg_echo("blog:comment:text"); ?>
- <?php
-
- echo elgg_view("input/longtext",array('internalname' => 'comment'));
-
- ?>
- </label>
- </p>
- <p>
- <input type="hidden" name="blogpost_guid" value="<?php echo $vars['entity']->getGUID(); ?>" />
- <input type="submit" value="<?php echo elgg_echo("save"); ?>" />
- </p>
- </form>
-
- </div>
-
-<?php
-
- }
}
?> \ No newline at end of file