diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-01 00:57:18 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-01 00:57:18 +0000 |
commit | ad6e04d0bbf812dfe048f1fdbde7aa5c787b6d1a (patch) | |
tree | 31318b4d53199abede8b03a47b1ff79add545ea3 | |
parent | 3bda294ee00663362db778fef320f866bc3a28e5 (diff) | |
download | elgg-ad6e04d0bbf812dfe048f1fdbde7aa5c787b6d1a.tar.gz elgg-ad6e04d0bbf812dfe048f1fdbde7aa5c787b6d1a.tar.bz2 |
Fixes #2555 content.php is the new display view for widgets
git-svn-id: http://code.elgg.org/elgg/trunk@7484 36083f99-b078-4883-b0ff-0f9b5a30f544
13 files changed, 8 insertions, 101 deletions
diff --git a/mod/file/views/default/widgets/filerepo/view.php b/mod/file/views/default/widgets/filerepo/content.php index 41a968dce..41a968dce 100644 --- a/mod/file/views/default/widgets/filerepo/view.php +++ b/mod/file/views/default/widgets/filerepo/content.php diff --git a/mod/friends/views/default/widgets/friends/view.php b/mod/friends/views/default/widgets/friends/content.php index 2f9ab71ea..2f9ab71ea 100644 --- a/mod/friends/views/default/widgets/friends/view.php +++ b/mod/friends/views/default/widgets/friends/content.php diff --git a/mod/groups/views/default/widgets/a_users_groups/view.php b/mod/groups/views/default/widgets/a_users_groups/content.php index 462ac419c..462ac419c 100644 --- a/mod/groups/views/default/widgets/a_users_groups/view.php +++ b/mod/groups/views/default/widgets/a_users_groups/content.php diff --git a/mod/groups/views/default/widgets/group_entities_widget/edit.php b/mod/groups/views/default/widgets/group_entities_widget/edit.php deleted file mode 100644 index bd78d2940..000000000 --- a/mod/groups/views/default/widgets/group_entities_widget/edit.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - /** - * Edit the widget - * - * @package ElggGroups - */ -?> -<p> - <?php echo elgg_echo('groups:widgets:entities:label:displaynum'); ?> - - <select name="params[limit]"> - <option value="5" <?php if ($vars['entity']->limit == 5) echo " selected=\"yes\" "; ?>>5</option> - <option value="8" <?php if ((!$vars['entity']->limit) || ($vars['entity']->limit == 8)) echo " selected=\"yes\" "; ?>>8</option> - <option value="12" <?php if ($vars['entity']->limit == 12) echo " selected=\"yes\" "; ?>>12</option> - <option value="15" <?php if ($vars['entity']->limit == 15) echo " selected=\"yes\" "; ?>>15</option> - </select> - - <input type="hidden" name="params[group_guid]" value="<?php echo get_input('group_guid'); ?>" /> -</p>
\ No newline at end of file diff --git a/mod/groups/views/default/widgets/group_entities_widget/view.php b/mod/groups/views/default/widgets/group_entities_widget/view.php deleted file mode 100644 index 629dee85e..000000000 --- a/mod/groups/views/default/widgets/group_entities_widget/view.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - /** - * View the widget - * - * @package ElggGroups - */ - - $group_guid = get_input('group_guid'); - $limit = get_input('limit', 8); - $offset = 0; - - if ($vars['entity']->limit) - $limit = $vars['entity']->limit; - - $group_guid = $vars['entity']->group_guid; - - if ($group_guid) - { - $group = get_entity($group_guid); - $members = $group->getMembers($limit, $offset); - $count = $group->getMembers($limit, $offset, true); - - $result = list_entities_groups("", 0, $group_guid, $limit); - } - else - { - $result = elgg_echo('groups:widgets:entities:label:pleaseedit'); - } - - echo $result; -?>
\ No newline at end of file diff --git a/mod/groups/views/default/widgets/group_members_widget/edit.php b/mod/groups/views/default/widgets/group_members_widget/edit.php deleted file mode 100644 index 58f8807d8..000000000 --- a/mod/groups/views/default/widgets/group_members_widget/edit.php +++ /dev/null @@ -1,19 +0,0 @@ -<?php - /** - * Edit the widget - * - * @package ElggGroups - */ -?> -<p> - <?php echo elgg_echo('groups:widgets:members:label:displaynum'); ?> - - <select name="params[limit]"> - <option value="5" <?php if ($vars['entity']->limit == 5) echo " selected=\"yes\" "; ?>>5</option> - <option value="8" <?php if ((!$vars['entity']->limit) || ($vars['entity']->limit == 8)) echo " selected=\"yes\" "; ?>>8</option> - <option value="12" <?php if ($vars['entity']->limit == 12) echo " selected=\"yes\" "; ?>>12</option> - <option value="15" <?php if ($vars['entity']->limit == 15) echo " selected=\"yes\" "; ?>>15</option> - </select> - - <input type="hidden" name="params[group_guid]" value="<?php echo get_input('group_guid'); ?>" /> -</p>
\ No newline at end of file diff --git a/mod/groups/views/default/widgets/group_members_widget/view.php b/mod/groups/views/default/widgets/group_members_widget/view.php deleted file mode 100644 index 6dd99717b..000000000 --- a/mod/groups/views/default/widgets/group_members_widget/view.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - /** - * View the widget - * - * @package ElggGroups - */ - - $group_guid = get_input('group_guid'); - $limit = get_input('limit', 8); - $offset = 0; - - if ($vars['entity']->limit) - $limit = $vars['entity']->limit; - - $group_guid = $vars['entity']->group_guid; - - if ($group_guid) - { - $group = get_entity($group_guid); - $members = $group->getMembers($limit, $offset); - $count = $group->getMembers($limit, $offset, true); - - $result = elgg_view_entity_list($members, $count, $offset, $limit, false, false, false); - } - else - { - $result = elgg_echo('groups:widgets:members:label:pleaseedit'); - } - - echo $result; -?>
\ No newline at end of file diff --git a/mod/messageboard/views/default/widgets/messageboard/view.php b/mod/messageboard/views/default/widgets/messageboard/content.php index 8c1abb47b..8c1abb47b 100644 --- a/mod/messageboard/views/default/widgets/messageboard/view.php +++ b/mod/messageboard/views/default/widgets/messageboard/content.php diff --git a/mod/pages/views/default/widgets/pages/view.php b/mod/pages/views/default/widgets/pages/content.php index f42a1a85f..f42a1a85f 100644 --- a/mod/pages/views/default/widgets/pages/view.php +++ b/mod/pages/views/default/widgets/pages/content.php diff --git a/mod/tagcloud/views/default/widgets/tagcloud/view.php b/mod/tagcloud/views/default/widgets/tagcloud/content.php index 5ed71d66a..5ed71d66a 100644 --- a/mod/tagcloud/views/default/widgets/tagcloud/view.php +++ b/mod/tagcloud/views/default/widgets/tagcloud/content.php diff --git a/mod/thewire/views/default/widgets/thewire/view.php b/mod/thewire/views/default/widgets/thewire/content.php index bed5c140b..bed5c140b 100644 --- a/mod/thewire/views/default/widgets/thewire/view.php +++ b/mod/thewire/views/default/widgets/thewire/content.php diff --git a/mod/twitter/views/default/widgets/twitter/view.php b/mod/twitter/views/default/widgets/twitter/content.php index e429d0103..e429d0103 100644 --- a/mod/twitter/views/default/widgets/twitter/view.php +++ b/mod/twitter/views/default/widgets/twitter/content.php diff --git a/views/default/widgets/wrapper.php b/views/default/widgets/wrapper.php index 20faf85a8..9c941a7c9 100644 --- a/views/default/widgets/wrapper.php +++ b/views/default/widgets/wrapper.php @@ -40,7 +40,14 @@ $widget_instance = "widget_instance_$handler"; } ?> <div class="widget_content"> - <?php echo elgg_view("widgets/$handler/view", $vars); ?> + <?php + if (elgg_view_exists("widgets/$handler/content")) { + echo elgg_view("widgets/$handler/content", $vars); + } else { + elgg_deprecated_notice("widgets use content as the display view", 1.7); + echo elgg_view("widgets/$handler/view", $vars); + } + ?> </div> </div> </div> |