public function displayExemple() { $cmds = cmd::byTypeSubType($this->getType(), $this->getSubtype()); if (count($cmds) < 1) { return __('Il n\'y a aucune commande de type : ', __FILE__) . $this->getType() . __(' et de sous-type : ', __FILE__) . $this->getSubtype(); } $usedBy = $this->getUsedBy(); if (count($usedBy) > 0) { foreach ($usedBy as $cmd) { $cmd->setTemplate($this->getVersion(), $this->getName()); $html = $cmd->toHtml($this->getVersion()); if (trim($html) != '') { $color = $cmd->getEqLogic()->getBackgroundColor($this->getVersion()); return array('html' => '<div class="eqLogic-widget" style="background-color : ' . $color . ';">' . $html . '</div>', 'cmd_humanname' => $cmd->getHumanName()); } } } foreach ($cmds as $cmd) { $cmd->setTemplate($this->getVersion(), $this->getName()); $html = $cmd->toHtml($this->getVersion()); if (trim($html) != '') { $color = $cmd->getEqLogic()->getBackgroundColor($this->getVersion()); return array('html' => '<div class="eqLogic-widget" style="background-color : ' . $color . ';">' . $html . '</div>', 'cmd_id' => $cmd->getId(), 'cmd_humanname' => $cmd->getHumanName()); } } }
public function displayExemple() { $cmds = cmd::byTypeSubType($this->getType(), $this->getSubtype()); if (count($cmds) < 1) { return 'Il n\'y a aucune commande de type : ' . $this->getType() . ' et de sous-type : ' . $this->getSubtype(); } foreach ($cmds as $cmd) { $cmd->setTemplate($this->getVersion(), $this->getName()); $html = $cmd->toHtml($this->getVersion()); if (trim($html) != '') { return $html; } } }
<a class="btn btn-success pull-right bt_applyWidgetToCmd" data-path="<?php echo $widget->getPath(); ?> " style="color : white;" data-version=""><i class="fa fa-check"></i> {{Valider}}</a> </div> <br/><br/> <table class="table table-bordered table-condensed tablesorter" id="table_applyWidget"> <thead> <tr> <th></th><th>{{Object}}</th><th>{{Equipement}}</th><th>{{Commande}}</th><th>{{Unité}}</th> </tr> </thead> <tbody> <?php foreach (cmd::byTypeSubType($widget->getType(), $widget->getSubType()) as $cmd) { $eqLogic = $cmd->getEqLogic(); if ($eqLogic->getIsEnable() == 0 || $eqLogic->getIsVisible() == 0 || $cmd->getIsVisible() == 0) { continue; } if (is_object($eqLogic)) { $object = $eqLogic->getObject(); } else { $object = null; } echo '<tr data-cmd_id="' . $cmd->getId() . '">'; echo '<td>'; if ($widget->getName() == $cmd->getTemplate($widget->getVersion())) { echo '<input class="applyWidget" type="checkbox" checked />'; } else { echo '<input class="applyWidget" type="checkbox" />';
<div style="display: none;" id="md_cmdConfigureSelectMultipleAlert"></div> <div> <a class="btn btn-default" id="bt_cmdConfigureSelectMultipleAlertToogle" data-state="0"><i class="fa fa-check-circle-o"></i> {{Basculer}}</a> <a class="btn btn-success pull-right" id="bt_cmdConfigureSelectMultipleAlertApply" style="color : white;" ><i class="fa fa-check"></i> {{Valider}}</a> </div> <br/> <table class="table table-bordered table-condensed tablesorter" id="table_cmdConfigureSelectMultiple"> <thead> <tr> <th></th> <th>{{Nom}}</th> </tr> </thead> <tbody> <?php foreach (cmd::byTypeSubType($cmd->getType(), $cmd->getSubType()) as $listCmd) { echo '<tr data-cmd_id="' . $listCmd->getId() . '">'; echo '<td>'; if ($listCmd->getId() == $cmd->getId()) { echo '<input type="checkbox" data-size="mini" class="selectMultipleApplyCmd bootstrapSwitch" checked/>'; } else { echo '<input type="checkbox" data-size="mini" class="selectMultipleApplyCmd bootstrapSwitch" />'; } echo '</td>'; echo '<td>'; echo $listCmd->getHumanName(true); echo '</td>'; echo '</tr>'; } ?> </tbody>