]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
removing old entities views that are no longer needed and did the last changes for...
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Feb 2011 22:46:47 +0000 (22:46 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 6 Feb 2011 22:46:47 +0000 (22:46 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8054 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/search/views/default/search/entity.php
views/default/entities/entity_list.php [deleted file]
views/default/entities/entity_listing.php [deleted file]
views/default/entities/gallery.php [deleted file]
views/default/entities/gallery_listing.php [deleted file]
views/default/entities/list.php [deleted file]
views/default/entities/list_item.php [deleted file]
views/default/graphics/icon.php [deleted file]
views/default/object/default.php

index d93a603eb4c3f0402a1b77538fde976c6f36586f..a967853a3c08c1409a74bcc571a75fc150f1e6a9 100644 (file)
@@ -22,17 +22,13 @@ if (!$icon) {
        // @todo allow an option to switch to displaying the entity's icon instead.
        $type = $entity->getType();
        if ($type == 'user' || $type == 'group') {
-               $icon = elgg_view('profile/icon', array('entity' => $entity, 'size' => 'tiny'));
+               $icon = elgg_view_entity_icon($entity, 'tiny');
        } elseif ($owner = $entity->getOwnerEntity()) {
-               $icon = elgg_view('profile/icon', array('entity' => $owner, 'size' => 'tiny'));
+               $icon = elgg_view_entity_icon($owner, 'tiny');
        } else {
                // display a generic icon if no owner, though there will probably be
                // other problems if the owner can't be found.
-               $icon = elgg_view(
-                       'graphics/icon', array(
-                               'entity' => $entity,
-                               'size' => 'tiny',
-                               ));
+               $icon = elgg_view_entity($entity, 'tiny');
        }
 }
 
diff --git a/views/default/entities/entity_list.php b/views/default/entities/entity_list.php
deleted file mode 100644 (file)
index fd6ea27..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * View a list of entities
- *
- * @package Elgg
- *
- */
-
-$context = $vars['context'];
-$offset = $vars['offset'];
-$entities = $vars['entities'];
-$limit = $vars['limit'];
-$count = $vars['count'];
-$baseurl = $vars['baseurl'];
-$context = $vars['context'];
-$listtype = $vars['listtype'];
-$pagination = $vars['pagination'];
-$fullview = $vars['fullview'];
-
-$html = "";
-$nav = "";
-
-if (isset($vars['listtypetoggle'])) {
-       $listtypetoggle = $vars['listtypetoggle'];
-} else {
-       $listtypetoggle = true;
-}
-
-if ($context == "search" && $count > 0 && $listtypetoggle) {
-       $nav .= elgg_view('navigation/listtype', array(
-               'baseurl' => $baseurl,
-               'offset' => $offset,
-               'count' => $count,
-               'listtype' => $listtype,
-       ));
-}
-
-if ($pagination) {
-       $nav .= elgg_view('navigation/pagination',array(
-               'baseurl' => $baseurl,
-               'offset' => $offset,
-               'count' => $count,
-               'limit' => $limit,
-       ));
-}
-
-if ($listtype == 'list') {
-       if (is_array($entities) && sizeof($entities) > 0) {
-               foreach($entities as $entity) {
-                       $html .= elgg_view_entity($entity, $fullview);
-               }
-       }
-} else {
-       if (is_array($entities) && sizeof($entities) > 0) {
-               $html .= elgg_view('entities/gallery', array('entities' => $entities));
-       }
-}
-
-if ($count) {
-       $html .= $nav;
-}
-
-echo $html;
\ No newline at end of file
diff --git a/views/default/entities/entity_listing.php b/views/default/entities/entity_listing.php
deleted file mode 100644 (file)
index 4b6636d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Generic display for a single entity in list view.
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses string $vars['icon'] Full icon HTML to display.
- * @uses string $vars['info'] Info about the entity.
- */
-?>
-<div class="listing entity-listing">
-       <div class="icon">
-               <?php echo $vars['icon']; ?>
-       </div>
-       <div class="info">
-               <?php echo $vars['info']; ?>
-       </div>
-</div>
diff --git a/views/default/entities/gallery.php b/views/default/entities/gallery.php
deleted file mode 100644 (file)
index bfdd4d4..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-/**
- * Elgg gallery view
- *
- * @package Elgg
- * @subpackage Core
- */
-
-$entities = $vars['entities'];
-if (is_array($entities) && sizeof($entities) > 0) {
-
-?>
-
-<table class="entity_gallery">
-
-<?php
-
-       $col = 0;
-       foreach($entities as $entity) {
-               if ($col == 0) {
-
-                       echo "<tr>";
-
-               }
-               echo "<td class='entity_gallery_item'>";
-               echo elgg_view_entity($entity);
-               echo "</td>";
-               $col++;
-               if ($col > 3) {
-                       echo "</tr>";
-                       $col = 0;
-               }
-       }
-       if ($col > 0) echo "</tr>";
-
-?>
-
-</table>
-
-<?php
-
-}
\ No newline at end of file
diff --git a/views/default/entities/gallery_listing.php b/views/default/entities/gallery_listing.php
deleted file mode 100644 (file)
index 58fa5e2..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-/**
- * Generic display for a single entity in gallery view.
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses string $vars['icon'] Full icon HTML to display.
- * @uses string $vars['info'] Info about the entity.
- */
-
-?>
-
-<div class="gallery_listing clearfix">
-       <div class="gallery_listing_icon">
-               <?php echo $vars['icon']; ?>
-       </div>
-       <div class="gallery_listing_info">
-               <?php echo $vars['info']; ?>
-       </div>
-</div>
diff --git a/views/default/entities/list.php b/views/default/entities/list.php
deleted file mode 100644 (file)
index 2ddd96e..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-/**
- * View a list of entities
- *
- * @package Elgg
- *
- */
-
-$context = $vars['context'];
-$offset = $vars['offset'];
-$entities = $vars['entities'];
-$limit = $vars['limit'];
-$count = $vars['count'];
-$base_url = $vars['baseurl'];
-$context = $vars['context'];
-$list_type = $vars['listtype'];
-$pagination = $vars['pagination'];
-$full_view = $vars['fullview'];
-
-$html = "";
-$nav = "";
-
-$list_type_toggle = elgg_get_array_value('listtypetoggle', $vars, true);
-
-if ($context == "search" && $count > 0 && $list_type_toggle) {
-       $nav .= elgg_view('navigation/listtype', array(
-               'baseurl' => $base_url,
-               'offset' => $offset,
-               'count' => $count,
-               'listtype' => $list_type,
-       ));
-}
-
-if ($pagination) {
-       $nav .= elgg_view('navigation/pagination', array(
-               'baseurl' => $base_url,
-               'offset' => $offset,
-               'count' => $count,
-               'limit' => $limit,
-       ));
-}
-
-if ($list_type == 'list') {
-       if (is_array($entities) && sizeof($entities) > 0) {
-               $html .= '<ul class="elgg-entity-list elgg-list">';
-               foreach ($entities as $entity) {
-                       $html .= '<li>';
-                       $html .= elgg_view_entity($entity, $full_view);
-                       $html .= '</li>';
-               }
-               $html .= '</ul>';
-       }
-} else {
-       if (is_array($entities) && sizeof($entities) > 0) {
-               $html .= elgg_view('entities/gallery', array('entities' => $entities));
-       }
-}
-
-if ($count) {
-       $html .= $nav;
-}
-
-echo $html;
diff --git a/views/default/entities/list_item.php b/views/default/entities/list_item.php
deleted file mode 100644 (file)
index 4b6636d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Generic display for a single entity in list view.
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses string $vars['icon'] Full icon HTML to display.
- * @uses string $vars['info'] Info about the entity.
- */
-?>
-<div class="listing entity-listing">
-       <div class="icon">
-               <?php echo $vars['icon']; ?>
-       </div>
-       <div class="info">
-               <?php echo $vars['info']; ?>
-       </div>
-</div>
diff --git a/views/default/graphics/icon.php b/views/default/graphics/icon.php
deleted file mode 100644 (file)
index 06e866d..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * Generic icon view.
- *
- * @package Elgg
- * @subpackage Core
- *
- * @uses $vars['entity'] The entity the icon represents - uses getIcon() method
- * @uses $vars['js'] Any JavaScript to add to img tag
- * @uses $vars['size'] topbar, tiny, small, medium (default), large, master
- * @uses $vars['link'] Optional link for the image
- * @uses $vars['align'] Align attribute of the img tag
- */
-
-$entity = $vars['entity'];
-
-$sizes = array('small','medium','large','tiny','master','topbar');
-// Get size
-if (!in_array($vars['size'], $sizes)) {
-       $vars['size'] = "medium";
-}
-
-// Get any align and js
-if (!empty($vars['align'])) {
-       $align = " align=\"{$vars['align']}\" ";
-} else {
-       $align = "";
-}
-
-
-?>
-<div class="icon">
-<?php
-if ($vars['link']) {
-       ?><a href="<?php echo $vars['link'] ?>"><?php
-}
-?>
-<img src="<?php echo $entity->getIcon($vars['size']); ?>" <?php echo $align; ?> <?php echo $vars['js']; ?> />
-<?php
-if ($vars['link']) {
-       ?></a><?php
-}
-?>
-</div>
\ No newline at end of file
index be2be475ee3da9eacb2764fd109b1c2d1480188e..bcb1b04fda3d34dd0a3c78d77fe2442d18677b5d 100644 (file)
@@ -8,11 +8,7 @@
  * @subpackage Core
  */
 
-$icon = elgg_view('graphics/icon', array(
-       'entity' => $vars['entity'],
-       'size' => 'small',
-));
-
+$icon = elgg_view_entity_icon($vars['entity'], 'small');
 
 $title = $vars['entity']->title;
 if (!$title) {