browse.html.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <?php
  2. /**
  3. * The browse view file of client module of XXB.
  4. *
  5. * @copyright Copyright 2009-2017 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
  6. * @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Memory <lvtao@cnezsoft.com>
  8. * @package client
  9. * @version $Id$
  10. * @link http://xuan.im
  11. */
  12. $this->app->loadLang('im');
  13. $position[] = html::a($this->createLink('admin', 'xuanxuan'), $this->lang->im->common);
  14. $position[] = $this->lang->client->browse;
  15. ?>
  16. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  17. <div id='mainContent' class='main-content'>
  18. <div class='main-header'>
  19. <div class='pull-right'>
  20. <?php common::printLink('client', 'create', '', $lang->client->create, '', "class='btn' data-toggle='modal'");?>
  21. </div>
  22. <div class='heading'>
  23. <h4><?php echo $lang->client->browseVersion;?></h4>
  24. </div>
  25. </div>
  26. <table class='table table-hover'>
  27. <thead>
  28. <tr class="text-center">
  29. <th class="w-80px"><?php echo $lang->client->id?></th>
  30. <th class="w-150px"><?php echo $lang->client->version?></th>
  31. <th class="text-left"><?php echo $lang->client->desc?></th>
  32. <th class="w-150px"><?php echo $lang->client->strategy?></th>
  33. <th class="w-150px"><?php echo $lang->client->releaseStatus?></th>
  34. <th class="w-120px"><?php echo $lang->actions?></th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <?php foreach($clients as $client):?>
  39. <tr class="text-center">
  40. <td><?php echo $client->id?></td>
  41. <td><?php echo $client->version?></td>
  42. <td class="text-left" title='<?php echo $client->desc;?>'><?php echo $client->desc?></td>
  43. <td><?php echo $lang->client->strategies[$client->strategy]?></td>
  44. <td><?php echo $lang->client->status[$client->status]?></td>
  45. <td>
  46. <?php commonModel::printLink('client', 'edit', "id={$client->id}", $lang->edit, '', "data-toggle='modal'");?>
  47. <?php commonModel::printLink('client', 'delete', "id={$client->id}", $lang->delete, '', "class='deleter'");?>
  48. </td>
  49. </tr>
  50. <?php endforeach;?>
  51. </tbody>
  52. </table>
  53. </div>
  54. <?php if($this->config->edition == 'open'):?>
  55. <script>
  56. $(function()
  57. {
  58. $('.deleter').on('click', function()
  59. {
  60. $deleter = $(this);
  61. if(confirm('<?php echo $lang->confirmDelete?>'))
  62. {
  63. $.getJSON($deleter.attr('href'), function(data)
  64. {
  65. if(data.result != 'success') alert(data.message);
  66. return location.reload();
  67. });
  68. }
  69. return false;
  70. });
  71. })
  72. </script>
  73. <?php endif;?>
  74. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>