From 078d930d12f450f32f1b7d1976e5d3fe0aa01808 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 20 Nov 2010 15:35:14 +0000 Subject: Refs #472 not allowing widgets to be added if only single instance allowed git-svn-id: http://code.elgg.org/elgg/trunk@7384 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/css.php | 12 +++++++++--- views/default/layouts/widgets.php | 7 +------ views/default/widgets/add_panel.php | 30 ++++++++++++++++++++---------- 3 files changed, 30 insertions(+), 19 deletions(-) (limited to 'views/default') diff --git a/views/default/css.php b/views/default/css.php index 286beeece..e0be90b2b 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -894,13 +894,19 @@ li.navigation_more ul li { float: left; margin: 2px 10px; list-style: none; -} -.widgets_add_panel li a { - display: block; width: 200px; padding: 4px; background-color: #cccccc; } +.widgets_add_panel li a { + display: block; +} +.widget_available { + cursor: pointer; +} +.widget_unavailable { + color: #888888; +} .widget { background-color: #dedede; padding: 2px; diff --git a/views/default/layouts/widgets.php b/views/default/layouts/widgets.php index 149e3d327..4b097dcf6 100644 --- a/views/default/layouts/widgets.php +++ b/views/default/layouts/widgets.php @@ -4,7 +4,7 @@ * * @uses $vars['box'] Optional display box at the top of layout * @uses $vars['num_columns'] Number of widget columns for this layout - * @uses $vars['show_add_widgets'] Display the add widgets button + * @uses $vars['show_add_widgets'] Display the add widgets button and panel */ $box = elgg_get_array_value('box', $vars, ''); @@ -28,8 +28,6 @@ if (elgg_can_edit_widget_layout($context)) { echo elgg_view('widgets/add_panel', $params); } -echo '
'; - echo $vars['box']; $widget_class = "widget_{$num_columns}_columns"; @@ -45,7 +43,4 @@ for ($column_index = 1; $column_index <= $num_columns; $column_index++) { echo '
'; } -echo '
'; -echo ''; - elgg_pop_context(); \ No newline at end of file diff --git a/views/default/widgets/add_panel.php b/views/default/widgets/add_panel.php index 70d80f41c..09511487c 100644 --- a/views/default/widgets/add_panel.php +++ b/views/default/widgets/add_panel.php @@ -1,10 +1,17 @@ handler; + } +} + ?>