aboutsummaryrefslogtreecommitdiff
path: root/mod/blog/views/default
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-06-18 19:56:33 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-06-18 19:56:33 -0400
commitec7b94a64aef23b85866ecdac8e8acc712d29bb6 (patch)
treea108205c3fa0b694d8ce0ebaafd259480d6b530a /mod/blog/views/default
parentc80ba5aa03264dd64c20ed8ae222e87f9371a44d (diff)
parent2b68a4d217c35a5587c462620789493cf2804ba2 (diff)
downloadelgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.gz
elgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'mod/blog/views/default')
-rw-r--r--mod/blog/views/default/blog/group_module.php2
-rw-r--r--mod/blog/views/default/forms/blog/save.php33
-rw-r--r--mod/blog/views/default/object/blog.php4
3 files changed, 28 insertions, 11 deletions
diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php
index 9a1515585..6cfe6c98e 100644
--- a/mod/blog/views/default/blog/group_module.php
+++ b/mod/blog/views/default/blog/group_module.php
@@ -10,7 +10,7 @@ if ($group->blog_enable == "no") {
}
$all_link = elgg_view('output/url', array(
- 'href' => "blog/group/$group->guid/owner",
+ 'href' => "blog/group/$group->guid/all",
'text' => elgg_echo('link:view:all'),
));
diff --git a/mod/blog/views/default/forms/blog/save.php b/mod/blog/views/default/forms/blog/save.php
index b2d20579f..d99f45f01 100644
--- a/mod/blog/views/default/forms/blog/save.php
+++ b/mod/blog/views/default/forms/blog/save.php
@@ -5,6 +5,8 @@
* @package Blog
*/
+$blog = get_entity($vars['guid']);
+
$draft_warning = $vars['draft_warning'];
if ($draft_warning) {
$draft_warning = '<span class="message warning">' . $draft_warning . '</span>';
@@ -12,6 +14,7 @@ if ($draft_warning) {
$action_buttons = '';
$delete_link = '';
+$preview_button = '';
if ($vars['guid']) {
// add a delete button if editing
@@ -19,12 +22,24 @@ if ($vars['guid']) {
$delete_link = elgg_view('output/confirmlink', array(
'href' => $delete_url,
'text' => elgg_echo('delete'),
- 'class' => 'elgg-button elgg-button-delete elgg-state-disabled'
+ 'class' => 'elgg-button elgg-button-delete elgg-state-disabled float-alt'
));
}
-$save_button = elgg_view('input/submit', array('value' => elgg_echo('save')));
-$action_buttons = $save_button . $delete_link;
+// published blogs do not get the preview button
+if (!$vars['guid'] || ($blog && $blog->status != 'published')) {
+ $preview_button = elgg_view('input/submit', array(
+ 'value' => elgg_echo('preview'),
+ 'name' => 'preview',
+ 'class' => 'mls',
+ ));
+}
+
+$save_button = elgg_view('input/submit', array(
+ 'value' => elgg_echo('save'),
+ 'name' => 'save',
+));
+$action_buttons = $save_button . $preview_button . $delete_link;
$title_label = elgg_echo('title');
$title_input = elgg_view('input/text', array(
@@ -135,13 +150,15 @@ $body_input
$categories_input
-<div class="elgg-subtext pvm mbn elgg-divide-top">
+<div class="elgg-form-footer-alt">
+ <div class="elgg-subtext mbm">
$save_status <span class="blog-save-status-time">$saved</span>
-</div>
+ </div>
-$guid_input
-$container_guid_input
+ $guid_input
+ $container_guid_input
-$action_buttons
+ $action_buttons
+</div>
___HTML;
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
index 048a68a1a..8456829fe 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -74,7 +74,7 @@ if ($full) {
'subtitle' => $subtitle,
'tags' => $tags,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
$blog_info = elgg_view_image_block($owner_icon, $list_body);
@@ -94,7 +94,7 @@ HTML;
'tags' => $tags,
'content' => $excerpt,
);
- $list_body = elgg_view('page/components/summary', $params);
+ $list_body = elgg_view('object/elements/summary', $params);
echo elgg_view_image_block($owner_icon, $list_body);
}