Permalink
Browse files

feat(views): simplefied redering object summary in full view

  • Loading branch information...
jeabakker committed Apr 23, 2018
1 parent 6991d60 commit 6d15b06a6fd0207999238c22c6ed2b2eaf7d9946
Showing with 15 additions and 4 deletions.
  1. +15 −4 views/default/object/elements/full/header.php
@@ -1,16 +1,27 @@
<?php
/**
* Object full view header
*
* @uses $vars['icon'] HTML for the content icon
* @uses $vars['summary'] HTML for the content summary
* @uses $vars['icon'] HTML for the content icon
* @uses $vars['summary'] HTML for the content summary
* @uses $vars['header_params'] Vars to pass to image block/header wrapper
* @uses $vars['show_summary'] (bool) render the object/elements/summary view
*/
$show_summary = (bool) elgg_extract('show_summary', $vars, false);
if ($show_summary) {
$image_block_vars = (array) elgg_extract('image_block_vars', $vars, []);
$image_block_vars['class'] = elgg_extract_class($image_block_vars, ['elgg-listing-full-header']);
$vars['image_block_vars'] = $image_block_vars;
$vars['title'] = elgg_extract('title', $vars, false);
echo elgg_view('object/elements/summary', $vars);
return;
}
$icon = elgg_extract('icon', $vars);
$summary = elgg_extract('summary', $vars);
if (!$icon && !$summary) {
return;
}

0 comments on commit 6d15b06

Please sign in to comment.