]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
changed name from media block to image block
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 19 Dec 2010 17:38:51 +0000 (17:38 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sun, 19 Dec 2010 17:38:51 +0000 (17:38 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7682 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/lib/river.php
engine/lib/views.php
mod/blog/views/default/object/blog.php
mod/riverdashboard/start.php
views/default/annotation/generic_comment.php
views/default/css/elements/layout.php
views/default/layout/objects/image_block.php [moved from views/default/layout/objects/media.php with 65% similarity]

index 459d351c1cc01d4e75d4f6984532b0724ba0b85c..dc9efda4d3ba09d4310f7cd18fc3dd41901bb6c5 100644 (file)
@@ -485,7 +485,7 @@ function elgg_view_river_item($item) {
                'pict_alt' => elgg_view('core/river/controls', array('item' => $item)),
                'class' => 'elgg-river-item',
        );
-       return elgg_view('layout/objects/media', $vars);
+       return elgg_view('layout/objects/image_block', $vars);
 }
 
 /**
index f314a93af0716225437b3887551aff85d6e72aa0..1f02d29d2cbc45ff54368e384e6bccb3ec0508a4 100644 (file)
@@ -1012,24 +1012,24 @@ function elgg_view_latest_comments($owner_guid, $type = 'object', $subtype = '',
        echo elgg_view('layout/objects/module', array('title' => $title, 'body' => $body));
 }
 /**
- * Wrapper function for the media display pattern.
+ * Wrapper function for the image block display pattern.
  *
  * Fixed width media on the side (image, icon, flash, etc.).
  * Descriptive content filling the rest of the column.
  *
- * This is a shortcut for {@elgg_view layout/objects/media}.
+ * This is a shortcut for {@elgg_view layout/objects/image_block}.
  *
- * @param string $picture The icon and other information
+ * @param string $image   The icon and other information
  * @param string $body    Description content
  * @param string $vars    Additional parameters for the view
  *
  * @return string
  * @since 1.8.0
  */
-function elgg_view_media($picture, $body, $vars = array()) {
-       $vars['pict'] = $picture;
+function elgg_view_image_block($image, $body, $vars = array()) {
+       $vars['image'] = $image;
        $vars['body'] = $body;
-       return elgg_view('layout/objects/media', $vars);
+       return elgg_view('layout/objects/image_block', $vars);
 }
 
 /**
@@ -1039,10 +1039,10 @@ function elgg_view_media($picture, $body, $vars = array()) {
  * @param string $info Any information that needs to be displayed.
  *
  * @return string The HTML (etc) representing the listing
- * @deprecated 1.8 use elgg_view_media()
+ * @deprecated 1.8 use elgg_view_image_block()
  */
 function elgg_view_listing($icon, $info) {
-       elgg_deprecated_notice('elgg_view_listing deprecated by elgg_view_media', 1.8);
+       elgg_deprecated_notice('elgg_view_listing deprecated by elgg_view_image_block', 1.8);
        return elgg_view('layout/objects/media', array('icon' => $icon, 'body' => $info));
 }
 
index 08e1740630b1d71e5b7f5af92c2212f26eab76c9..776408cc5ff20ac95ab14980c9c516606a386a83 100644 (file)
@@ -92,7 +92,7 @@ if ($full) {
 </div>
 HTML;
 
-       $blog_info = elgg_view_media($owner_icon, $info);
+       $blog_info = elgg_view_image_block($owner_icon, $info);
 
        echo <<<HTML
 $header
@@ -120,5 +120,5 @@ HTML;
        </div>
 HTML;
 
-       echo elgg_view_media($owner_icon, $body);
+       echo elgg_view_image_block($owner_icon, $body);
 }
index 6d15818730a8712370aea78949ac02003e1fe2dd..7955b494e099f5b5e2322a13d45b85d907ff363e 100644 (file)
@@ -364,27 +364,5 @@ function riverdashboard_view_river_item($item) {
                'class' => 'elgg-river-item',
                'id' => "river-entity-{$object->guid}",
        );
-       return elgg_view('layout/objects/media', $vars);
-/*
-       if (isset($item->view)) {
-               $object = get_entity($item->object_guid);
-               $subject = get_entity($item->subject_guid);
-               if (!$object || !$subject) {
-                       // probably means an entity is disabled
-                       return false;
-               } else {
-                       if (elgg_view_exists($item->view)) {
-                               $body = elgg_view($item->view, array(
-                                       'item' => $item
-                               ));
-                       }
-               }
-               return elgg_view('river/item/wrapper', array(
-                       'item' => $item,
-                       'body' => $body
-               ));
-       }
-       return false;
- * 
- */
+       return elgg_view('layout/objects/image_block', $vars);
 }
index c6fea8b41cd91db41838be1486bd6c398c9f450c..a7ab0a956f6a6f84779669d43cfa8b9ffbdf5931 100644 (file)
@@ -53,7 +53,7 @@ if ($full_view) {
 </p>
 HTML;
 
-       echo elgg_view_media($commenter_icon, $body);
+       echo elgg_view_image_block($commenter_icon, $body);
 
 } else {
        // brief view
@@ -68,5 +68,5 @@ HTML;
 </span>
 HTML;
 
-       echo elgg_view_media($commenter_icon, $body);
+       echo elgg_view_image_block($commenter_icon, $body);
 }
index 945a4a9519c3b47ee8d1db7caff160b9a8238bda..fce5eaed94502fae68e1b468bde363f3ce270634 100644 (file)
        padding: 3px 0;
 }
 
-.elgg-media .elgg-pict {
+.elgg-media .elgg-image {
        float: left;
        margin-right: 5px;
 }
-.elgg-media .elgg-pict-alt {
+.elgg-media .elgg-image.elgg-alt {
        float: right;
        margin-left: 5px;
 }
similarity index 65%
rename from views/default/layout/objects/media.php
rename to views/default/layout/objects/image_block.php
index 2b015bd050b157ab8f33a12cbdf5a1baf847ec34..79f8db138acea063f3dc1a02b1414610aa964eea 100644 (file)
@@ -1,27 +1,27 @@
 <?php
 /**
- * Elgg media element
+ * Elgg image block pattern
  *
  * 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  |
+ * |  image   |               body                   |   image   |
  * |  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['image']       HTML content of the image block
+ * @uses $vars['image_alt']   HTML content of the alternate image 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, '');
+$image_block = elgg_get_array_value('image', $vars, '');
+$alt_image_block = elgg_get_array_value('image_alt', $vars, '');
 
 $class = 'elgg-media';
 $additional_class = elgg_get_array_value('class', $vars, '');
@@ -37,16 +37,16 @@ if (isset($vars['id'])) {
 
 $body = "<div class=\"elgg-body\">$body</div>";
 
-if ($pict_block) {
-       $pict_block = "<div class=\"elgg-pict\">$pict_block</div>";
+if ($image_block) {
+       $image_block = "<div class=\"elgg-image\">$image_block</div>";
 }
 
-if ($alt_pict_block) {
-       $alt_pict_block = "<div class=\"elgg-pict-alt\">$alt_pict_block</div>";
+if ($alt_image_block) {
+       $alt_image_block = "<div class=\"elgg-image elgg-alt\">$alt_image_block</div>";
 }
 
 echo <<<HTML
 <div class="$class clearfix" $id>
-       $pict_block$alt_pict_block$body
+       $image_block$alt_image_block$body
 </div>
 HTML;