m.view.html.php 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * The view mobile view file of trip module of ZDOO.
  4. *
  5. * @copyright Copyright 2009-2016 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
  6. * @license ZPL (http://zpl.pub/page/zplv12.html)
  7. * @author Tingting Dai <daitingting@xirangit.com>
  8. * @package trip
  9. * @version $Id
  10. * @link http://www.zdoo.com
  11. */
  12. if($extView = $this->getExtViewFile(__FILE__)){include $extView; return helper::cd();}
  13. $moduleMenu = false;
  14. $bodyClass = 'with-nav-bottom';
  15. $browseLink = !empty($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : inlink('personal');
  16. include "../../common/view/m.header.html.php";
  17. ?>
  18. <div id='page' class='list-with-actions'>
  19. <div class='section'>
  20. <div class='heading gray'>
  21. <div class='title'><i class='icon-calendar'> </i><?php echo $lang->$type->view;?></div>
  22. <nav class='nav'><a class='btn primary' href='<?php echo $browseLink;?>'><?php echo $lang->goback;?></a></nav>
  23. </div>
  24. <div class='box'>
  25. <table class='table bordered table-detail'>
  26. <tr>
  27. <td class='w-110px'><?php echo $lang->$type->createdBy;?></td>
  28. <td><?php echo zget($users, $trip->createdBy);?></td>
  29. </tr>
  30. <tr>
  31. <td><?php echo $lang->$type->name;?></td>
  32. <td><?php echo $trip->name;?></td>
  33. </tr>
  34. <?php if(!empty($trip->customers)):?>
  35. <tr>
  36. <td><?php echo $lang->$type->customer;?></td>
  37. <td>
  38. <?php foreach(explode(',', $trip->customers) as $customer) echo "<div>" . zget($customers, $customer) . "</div>";?>
  39. </td>
  40. </tr>
  41. <?php endif;?>
  42. <tr>
  43. <td><?php echo $lang->$type->begin;?></td>
  44. <td><?php echo $trip->begin . ' ' . $trip->start;?></td>
  45. </tr>
  46. <tr>
  47. <td><?php echo $lang->$type->end;?></td>
  48. <td><?php echo $trip->end . ' ' . $trip->finish;?></td>
  49. </tr>
  50. <?php if($type == 'trip'):?>
  51. <tr>
  52. <td><?php echo $lang->$type->from;?></td>
  53. <td><?php echo $trip->from;?></td>
  54. </tr>
  55. <?php endif;?>
  56. <tr>
  57. <td><?php echo $lang->$type->to;?></td>
  58. <td><?php echo $trip->to;?></td>
  59. </tr>
  60. <?php if(!empty($trip->desc)):?>
  61. <tr>
  62. <td><?php echo $lang->$type->desc;?></td>
  63. <td><?php echo $trip->desc;?></td>
  64. </tr>
  65. <?php endif;?>
  66. </table>
  67. </div>
  68. </div>
  69. <nav class='nav affix dock-bottom nav-auto footer-actions'>
  70. <?php if($trip->createdBy == $this->app->user->account):?>
  71. <a data-remote='<?php echo $this->createLink("$type", 'edit', "id={$trip->id}");?>' data-display='modal' data-placement='bottom'><?php echo $lang->edit;?></a>
  72. <a data-remote='<?php echo $this->createLink("$type", 'delete', "id=$trip->id");?>' data-display='ajaxAction' data-ajax-delete='true' data-locate='<?php echo $this->createLink("$type", 'browse');?>'><?php echo $lang->delete;?></a>
  73. <?php endif;?>
  74. </nav>
  75. </div>
  76. <?php include "../../common/view/m.footer.html.php"; ?>