diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-25 12:12:54 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-01-25 12:12:54 +0000 |
commit | 561c160ed8db7f418cc5ae34e04b959be5066442 (patch) | |
tree | e8ab27d862524fd2756033c7b093e268dde760ec /views/default/layout/shells | |
parent | 68213505bda10f90094f54a948a08d65d4d7a37c (diff) | |
download | elgg-561c160ed8db7f418cc5ae34e04b959be5066442.tar.gz elgg-561c160ed8db7f418cc5ae34e04b959be5066442.tar.bz2 |
converted widgets to modules
git-svn-id: http://code.elgg.org/elgg/trunk@7928 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/layout/shells')
-rw-r--r-- | views/default/layout/shells/widgets.php | 6 | ||||
-rw-r--r-- | views/default/layout/shells/widgets/add_button.php | 6 | ||||
-rw-r--r-- | views/default/layout/shells/widgets/add_panel.php | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/views/default/layout/shells/widgets.php b/views/default/layout/shells/widgets.php index 656a0e4c3..f47c90f03 100644 --- a/views/default/layout/shells/widgets.php +++ b/views/default/layout/shells/widgets.php @@ -6,12 +6,14 @@ * @uses $vars['num_columns'] Number of widget columns for this layout (3) * @uses $vars['show_add_widgets'] Display the add widgets button and panel (true) * @uses $vars['exact_match'] Widgets must match the current context (false) + * @uses $vars['show_access'] Show the access control (true) */ $box = elgg_get_array_value('box', $vars, ''); $num_columns = elgg_get_array_value('num_columns', $vars, 3); $show_add_widgets = elgg_get_array_value('show_add_widgets', $vars, true); $exact_match = elgg_get_array_value('exact_match', $vars, false); +$show_access = elgg_get_array_value('show_access', $vars, true); $owner = elgg_get_page_owner(); $context = elgg_get_context(); @@ -40,7 +42,7 @@ for ($column_index = 1; $column_index <= $num_columns; $column_index++) { echo "<div class=\"$widget_class elgg-widgets\" id=\"elgg-widget-col-$column_index\">"; if (is_array($column_widgets) && sizeof($column_widgets) > 0) { foreach ($column_widgets as $widget) { - echo elgg_view_entity($widget); + echo elgg_view_entity($widget, array('show_access' => $show_access)); } } echo '</div>'; @@ -48,4 +50,4 @@ for ($column_index = 1; $column_index <= $num_columns; $column_index++) { elgg_pop_context(); -echo elgg_view('graphics/ajax_loader', array('internalid' => 'elgg-widget-loader'));
\ No newline at end of file +echo elgg_view('graphics/ajax_loader', array('internalid' => 'elgg-widget-loader')); diff --git a/views/default/layout/shells/widgets/add_button.php b/views/default/layout/shells/widgets/add_button.php index 492f0f6fc..51b03edbb 100644 --- a/views/default/layout/shells/widgets/add_button.php +++ b/views/default/layout/shells/widgets/add_button.php @@ -3,6 +3,8 @@ * Button area for showing the add widgets panel */ ?> -<div class="elgg-widget-add-control elgg-toggle" id="elgg-toggler-add-widgets"> - <a class="elgg-action-button"><?php echo elgg_echo('widgets:add'); ?></a> +<div class="elgg-widget-add-control"> + <a class="elgg-action-button elgg-toggle" id="elgg-toggler-add-widgets"> + <?php echo elgg_echo('widgets:add'); ?> + </a> </div> diff --git a/views/default/layout/shells/widgets/add_panel.php b/views/default/layout/shells/widgets/add_panel.php index 2d2a05a08..ff789cbd3 100644 --- a/views/default/layout/shells/widgets/add_panel.php +++ b/views/default/layout/shells/widgets/add_panel.php @@ -31,10 +31,10 @@ foreach ($widgets as $column_widgets) { $id = "elgg-widget-type-$handler"; // check if widget added and only one instance allowed if ($widget_type->multiple == false && in_array($handler, $current_handlers)) { - $class = 'elgg-widget-unavailable'; + $class = 'elgg-state-unavailable'; $tooltip = elgg_echo('widget:unavailable'); } else { - $class = 'elgg-widget-available'; + $class = 'elgg-state-available'; $tooltip = $widget_type->description; } |