version.html.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php
  3. $initItem = html::select('unit[]', $versionForm, 0, 'class="form-control unit-col-7" onchange="changeOption(this)"');
  4. $initItem .= html::input('unit[]', '', 'autocomplete="on" class="form-control hidden"');
  5. $initItem .= html::select('unit[]', $joint, 1, 'class="form-control unit-col-3 border-left" onchange="change()"');
  6. $initItem .= html::input('unit[]', '', 'autocomplete="on" class="form-control hidden"');
  7. $itemRow = <<<EOT
  8. <tr class="text-center">
  9. <td class='unitBox'>
  10. {$initItem}
  11. </td>
  12. <td class="c-actions">
  13. <a href="javascript:void(0)" onclick="addOptions(this)" class="btn btn-link"><i class="icon-plus"></i></a>
  14. <a href="javascript:void(0)" onclick="delOptions(this)" class="btn btn-link"><i class="icon-close"></i></a>
  15. </td>
  16. </tr>
  17. EOT;
  18. ?>
  19. <?php js::set('itemRow', $itemRow)?>
  20. <?php js::set('user', $this->app->user->account)?>
  21. <?php $unitGroup = ''?>
  22. <style>.versionCase{color: #449f00;}</style>
  23. <div id='mainMenu' class='clearfix'>
  24. <div id="sidebarHeader">
  25. <div class="title">
  26. <?php
  27. if($object)
  28. {
  29. echo zget($objectType, $object);
  30. echo html::a(inlink($method, "type=$type&object="), "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
  31. }
  32. else
  33. {
  34. echo $lang->reviewcl->browseByType;
  35. }
  36. ?>
  37. </div>
  38. </div>
  39. <div class='bg-white'>
  40. <?php include '../../reviewcl/view/menu.html.php';?>
  41. </div>
  42. </div>
  43. <div id="mainContent" class="main-row">
  44. <div class="side-col" id='sidebar'>
  45. <div class="cell">
  46. <div class="list-group">
  47. <?php foreach ($objectType as $key => $obj):?>
  48. <?php if(empty($key) or empty($obj)) continue;?>
  49. <?php $key == $object ? $active = 'class="active"' : $active = '';?>
  50. <?php echo html::a($this->createLink('reviewsetting', $method, "type=$type&object=$key"), $obj, '', $active);?>
  51. <?php endforeach;?>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="main-col">
  56. <div class="main-content">
  57. <form class="load-indicator main-form form-ajax" method="post">
  58. <div class="main-header">
  59. <div class="heading">
  60. <strong><?php echo $lang->reviewsetting->setting . zget($objectType, $object) . $lang->reviewsetting->version;?></strong>
  61. </div>
  62. </div>
  63. <table class="table table-form active-disabled table-condensed mw-800px version-box">
  64. <tbody>
  65. <?php if($result):?>
  66. <?php if($result->unit):?>
  67. <?php foreach ($result->unit as $unit):?>
  68. <tr class="text-center">
  69. <td class='unitBox'>
  70. <?php $unit[0] == 'fixed' ? $unitSelect = 'unit-col-3' : $unitSelect = 'unit-col-7';?>
  71. <?php $unit[0] == 'fixed' ? $unitInput = 'unit-col-4' : $unitInput = 'hidden';?>
  72. <?php echo html::select('unit[]', $versionForm, $unit[0], 'class="form-control ' . $unitSelect . '" onchange="changeOption(this)"')?>
  73. <?php echo html::input('unit[]', $unit[1], 'autocomplete="on" class="form-control ' . $unitInput . ' border-left"')?>
  74. <?php echo html::select('unit[]', $joint, $unit[2], 'class="form-control unit-col-3 border-left" onchange="change()"');?>
  75. <?php echo html::input('unit[]', $unit[3], 'autocomplete="on" class="form-control hidden"')?>
  76. </td>
  77. <td class="c-actions">
  78. <a href="javascript:void(0)" onclick="addOptions(this)" class="btn btn-link"><i class="icon-plus"></i></a>
  79. <a href="javascript:void(0)" onclick="delOptions(this)" class="btn btn-link"><i class="icon-close"></i></a>
  80. </td>
  81. </tr>
  82. <?php endforeach;?>
  83. <?php else:?>
  84. <tr class="text-center">
  85. <td class='unitBox'>
  86. <?php echo html::select('unit[]', $versionForm, 0, 'class="form-control unit-col-7" onchange="changeOption(this)"')?>
  87. <?php echo html::input('unit[]', '', 'autocomplete="on" class="form-control hidden"')?>
  88. <?php echo html::select('unit[]', $joint, 1, 'class="form-control unit-col-3 border-left" onchange="change()"');?>
  89. <?php echo html::input('unit[]', '', 'autocomplete="on" class="form-control hidden"')?>
  90. </td>
  91. <td class="c-actions">
  92. <a href="javascript:void(0)" onclick="addOptions(this)" class="btn btn-link"><i class="icon-plus"></i></a>
  93. <a href="javascript:void(0)" onclick="delOptions(this)" class="btn btn-link"><i class="icon-close"></i></a>
  94. </td>
  95. </tr>
  96. <?php endif;?>
  97. <tr>
  98. <td colspan="2">
  99. <span class="padding"><?php echo $lang->reviewsetting->padding;?> </span>
  100. <?php echo html::radio('padding', $lang->reviewsetting->confirm, $result->padding);?>
  101. </td>
  102. </tr>
  103. <?php else:?>
  104. <tr class="text-center">
  105. <td class='unitBox'>
  106. <?php echo html::select('unit[]', $versionForm, 0, 'class="form-control unit-col-7" onchange="changeOption(this)"')?>
  107. <?php echo html::input('unit[]', '', 'autocomplete="on" class="form-control hidden"')?>
  108. <?php echo html::select('unit[]', $joint, 1, 'class="form-control unit-col-3 border-left" onchange="change()"');?>
  109. <?php echo html::input('unit[]', '', 'autocomplete="on" class="form-control hidden"')?>
  110. </td>
  111. <td class="c-actions">
  112. <a href="javascript:void(0)" onclick="addOptions(this)" class="btn btn-link"><i class="icon-plus"></i></a>
  113. <a href="javascript:void(0)" onclick="delOptions(this)" class="btn btn-link"><i class="icon-close"></i></a>
  114. </td>
  115. </tr>
  116. <tr>
  117. <td colspan="2">
  118. <span class="padding"><?php echo $lang->reviewsetting->padding;?> </span>
  119. <?php echo html::radio('padding', $lang->reviewsetting->confirm, '1');?>
  120. </td>
  121. </tr>
  122. <?php endif;?>
  123. <tr>
  124. <td>
  125. <span><?php echo $lang->reviewsetting->versionCase;?></span>
  126. <span class="versionCase"></span>
  127. </td>
  128. </tr>
  129. <tr>
  130. <td colspan="2" class="text-center form-actions">
  131. <?php echo html::hidden('object', $object);?>
  132. <?php echo html::submitButton($lang->save, "btn btn-wide btn-primary");?>
  133. <?php echo html::backButton();?>
  134. </td>
  135. </tr>
  136. </tbody>
  137. </table>
  138. </form>
  139. </div>
  140. </div>
  141. </div>
  142. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>