aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/views/default
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-01 16:41:24 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-01 16:41:24 +0000
commit205dcbf14c473fe64f89e5696cfbafea8fa5ab15 (patch)
tree877875015c788488c76d3e58d52ef5e0f59746b5 /mod/blog/views/default
parent11c32ad2ed2916336f32d59191536f26beec9862 (diff)
downloadelgg-205dcbf14c473fe64f89e5696cfbafea8fa5ab15.tar.gz
elgg-205dcbf14c473fe64f89e5696cfbafea8fa5ab15.tar.bz2
Further adventures in blogging; saving for now
git-svn-id: https://code.elgg.org/elgg/trunk@322 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/views/default')
-rw-r--r--mod/blog/views/default/blog/forms/edit.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php
new file mode 100644
index 000000000..ce39f9205
--- /dev/null
+++ b/mod/blog/views/default/blog/forms/edit.php
@@ -0,0 +1,52 @@
+<?php
+
+ /**
+ * Elgg blog edit/add page
+ *
+ * @package ElggBlog
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Ben Werdmuller <ben@curverider.co.uk>
+ * @copyright Curverider Ltd 2008
+ * @link http://elgg.com/
+ *
+ * @uses $vars['object'] Optionally, the blog post to edit
+ */
+
+ // Set title, form destination
+ if (isset($vars['object'])) {
+ $title = sprintf(elgg_echo("blog:editpost"),$object->title);
+ $action = "blog/edit";
+ } else {
+ $title = elgg_echo("blog:addpost");
+ $action = "blog/add";
+ }
+
+?>
+
+ <h2>
+ <?php echo $title; ?>
+ </h2>
+ <form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" method="post">
+
+ <p>
+ <label><?php echo elgg_echo("title"); ?><br />
+ <?php
+
+ echo elgg_view("input/text");
+
+ ?>
+ </label>
+ </p>
+ <p>
+ <label><?php echo elgg_echo("blog:text"); ?><br />
+ <?php
+
+ echo elgg_view("input/longtext");
+ ?>
+ </label>
+ </p>
+ <p>
+ <input type="submit" value="<?php echo elgg_echo('save'); ?>" />
+ </p>
+
+ </form> \ No newline at end of file