Skip to content

Commit

Permalink
changed: reworked object view
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Apr 13, 2018
1 parent 3f638df commit 0c62464
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions views/default/object/csv_export.php
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
<?php

$entity = elgg_extract('entity', $vars);
if (!($entity instanceof CSVExport)) {
if (!$entity instanceof CSVExport) {
return;
}

// entity menu
$entity_menu = '';
if (!elgg_in_context('widgets')) {
$entity_menu = elgg_view_menu('entity', [
'entity' => $entity,
'handler' => 'csv_exporter',
'sort_by' => 'priority',
'class' => 'elgg-menu-hz',
]);
}

// entity icon
$entity_icon = elgg_view_entity_icon($entity, 'small');

// prepare some content
$content = '';
if ($entity->isProcessing()) {
Expand All @@ -36,11 +22,7 @@
$params = [
'entity' => $entity,
'title' => $entity->getDisplayName(),
'metadata' => $entity_menu,
'subtitle' => elgg_view('page/elements/by_line', $vars),
'content' => $content,
];
$params = $params + $vars;
$list_body = elgg_view('object/elements/summary', $params);

echo elgg_view_image_block($entity_icon, $list_body);
echo elgg_view('object/elements/summary', $params);

0 comments on commit 0c62464

Please sign in to comment.