diff options
Diffstat (limited to 'views/default/layout/objects')
| -rw-r--r-- | views/default/layout/objects/list.php | 75 | ||||
| -rw-r--r-- | views/default/layout/objects/media.php | 52 | ||||
| -rw-r--r-- | views/default/layout/objects/module.php | 52 | ||||
| -rw-r--r-- | views/default/layout/objects/widget.php | 52 | ||||
| -rw-r--r-- | views/default/layout/objects/widget/controls.php | 44 | ||||
| -rw-r--r-- | views/default/layout/objects/widget/settings.php | 44 |
6 files changed, 0 insertions, 319 deletions
diff --git a/views/default/layout/objects/list.php b/views/default/layout/objects/list.php deleted file mode 100644 index 84ba1414c..000000000 --- a/views/default/layout/objects/list.php +++ /dev/null @@ -1,75 +0,0 @@ -<?php -/** - * View a list of items - * - * @package Elgg - * - * @uses $vars['items'] Array of ElggEntity or ElggAnnotation objects - * @uses $vars['offset'] Index of the first list item in complete list - * @uses $vars['limit'] Number of items per page - * @uses $vars['count'] Number of items in the complete list - * @uses $vars['base_url'] Base URL of list (optional) - * @uses $vars['pagination'] Show pagination? (default: true) - * @uses $vars['position'] Position of the pagination: before, after, or both - * @uses $vars['full_view'] Show the full view of the items (default: false) - * @uses $vars['list_class'] Additional CSS class for the <ul> element - * @uses $vars['item_class'] Additional CSS class for the <li> elements - */ - -$items = $vars['items']; -$offset = $vars['offset']; -$limit = $vars['limit']; -$count = $vars['count']; -$base_url = $vars['base_url']; -$pagination = elgg_get_array_value('pagination', $vars, true); -$full_view = elgg_get_array_value('full_view', $vars, false); -$offset_key = elgg_get_array_value('offset_key', $vars, 'offset'); -$position = elgg_get_array_value('position', $vars, 'after'); - -$list_class = 'elgg-list'; -if (isset($vars['list_class'])) { - $list_class = "{$vars['list_class']} $list_class"; -} - -$item_class = 'elgg-list-item'; -if (isset($vars['item_class'])) { - $item_class = "{$vars['item_class']} $item_class"; -} - -$html = ""; -$nav = ""; - -if ($pagination && $count) { - $nav .= elgg_view('navigation/pagination', array( - 'baseurl' => $base_url, - 'offset' => $offset, - 'count' => $count, - 'limit' => $limit, - 'offset_key' => $offset_key, - )); -} - -if (is_array($items) && count($items) > 0) { - $html .= "<ul class=\"$list_class\">"; - foreach ($items as $item) { - if (elgg_instanceof($item)) { - $id = "elgg-{$item->getType()}-{$item->getGUID()}"; - } else { - $id = "item-{$item->getType()}-{$item->id}"; - } - $html .= "<li id=\"$id\" class=\"$item_class\">"; - $html .= elgg_view_list_item($item, $full_view); - $html .= '</li>'; - } - $html .= '</ul>'; -} - -if ($position == 'before' || $position == 'both') { - $html = $nav . $html; -} - -if ($position == 'after' || $position == 'both') { - $html .= $nav; -} - -echo $html; diff --git a/views/default/layout/objects/media.php b/views/default/layout/objects/media.php deleted file mode 100644 index 2b015bd05..000000000 --- a/views/default/layout/objects/media.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * Elgg media element - * - * Common pattern where there is an image, icon, media object to the left - * and a descriptive block of text to the right. - * - * --------------------------------------------------------------- - * | | | alt | - * | picture | body | picture | - * | block | block | block | - * | | | (optional)| - * --------------------------------------------------------------- - * - * @uses $vars['body'] HTML content of the body block - * @uses $vars['pict'] HTML content of the picture block - * @uses $vars['pict_alt'] HTML content of the alternate picture block - * @uses $vars['class'] Optional additional class for media element - * @uses $vars['id'] Optional id for the media element - */ - -$body = elgg_get_array_value('body', $vars, ''); -$pict_block = elgg_get_array_value('pict', $vars, ''); -$alt_pict_block = elgg_get_array_value('pict_alt', $vars, ''); - -$class = 'elgg-media'; -$additional_class = elgg_get_array_value('class', $vars, ''); -if ($additional_class) { - $class = "$class $additional_class"; -} - -$id = ''; -if (isset($vars['id'])) { - $id = "id=\"{$vars['id']}\""; -} - - -$body = "<div class=\"elgg-body\">$body</div>"; - -if ($pict_block) { - $pict_block = "<div class=\"elgg-pict\">$pict_block</div>"; -} - -if ($alt_pict_block) { - $alt_pict_block = "<div class=\"elgg-pict-alt\">$alt_pict_block</div>"; -} - -echo <<<HTML -<div class="$class clearfix" $id> - $pict_block$alt_pict_block$body -</div> -HTML; diff --git a/views/default/layout/objects/module.php b/views/default/layout/objects/module.php deleted file mode 100644 index 48fa79553..000000000 --- a/views/default/layout/objects/module.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * Elgg module element - * - * @uses $vars['title'] Title text - * @uses $vars['header'] HTML content of the header - * @uses $vars['body'] HTML content of the body - * @uses $vars['footer'] HTML content of the footer - * @uses $vars['class'] Optional additional class for module - * @uses $vars['id'] Optional id for module - * @uses $vars['show_inner'] Optional flag to leave out inner div (true) - */ - -$title = elgg_get_array_value('title', $vars, ''); -$header = elgg_get_array_value('header', $vars, ''); -$body = elgg_get_array_value('body', $vars, ''); -$footer = elgg_get_array_value('footer', $vars, ''); -$show_inner = elgg_get_array_value('show_inner', $vars, true); - -$class = 'elgg-module'; -$additional_class = elgg_get_array_value('class', $vars, ''); -if ($additional_class) { - $class = "$class $additional_class"; -} - -$id = ''; -if (isset($vars['id'])) { - $id = "id=\"{$vars['id']}\""; -} - -if (isset($vars['header'])) { - if ($vars['header']) { - $header = "<div class=\"elgg-head\">$header</div>"; - } -} else { - $header = "<div class=\"elgg-head\"><h3>$title</h3></div>"; -} - -$body = "<div class=\"elgg-body\">$body</div>"; - -if (isset($vars['footer'])) { - if ($vars['footer']) { - $footer = "<div class=\"elgg-foot\">$footer</div>"; - } -} - -$contents = $header . $body . $footer; -if ($show_inner) { - $contents = "<div class=\"elgg-inner\">$contents</div>"; -} - -echo "<div class=\"$class\" $id>$contents</div>"; diff --git a/views/default/layout/objects/widget.php b/views/default/layout/objects/widget.php deleted file mode 100644 index d109693e1..000000000 --- a/views/default/layout/objects/widget.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** - * Widget object - * - * @uses $vars['entity'] - */ - -$widget = $vars['entity']; -if (!elgg_instanceof($widget, 'object', 'widget')) { - return true; -} - -// @todo catch for disabled plugins -$widgettypes = elgg_get_widget_types('all'); - -$handler = $widget->handler; - -$title = $widget->getTitle(); - -$can_edit = $widget->canEdit(); - -$widget_id = "widget-$widget->guid"; -$widget_instance = "widget-instance-$handler"; - -?> -<div class="widget draggable <?php echo $widget_instance?>" id="<?php echo $widget_id; ?>"> - <div class="widget-title drag-handle"> - <h3><?php echo $title; ?></h3> - </div> - <?php - if ($can_edit) { - echo elgg_view('layout/objects/widget/controls', array('widget' => $widget)); - } - ?> - <div class="widget-container"> - <?php - if ($can_edit) { - echo elgg_view('layout/objects/widget/settings', array('widget' => $widget)); - } - ?> - <div class="widget-content"> - <?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.8); - echo elgg_view("widgets/$handler/view", $vars); - } - ?> - </div> - </div> -</div> diff --git a/views/default/layout/objects/widget/controls.php b/views/default/layout/objects/widget/controls.php deleted file mode 100644 index 5e6aaf193..000000000 --- a/views/default/layout/objects/widget/controls.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -/** - * Elgg widget controls - * - * @package Elgg - * @subpackage Core - */ - -$widget = $vars['widget']; - -$params = array( - 'text' => ' ', - 'href' => "#", - 'class' => 'widget-collapse-button', - 'internalid' => "widget-collapse-button_$widget->guid" -); -$collapse_link = elgg_view('output/url', $params); - -$params = array( - 'text' => ' ', - 'title' => elgg_echo('widget:delete', array($widget->getTitle())), - 'href' => elgg_get_site_url() . "action/widgets/delete?guid=$widget->guid", - 'is_action' => true, - 'class' => 'widget-delete-button', - 'internalid' => "widget-delete-button_$widget->guid" -); -$delete_link = elgg_view('output/url', $params); - -$params = array( - 'text' => ' ', - 'title' => elgg_echo('widget:edit'), - 'href' => "#", - 'class' => 'widget-edit-button', - 'internalid' => "widget-edit-button_$widget->guid" -); -$edit_link = elgg_view('output/url', $params); - -echo <<<___END -<div class="widget-controls"> - $collapse_link - $delete_link - $edit_link -</div> -___END; diff --git a/views/default/layout/objects/widget/settings.php b/views/default/layout/objects/widget/settings.php deleted file mode 100644 index 5814e5821..000000000 --- a/views/default/layout/objects/widget/settings.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -/** - * Elgg widget edit settings - * - * @package Elgg - * @subpackage Core - */ - -$widget = $vars['widget']; - -$edit_view = "widgets/$widget->handler/edit"; -$custom_form_section = elgg_view($edit_view, array('entity' => $widget)); - -$access_label = elgg_echo('access'); -$access = elgg_view('input/access', array('internalname' => 'params[access_id]','value' => $widget->access_id)); -$access_html = "<p><label>$access_label:</label> $access</p>"; - -$hidden = elgg_view('input/hidden', array('internalname' => 'guid', 'value' => $widget->guid)); -$submit = elgg_view('input/submit', array('value' => elgg_echo('save'))); - -// dashboard widgets do not get access controls -if (elgg_in_context('dashboard')) { - $access = ''; -} - -$body = <<<___END - $custom_form_section - $access - <p> - $hidden - $submit - </p> -___END; - -?> -<div class="widget-edit"> -<?php -$params = array( - 'body' => $body, - 'action' => "action/widgets/save" -); -echo elgg_view('input/form', $params); -?> -</div> |
