Skip to content

Commit

Permalink
Dev: Add Cint order info in grid view
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Aug 8, 2016
1 parent d2d91e0 commit 322b9ba
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
18 changes: 18 additions & 0 deletions application/core/plugins/CintLink/model/CintLinkOrder.php
Expand Up @@ -227,4 +227,22 @@ public function getButtons()

}

/**
* Traverse raw HTML and get target groups info.
* Used in grid view.
* @return string
*/
public function getInfo()
{
$result = '';
$raw = $this->raw;
$xml = new SimpleXmlElement($raw);
$targetGroup = $xml->{'target-group'};
foreach ($targetGroup->children() as $target) {
$result .= (string) $target->name . ', ';
}
$result = trim($result, ', ');
return $result;
}

}
5 changes: 5 additions & 0 deletions application/core/plugins/CintLink/views/dashboard.php
Expand Up @@ -53,6 +53,11 @@
'header' => $plugin->gT('Ordered by'),
'value' => '$data->user->full_name'
);
$columns[] = array(
'name' => 'info',
'header' => $plugin->gT('Info'),
'value' => '$data->info'
);
$columns[] = array(
'name' => '__completedCheck',
'header' => '',
Expand Down

0 comments on commit 322b9ba

Please sign in to comment.