delivery_json.tpl.php 1.2 KB

1234567891011121314151617181920212223
  1. <?php
  2. print '<div id="DCuserData" style="width: 100%, height:100%">';
  3. print '<table style="width:100%;">';
  4. print '<tr><td colspan="4">&nbsp;</td></tr>';
  5. print '<tr><td colspan="4"><div class="center devicelist">' . $langs->trans('DevicesList') . '</div></td></tr>';
  6. if (isset($JSON->block2)) {
  7. foreach ($JSON->block2 as $device) {
  8. print '<tr style="height: 35px;"><td style="width:200px;">' . $device->ref . '</td><td style="width:350px;" colspan="2">' . $device->title . '</td></tr>';
  9. }
  10. }
  11. if ($JSON->changes) {
  12. foreach ($JSON->changes as $record) {
  13. $refArray = explode('_', $record->ref);
  14. print '<tr style="height: 35px;"><td style="width:200px;">' . str_replace('_', ' ', $record->ref) . '</td><td style="width:350px;">' . $record->title . ' </td><td class="fields">' . $refArray[1] . '</td></tr>';
  15. }
  16. }
  17. if (isset($JSON->additionals)) {
  18. foreach ($JSON->additionals as $additionalKey => $additionalValue) {
  19. $pieces = $additionalKey == 'bp_card' ? ' ' . $langs->trans('Pieces') : '';
  20. print '<tr style="height: 35px;"><td style="width:200px;">' . $helper->getAdditionalTitle($additionalKey) . '</td><td style="width:350px;">' . $additionalValue . ' </td><td class="fields">' . $pieces . '</td></tr>';
  21. }
  22. }
  23. ?>