diff options
20 files changed, 28 insertions, 129 deletions
diff --git a/documentation/theming/preview/objects.php b/documentation/theming/preview/objects.php index 179178c5a..0dc08cd98 100644 --- a/documentation/theming/preview/objects.php +++ b/documentation/theming/preview/objects.php @@ -23,36 +23,16 @@ $url = current_page_url(); <div class="elgg-col elgg-col-1of2"> <div class="pam"> <?php - echo elgg_view('layout/objects/module', array( - 'title' => 'elgg-module-aside', - 'body' => $ipsum, - 'class' => 'elgg-module-aside', - )); - ?> - <?php - echo elgg_view('layout/objects/module', array( - 'title' => 'elgg-module-popup', - 'body' => $ipsum, - 'class' => 'elgg-module-popup', - )); + echo elgg_view_module('aside', 'elgg-module-aside', $ipsum); + echo elgg_view_module('popup', 'elgg-module-popup', $ipsum); ?> </div> </div> <div class="elgg-col elgg-col-1of2"> <div class="pam"> <?php - echo elgg_view('layout/objects/module', array( - 'title' => 'elgg-module-info', - 'body' => $ipsum, - 'class' => 'elgg-module-info', - )); - ?> - <?php - echo elgg_view('layout/objects/module', array( - 'title' => 'elgg-module-featured', - 'body' => $ipsum, - 'class' => 'elgg-module-featured', - )); + echo elgg_view_module('info', 'elgg-module-info', $ipsum); + echo elgg_view_module('featured', 'elgg-module-featured', $ipsum); ?> </div> </div> diff --git a/engine/lib/views.php b/engine/lib/views.php index 144a346f5..21d606e01 100644 --- a/engine/lib/views.php +++ b/engine/lib/views.php @@ -1094,12 +1094,8 @@ function elgg_view_latest_comments($owner_guid, $type = 'object', $subtype = '', 'pagination' => false, 'list_class' => 'elgg-latest-comments', )); - $params = array( - 'title' => $title, - 'body' => $body, - 'class' => 'elgg-module-aside', - ); - return elgg_view('layout/objects/module', $params); + + return elgg_view_module('aside', $title, $body); } /** diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php index e56670316..8c3fc373f 100644 --- a/mod/blog/views/default/blog/group_module.php +++ b/mod/blog/views/default/blog/group_module.php @@ -40,10 +40,4 @@ $new_link = elgg_view('output/url', array( )); $content .= "<span class='elgg-widget-more'>$new_link</span>"; - -$params = array( - 'header' => $header, - 'body' => $content, - 'class' => 'elgg-module-info', -); -echo elgg_view('layout/objects/module', $params); +echo elgg_view_module('info', '', $content, array('header' => $header)); diff --git a/mod/blog/views/default/blog/sidebar/archives.php b/mod/blog/views/default/blog/sidebar/archives.php index bd74500ca..a76193831 100644 --- a/mod/blog/views/default/blog/sidebar/archives.php +++ b/mod/blog/views/default/blog/sidebar/archives.php @@ -25,10 +25,6 @@ if ($page_owner && $vars['page'] != 'friends') { } $content .= '</ul>'; - echo elgg_view('layout/objects/module', array( - 'title' => $title, - 'body' => $content, - 'class' => 'elgg-module-aside', - )); + echo elgg_view_module('aside', $title, $content); } }
\ No newline at end of file diff --git a/mod/blog/views/default/blog/sidebar/revisions.php b/mod/blog/views/default/blog/sidebar/revisions.php index 1baf00037..b78eb6816 100644 --- a/mod/blog/views/default/blog/sidebar/revisions.php +++ b/mod/blog/views/default/blog/sidebar/revisions.php @@ -72,10 +72,6 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) { $body .= '</ul>'; - echo elgg_view('layout/objects/module', array( - 'title' => $title, - 'body' => $body, - 'class' => 'elgg-module-aside', - )); + echo elgg_view_module('aside', $title, $body); } }
\ No newline at end of file diff --git a/mod/file/views/default/file/group_module.php b/mod/file/views/default/file/group_module.php index ebd07c2b2..8c80f297c 100644 --- a/mod/file/views/default/file/group_module.php +++ b/mod/file/views/default/file/group_module.php @@ -40,10 +40,4 @@ $new_link = elgg_view('output/url', array( )); $content .= "<span class='elgg-widget-more'>$new_link</span>"; - -$params = array( - 'header' => $header, - 'body' => $content, - 'class' => 'elgg-module-info', -); -echo elgg_view('layout/objects/module', $params); +echo elgg_view_module('info', '', $content, array('header' => $header)); diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php index dd3a3e1cb..afe47ab68 100644 --- a/mod/groups/views/default/discussion/group_module.php +++ b/mod/groups/views/default/discussion/group_module.php @@ -43,10 +43,4 @@ $new_link = elgg_view('output/url', array( )); $content .= "<span class='elgg-widget-more'>$new_link</span>"; - -$params = array( - 'header' => $header, - 'body' => $content, - 'class' => 'elgg-module-info', -); -echo elgg_view('layout/objects/module', $params); +echo elgg_view_module('info', '', $content, array('header' => $header)); diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php index 18bfbd596..58bf25095 100644 --- a/mod/groups/views/default/groups/profile/activity_module.php +++ b/mod/groups/views/default/groups/profile/activity_module.php @@ -36,12 +36,7 @@ if (!$content) { $content = '<p>' . elgg_echo('groups:activity:none') . '</p>'; } -$params = array( - 'header' => $header, - 'body' => $content, - 'class' => 'elgg-module-info', -); -echo elgg_view('layout/objects/module', $params); +echo elgg_view_module('info', '', $content, array('header' => $header)); return true; ?> @@ -63,7 +58,7 @@ return true; $items = get_data($sql); - if (count($items) > 0) { + if (count($items) > 0) { $river_items = elgg_view('river/item/list',array( 'limit' => $limit, 'offset' => $offset, diff --git a/mod/groups/views/default/groups/sidebar/featured.php b/mod/groups/views/default/groups/sidebar/featured.php index 46dc53abf..695782783 100644 --- a/mod/groups/views/default/groups/sidebar/featured.php +++ b/mod/groups/views/default/groups/sidebar/featured.php @@ -21,9 +21,5 @@ if ($featured_groups) { } elgg_pop_context(); - echo elgg_view('layout/objects/module', array( - 'title' => elgg_echo("groups:featured"), - 'body' => $body, - 'class' => 'elgg-module-aside', - )); + echo elgg_view_module('aside', elgg_echo("groups:featured"), $body); } diff --git a/mod/groups/views/default/groups/sidebar/find.php b/mod/groups/views/default/groups/sidebar/find.php index de2a6e740..0d31ee711 100644 --- a/mod/groups/views/default/groups/sidebar/find.php +++ b/mod/groups/views/default/groups/sidebar/find.php @@ -7,8 +7,4 @@ $url = elgg_get_site_url() . 'pg/groups/world'; $body = elgg_view_form('groups/search', array('action' => $url, 'method' => 'get')); -echo elgg_view('layout/objects/module', array( - 'title' => elgg_echo('groups:searchtag'), - 'body' => $body, - 'class' => 'elgg-module-aside', -)); +echo elgg_view_module('aside', elgg_echo('groups:searchtag'), $body); diff --git a/mod/groups/views/default/groups/sidebar/members.php b/mod/groups/views/default/groups/sidebar/members.php index 597ddc07c..711b99f34 100644 --- a/mod/groups/views/default/groups/sidebar/members.php +++ b/mod/groups/views/default/groups/sidebar/members.php @@ -18,8 +18,4 @@ foreach ($members as $mem) { $body .= '</div>'; $body .= "<div class='center mts'>$all_link</div>"; -echo elgg_view('layout/objects/module', array( - 'title' => elgg_echo("groups:members"), - 'body' => $body, - 'class' => 'elgg-module-aside', -)); +echo elgg_view_module('aside', elgg_echo('groups:members'), $body);
\ No newline at end of file diff --git a/mod/pages/views/default/pages/group_module.php b/mod/pages/views/default/pages/group_module.php index 1cf36067e..c41de043d 100644 --- a/mod/pages/views/default/pages/group_module.php +++ b/mod/pages/views/default/pages/group_module.php @@ -43,10 +43,4 @@ $new_link = elgg_view('output/url', array( )); $content .= "<span class='elgg-widget-more'>$new_link</span>"; - -$params = array( - 'header' => $header, - 'body' => $content, - 'class' => 'elgg-module-info', -); -echo elgg_view('layout/objects/module', $params); +echo elgg_view_module('info', '', $content, array('header' => $header)); diff --git a/mod/pages/views/default/pages/sidebar/history.php b/mod/pages/views/default/pages/sidebar/history.php index 3c0b7bc14..dad06ab4f 100644 --- a/mod/pages/views/default/pages/sidebar/history.php +++ b/mod/pages/views/default/pages/sidebar/history.php @@ -11,9 +11,4 @@ if ($vars['page']) { $content = $content = list_annotations($vars['page']->guid, 'page', 20, false); } -echo elgg_view('layout/objects/module', array( - 'title' => $title, - 'body' => $content, - 'class' => 'elgg-module-aside', -)); - +echo elgg_view_module('aside', $title, $content);
\ No newline at end of file diff --git a/mod/pages/views/default/pages/sidebar/navigation.php b/mod/pages/views/default/pages/sidebar/navigation.php index cbf21c058..43790a976 100644 --- a/mod/pages/views/default/pages/sidebar/navigation.php +++ b/mod/pages/views/default/pages/sidebar/navigation.php @@ -19,11 +19,7 @@ if (!$content) { $content = '<p>' . elgg_echo('pages:none') . '</p>'; } -echo elgg_view('layout/objects/module', array( - 'title' => $title, - 'body' => $content, - 'class' => 'elgg-module-aside', -)); +echo elgg_view_module('aside', $title, $content); ?><?php //@todo JS 1.8: no ?> <script type="text/javascript"> diff --git a/views/default/core/members/sidebar.php b/views/default/core/members/sidebar.php index 217003504..3a00bf700 100644 --- a/views/default/core/members/sidebar.php +++ b/views/default/core/members/sidebar.php @@ -9,15 +9,10 @@ $params = array( 'action' => elgg_get_site_url() . 'pg/members/search/tag/', 'disable_security' => true, ); -$body = elgg_view_form('members/tag_search', $params); -$params = array( - 'title' => elgg_echo('members:searchtag'), - 'body' => $body, - 'class' => 'elgg-module-aside', -); -echo elgg_view('layout/objects/module', $params); +$body = elgg_view_form('members/tag_search', $params); +echo elgg_view_module('aside', elgg_echo('members:searchtag'), $body); // name search $params = array( @@ -27,9 +22,4 @@ $params = array( ); $body = elgg_view_form('members/name_search', $params); -$params = array( - 'title' => elgg_echo('members:searchname'), - 'body' => $body, - 'class' => 'elgg-module-aside', -); -echo elgg_view('layout/objects/module', $params); +echo elgg_view_module('aside', elgg_echo('members:searchname'), $body);
\ No newline at end of file diff --git a/views/default/core/river/body.php b/views/default/core/river/body.php index 192e83fe9..66fe45f3d 100644 --- a/views/default/core/river/body.php +++ b/views/default/core/river/body.php @@ -23,10 +23,9 @@ $body = elgg_view($item->getView(), array('item' => $item)); // footer $footer = elgg_view('core/river/footer', $vars); -$params = array( +echo elgg_view('layout/objects/module', array( 'header' => $header, 'body' => $body, 'footer' => $footer, 'show_inner' => false, -); -echo elgg_view('layout/objects/module', $params); +));
\ No newline at end of file diff --git a/views/default/layout/elements/owner_block.php b/views/default/layout/elements/owner_block.php index dce4c1632..66bd30472 100644 --- a/views/default/layout/elements/owner_block.php +++ b/views/default/layout/elements/owner_block.php @@ -24,6 +24,7 @@ if ($owner instanceof ElggGroup || $body .= elgg_view('layout/elements/owner_block/extend', $vars); + //@todo elgg-module-owner-block? echo elgg_view('layout/objects/module', array( 'header' => $header, 'body' => $body, diff --git a/views/default/layout/shells/admin/menu.php b/views/default/layout/shells/admin/menu.php index db5564978..b0e0d0063 100644 --- a/views/default/layout/shells/admin/menu.php +++ b/views/default/layout/shells/admin/menu.php @@ -5,8 +5,4 @@ $content = elgg_view_menu('page', array('sort_by' => 'name')); -echo elgg_view('layout/objects/module', array( - 'title' => elgg_echo('admin:menu'), - 'body' => $content, - 'class' => 'elgg-module-main', -)); +echo elgg_view_module('main', elgg_echo('admin:menu'), $content);
\ No newline at end of file diff --git a/views/default/layout/shells/two_sidebar.php b/views/default/layout/shells/two_sidebar.php index 1ea527419..d61914d5c 100644 --- a/views/default/layout/shells/two_sidebar.php +++ b/views/default/layout/shells/two_sidebar.php @@ -28,7 +28,7 @@ if (isset($vars['class'])) { //$params = $vars; //$params['sidebar'] = $vars['sidebar_alt']; $params = array( - 'sidebar' => elgg_view('layout/objects/module', array('title' => 'Testing', 'body' => 'Hello, world!')) + 'sidebar' => elgg_view_module('test', 'Testing', 'Hello, world!'), ); echo elgg_view('layout/elements/sidebar', $params); ?> diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php index 442244d8d..d9397faab 100644 --- a/views/default/output/tagcloud.php +++ b/views/default/output/tagcloud.php @@ -64,12 +64,7 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) { $cloud .= elgg_view('tagcloud/extend'); if ($context != 'tags') { - $params = array( - 'title' => elgg_echo('tagcloud'), - 'body' => $cloud, - 'class' => 'elgg-tagcloud elgg-module-aside', - ); - echo elgg_view('layout/objects/module', $params); + echo elgg_view_module('aside', elgg_echo('tagcloud'), $cloud, array('class' => 'elgg-tagcloud')); } else { echo "<div class=\"elgg-tagcloud\">$cloud</div>"; } |