diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-11 23:20:50 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-12-11 23:20:50 +0000 |
commit | 017c3717c84b319f1977f742d2705f97a3be06b2 (patch) | |
tree | 1cacaba80c1ce14956c4efb8d90df366b2dcb313 /views/default | |
parent | 0f2fb0a3e338d926502c73772b15ba7d4f034034 (diff) | |
download | elgg-017c3717c84b319f1977f742d2705f97a3be06b2.tar.gz elgg-017c3717c84b319f1977f742d2705f97a3be06b2.tar.bz2 |
added alternate picture block to css media object
git-svn-id: http://code.elgg.org/elgg/trunk@7602 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r-- | views/default/css/elements/page_layout.php | 6 | ||||
-rw-r--r-- | views/default/layout/objects/media.php | 23 |
2 files changed, 21 insertions, 8 deletions
diff --git a/views/default/css/elements/page_layout.php b/views/default/css/elements/page_layout.php index 87a3b38b1..24445ea01 100644 --- a/views/default/css/elements/page_layout.php +++ b/views/default/css/elements/page_layout.php @@ -61,13 +61,17 @@ float: left; margin-right: 5px; } - +.elgg-media .elgg-pict-alt { + float: right; + margin-left: 5px; +} .elgg-list { border-top: 1px dotted #CCCCCC; margin: 5px 0; + clear: both; } .elgg-list li { diff --git a/views/default/layout/objects/media.php b/views/default/layout/objects/media.php index 6fee91932..f91f9e0ab 100644 --- a/views/default/layout/objects/media.php +++ b/views/default/layout/objects/media.php @@ -2,21 +2,26 @@ /** * Elgg media element * - * --------------------------------------------------- - * | | | - * | picture | body | - * | block | block | - * | | | - * --------------------------------------------------- + * Common pattern where there is an image, icon, media object to the left + * and a descriptive block of text to the left. + * + * --------------------------------------------------------------- + * | | | 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, ''); @@ -36,8 +41,12 @@ 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$body + $pict_block$alt_pict_block$body </div> HTML; |