Skip to content

Commit

Permalink
show cross/check for better status display (CRUD list)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpetrasch committed Aug 6, 2015
1 parent ac870e3 commit d22ddc7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/admin/ngrest/plugins/ToggleStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ class ToggleStatus extends \admin\ngrest\base\Plugin
{
public function renderList($doc)
{
$elmn = $doc->createElement('span', '{{item.'.$this->name.'}}');
$doc->appendChild($elmn);
$activatedElement = $doc->createElement('span');
$activatedElement->setAttribute("ng-class", "{'mdi-navigation-check' : item.".$this->name."}");

$disabledElement = $doc->createElement('span');
$disabledElement->setAttribute("ng-class", "{'mdi-navigation-close' : !item.".$this->name."}");

$doc->appendChild($activatedElement);
$doc->appendChild($disabledElement);
return $doc;
}

Expand Down

0 comments on commit d22ddc7

Please sign in to comment.