diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-04 17:36:44 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-04-04 17:36:44 +0000 |
commit | d06f87fadb1b88f8ae251ada0461dd2cebf84a00 (patch) | |
tree | 5e90ffdb4dcc46978bcde6bd839243aad02d7799 /mod/blog/views/default | |
parent | 4ec8a466b8ae9bfcb495b57cc1c90ac8de3533e2 (diff) | |
download | elgg-d06f87fadb1b88f8ae251ada0461dd2cebf84a00.tar.gz elgg-d06f87fadb1b88f8ae251ada0461dd2cebf84a00.tar.bz2 |
Blog edit updates
git-svn-id: https://code.elgg.org/elgg/trunk@408 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/views/default')
-rw-r--r-- | mod/blog/views/default/blog/forms/edit.php | 15 | ||||
-rw-r--r-- | mod/blog/views/default/object/blog.php | 16 |
2 files changed, 27 insertions, 4 deletions
diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php index fb069961b..ff8ae8767 100644 --- a/mod/blog/views/default/blog/forms/edit.php +++ b/mod/blog/views/default/blog/forms/edit.php @@ -13,12 +13,12 @@ */
// Set title, form destination
- if (isset($vars['object'])) {
+ if (isset($vars['entity'])) {
$title = sprintf(elgg_echo("blog:editpost"),$object->title);
$action = "blog/edit";
- $title = $vars['object']->title;
- $body = $vars['object']->description;
- $tags = $vars['object']->tags;
+ $title = $vars['entity']->title;
+ $body = $vars['entity']->description;
+ $tags = $vars['entity']->tags;
} else {
$title = elgg_echo("blog:addpost");
$action = "blog/add";
@@ -76,6 +76,13 @@ ?>
</p>
<p>
+ <?php
+
+ if (isset($vars['entity'])) {
+ ?><input type="hidden" name="blogpost" value="<?php echo $vars['entity']->getGUID(); ?>" /><?php
+ }
+
+ ?>
<input type="submit" value="<?php echo elgg_echo('save'); ?>" />
</p>
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php index b136267d7..6fcf041ba 100644 --- a/mod/blog/views/default/object/blog.php +++ b/mod/blog/views/default/object/blog.php @@ -44,6 +44,22 @@ ?>
</p>
+ <?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']; ?>mod/blog/delete.php?blogpost=<?php echo $vars['entity']->getGUID(); ?>"><?php echo elgg_echo("delete"); ?></a>
+ <?php
+
+ // Allow the menu to be extended
+ echo elgg_view("editmenu",array('entity' => $vars['entity']));
+
+ ?>
+ <?php
+ }
+
+ ?>
</div>
<?php
|