aboutsummaryrefslogtreecommitdiff
path: root/views/default/object
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-07-01 23:20:47 +0200
committerSem <sembrestels@riseup.net>2012-07-01 23:20:47 +0200
commit671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2 (patch)
tree436b0de846650bce13436b51a2d5214224f8898c /views/default/object
parent3da3f2aa28a42c23bdc9d661e7e13fd6f2bd2b10 (diff)
parentb91d8bb0fea5cef9fafea72181a0007cfaa54725 (diff)
downloadelgg-671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2.tar.gz
elgg-671f9ba4e1b1972d8eaf22acfb626fa2c85af0f2.tar.bz2
Upgraded to Elgg 1.8.6.
Merge tag '1.8.6' of git://github.com/Elgg/Elgg into lorea-preprod Elgg 1.8.6 release
Diffstat (limited to 'views/default/object')
-rw-r--r--views/default/object/elements/summary.php4
-rw-r--r--views/default/object/widget/elements/controls.php4
-rw-r--r--views/default/object/widget/elements/settings.php14
3 files changed, 16 insertions, 6 deletions
diff --git a/views/default/object/elements/summary.php b/views/default/object/elements/summary.php
index 22db03f51..c0f3ad340 100644
--- a/views/default/object/elements/summary.php
+++ b/views/default/object/elements/summary.php
@@ -13,7 +13,7 @@
* @uses $vars['title'] Title link (optional) false = no title, '' = default
* @uses $vars['metadata'] HTML for entity menu and metadata (optional)
* @uses $vars['subtitle'] HTML for the subtitle (optional)
- * @uses $vars['tags'] HTML for the tags (optional)
+ * @uses $vars['tags'] HTML for the tags (default is tags on entity, pass false for no tags)
* @uses $vars['content'] HTML for the entity content (optional)
*/
@@ -39,7 +39,7 @@ $subtitle = elgg_extract('subtitle', $vars, '');
$content = elgg_extract('content', $vars, '');
$tags = elgg_extract('tags', $vars, '');
-if ($tags !== false) {
+if ($tags === '') {
$tags = elgg_view('output/tags', array('tags' => $entity->tags));
}
diff --git a/views/default/object/widget/elements/controls.php b/views/default/object/widget/elements/controls.php
index d1d630c4f..57a935f62 100644
--- a/views/default/object/widget/elements/controls.php
+++ b/views/default/object/widget/elements/controls.php
@@ -8,9 +8,7 @@
echo elgg_view_menu('widget', array(
'entity' => elgg_extract('widget', $vars),
- 'params' => array(
- 'show_edit' => elgg_extract('show_edit', $vars, true)
- ),
+ 'show_edit' => elgg_extract('show_edit', $vars, true),
'sort_by' => 'priority',
'class' => 'elgg-menu-hz',
));
diff --git a/views/default/object/widget/elements/settings.php b/views/default/object/widget/elements/settings.php
index 5afe56ed8..25cda58c9 100644
--- a/views/default/object/widget/elements/settings.php
+++ b/views/default/object/widget/elements/settings.php
@@ -6,8 +6,20 @@
*/
$widget = elgg_extract('widget', $vars);
+
+// not using elgg_view_form() so that we can detect if the form is empty
+$form_body = elgg_view('forms/widgets/save', $vars);
+if (!$form_body) {
+ return true;
+}
+
+$form = elgg_view('input/form', array(
+ 'action' => 'action/widgets/save',
+ 'body' => $form_body,
+ 'class' => 'elgg-form-widgets-save',
+));
?>
<div class="elgg-widget-edit" id="widget-edit-<?php echo $widget->guid; ?>">
- <?php echo elgg_view_form('widgets/save', array(), $vars); ?>
+ <?php echo $form; ?>
</div>