browse.html.php 5.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php include $app->getModuleRoot() . 'common/view/sortable.html.php';?>
  3. <?php js::set('confirmDelete', $lang->measurement->confirmDelete);?>
  4. <?php js::set('orderBy', $orderBy);?>
  5. <div id="mainMenu" class="clearfix menu-secondary">
  6. <div class="btn-toolbar pull-left">
  7. <?php include './menu.html.php';?>
  8. <a class="btn btn-link querybox-toggle" id='bysearchTab'><i class="icon icon-search muted"></i> <?php echo $lang->measurement->byQuery;?></a>
  9. </div>
  10. <div class="btn-toolbar pull-right">
  11. <?php common::printLink('measurement', 'createBasic', "", "<i class='icon icon-plus'></i>" . $lang->measurement->create, '', "class='btn btn-primary '", '');?>
  12. </div>
  13. </div>
  14. <div id='mainContent' class='main-row'>
  15. <div class="main-col">
  16. <div class="cell<?php if($browseType == 'bysearch') echo ' show';?>" id="queryBox" data-url="<?php echo $this->createLink('search', 'buildOldForm', 'module=measurement');?>" data-module='measurement'></div>
  17. <form class="main-table" data-ride='table' method='post' action='<?php echo $this->createLink('measurement', 'batchEdit');?>'>
  18. <table class="table table-fixed has-sort-head" id='measList'>
  19. <thead>
  20. <tr>
  21. <?php $batchEdit = common::hasPriv('measurement', 'batchEdit');?>
  22. <?php $vars = "browseType=$browseType&param=$param&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
  23. <th class='c-id'>
  24. <?php if($batchEdit):?>
  25. <div class="checkbox-primary check-all" title="<?php echo $lang->selectAll;?>">
  26. <label></label>
  27. </div>
  28. <?php endif;?>
  29. <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
  30. </th>
  31. <th class='w-60px text-left'><?php common::printOrderLink('purpose', $orderBy, $vars, $lang->measurement->purpose);?></th>
  32. <th class='w-60px text-left'><?php common::printOrderLink('scope', $orderBy, $vars, $lang->measurement->scope);?></th>
  33. <th class='w-60px text-left'><?php common::printOrderLink('object', $orderBy, $vars, $lang->measurement->object);?></th>
  34. <th class='text-left'><?php common::printOrderLink('name', $orderBy, $vars, $lang->measurement->name);?></th>
  35. <th class='w-170px text-left'><?php common::printOrderLink('code', $orderBy, $vars, $lang->measurement->code);?></th>
  36. <th class='w-80px'><?php common::printOrderLink('unit', $orderBy, $vars, $lang->measurement->unit);?></th>
  37. <th class=''><?php common::printOrderLink('definition', $orderBy, $vars, $lang->measurement->definition);?></th>
  38. <th class='c-actions text-center'><?php echo $lang->actions;?></th>
  39. <th class='w-60px'><?php echo $lang->measurement->order;?></th>
  40. </tr>
  41. </thead>
  42. <tbody class='sortable' id="measurementList">
  43. <?php foreach ($measurementList as $key => $measurement):?>
  44. <tr data-id="<?php echo $measurement->id;?>">
  45. <td class="c-id">
  46. <?php if($batchEdit):?>
  47. <?php echo html::checkbox('measurement', array($measurement->id => '')) . html::a($this->createLink('measurement', 'setSQL', "measurementID=$measurement->id"), sprintf('%03d', $measurement->id));?>
  48. <?php else:?>
  49. <?php echo sprintf('%03d', $measurement->id);?>
  50. <?php endif;?>
  51. </td>
  52. <td class='text-left'><?php echo zget($lang->measurement->purposeList, $measurement->purpose);?></td>
  53. <td class='text-left'><?php echo zget($lang->measurement->scopeList, $measurement->scope);?></td>
  54. <td class='text-left'><?php echo zget($lang->measurement->objectList, $measurement->object);?></td>
  55. <td class='text-left' title="<?php echo $measurement->name;?>"><?php echo html::a(inlink('setSQL', "measurementID=$measurement->id"), $measurement->name);?></td>
  56. <td class='text-left'><?php echo html::a(inlink('setSQL', "measurementID=$measurement->id"), $measurement->code);?></td>
  57. <td class='nowrap' title=<?php echo $measurement->unit;?>><?php echo $measurement->unit;?></td>
  58. <td class='text-left nowrap' title="<?php echo $measurement->definition;?>"><?php echo $measurement->definition;?></td>
  59. <td class="text-center c-actions">
  60. <?php common::printIcon('measurement', 'setSQL', "measurementID=$measurement->id", $measurement, 'list', 'pencil');?>
  61. <?php common::printIcon('measurement', 'editBasic', "measurementID=$measurement->id", $measurement, 'list', 'edit');?>
  62. <?php
  63. if(common::hasPriv('measurement', 'delete'))
  64. {
  65. $deleteURL = helper::createLink('measurement', 'delete', "measurementID=$measurement->id&confirm=yes");
  66. echo html::a("javascript:ajaxDelete(\"$deleteURL\",\"measList\",confirmDelete)", '<i class="icon-common-delete icon-trash"></i>', '', "title='{$lang->measurement->delete}' class='btn'");
  67. }
  68. ?>
  69. </td>
  70. <td class='sort-handler' title='<?php echo $lang->dragAndSort?>'><i class='icon-move'></i></td>
  71. </tr>
  72. <?php endforeach;?>
  73. </tbody>
  74. </table>
  75. <div class='table-footer'>
  76. <?php if($batchEdit):?>
  77. <div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
  78. <div class="table-actions btn-toolbar"><?php echo html::submitButton($lang->edit, '', 'btn');?></div>
  79. <?php endif;?>
  80. <?php $pager->show('right', 'pagerjs');?>
  81. </div>
  82. </form>
  83. </div>
  84. </div>
  85. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>