Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

surveyList.view copy.php 7.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?php echo $this->partial('Layout/nav'); ?>
  2. <div class="container-fluid">
  3. <div class="container-page-wrapper shodowed bordered">
  4. <div class="container-page-container">
  5. <div class="row">
  6. <div class="col-lg-6">
  7. <h1><?php echo $this->actionTitle; ?></h1>
  8. </div>
  9. <div class="col-lg-6 clearfix">
  10. <div class="float-right">
  11. <button type="button" class="btn btn-info btn-refresh-list"><span class="icon-loop2"></span></button>
  12. </div>
  13. </div>
  14. </div>
  15. <?php //debug($this->view->survey); ?>
  16. <?php if(is_array($this->view->survey)): ?>
  17. <?php echo $this->partial('Layout/pagination'); ?>
  18. <form id="form-survey-list">
  19. <div class="table-overflow">
  20. <table class="table table-striped">
  21. <thead>
  22. <th width="1%"></th>
  23. <th width="1%"></th>
  24. <th width="1%"></th>
  25. <th width="1%"></th>
  26. <th class="text-center" width="1%">#ID</th>
  27. <th>Tipo</th>
  28. <?php if($this->view->isGlobal): ?>
  29. <th>Gestore</th>
  30. <?php endif; ?>
  31. <th>Paziente</th>
  32. <th>E-mail</th>
  33. <th>Tel.</th>
  34. <th class="text-center"><?php echo _('Opened'); ?></th>
  35. <th class="text-center">Compilato</th>
  36. <th><?php echo _('Sent'); ?></th>
  37. <th width="1%"></th>
  38. <th width="1%"></th>
  39. <th width="1%"></th>
  40. </thead>
  41. <tbody>
  42. <tr>
  43. <td></td>
  44. <td></td>
  45. <td></td>
  46. <td></td>
  47. <td></td>
  48. <td>
  49. <select class="form-control request-search-ctrl" name="searchData[survey_type]">
  50. <option value=""></option>
  51. <?php foreach($this->view->typeList as $id => $label): ?>
  52. <option value="<?php echo $id; ?>" <?php echo $this->session->getSessionValue('search_survey_type') == $id ? 'selected' : ''; ?> ><?php echo $label; ?></option>
  53. <?php endforeach; ?>
  54. </select>
  55. </td>
  56. <?php if($this->view->isGlobal): ?>
  57. <td></td>
  58. <?php endif; ?>
  59. <td>
  60. <input type="text" class="form-control request-search-ctrl" name="searchData[survey_patient]" value="<?php echo trim($this->session->getSessionValue('search_survey_patient')) != '' ? trim($this->session->getSessionValue('search_survey_patient')) : ''; ?>" style="width: 180px;">
  61. </td>
  62. <td></td>
  63. <td></td>
  64. <td></td>
  65. <td></td>
  66. <td></td>
  67. <td></td>
  68. <td></td>
  69. <td>
  70. <a class="btn btn-outline-dark btn-sm" href="/survey-list/<?php echo time(); ?>/created_at/desc/1"><i class="fa fa-search" aria-hidden="true"></i></a>
  71. </td>
  72. </tr>
  73. <?php foreach($this->view->survey as $item): ?>
  74. <tr class="<?php if((bool)$item['email_failure']) echo 'cell-danger'; ?>">
  75. <td>
  76. <?php if((bool)$item['aswered_recipient']): ?>
  77. <button type="button" class="btn btn-outline-dark btn-sm btn-survey-preview" data-surveyid="<?php echo $item['survey_id']; ?>"><i class="fa fa-eye" aria-hidden="true"></i></button>
  78. <?php endif; ?>
  79. </td>
  80. <td class="text-center">
  81. <?php if((int)$item['remote_added'] == 1): ?>
  82. <i class="fa fa-upload" aria-hidden="true"></i>
  83. <?php endif; ?>
  84. </td>
  85. <td class="text-center">
  86. <?php if($item['attach_count'] > 0): ?>
  87. <i class="fa fa-paperclip" aria-hidden="true" title="<?php echo $item['attach_count']; ?>"></i>
  88. <?php endif; ?>
  89. </td>
  90. <td class="text-center">
  91. <?php if((bool)$item['email_failure']): ?>
  92. <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
  93. <?php endif; ?>
  94. </td>
  95. <td class="text-center"><?php echo $item['survey_id']; ?></td>
  96. <td><?php echo $item['survey_label']; ?></td>
  97. <?php if($this->view->isGlobal): ?>
  98. <td><?php echo $item['manager_surname'], ' ', $item['manager_name']; ?></td>
  99. <?php endif; ?>
  100. <td><?php echo $item['surname'], ' ', $item['name']; ?></td>
  101. <td><span class="<?php if((bool)$item['email_failure']) echo 'string-wave'; ?>"><?php echo $item['email']; ?></span></td>
  102. <td><?php echo $item['phone']; ?></td>
  103. <td class="text-center">
  104. <?php if((int)$item['opened_recipient'] == 0): ?>
  105. <i class="fa fa-envelope" aria-hidden="true"></i>
  106. <?php else: ?>
  107. <i class="fa fa-envelope-open-o" aria-hidden="true"></i>
  108. <?php endif; ?>
  109. </td>
  110. <td class="text-center">
  111. <?php if((int)$item['aswered_recipient'] == 0): ?>
  112. <i class="fa fa-clock-o" aria-hidden="true"></i>
  113. <?php else: ?>
  114. <div><i class="fa fa-check" aria-hidden="true"></i></div>
  115. <div><small><?php echo $this->helper->getDateString($item['aswered_date']); ?></small></div>
  116. <?php endif; ?>
  117. </td>
  118. <td><?php echo $this->helper->getDateString($item['survey_created_at']); ?></td>
  119. <td>
  120. <?php if($item['extra_buttons']): ?>
  121. <button type="button" title="Reinvia" class="btn btn-outline-dark btn-sm btn-survey-resend" data-surveyuuid="<?php echo $item['code']; ?>" data-surveyid="<?php echo $item['survey_id']; ?>" data-recipient="<?php echo $item['email']; ?>"><i class="fa fa-repeat" aria-hidden="true"></i></button>
  122. <?php endif; ?>
  123. </td>
  124. <td>
  125. <?php if($item['extra_buttons']): ?>
  126. <a title="Modifica" class="btn btn-outline-dark btn-sm" href="/survey-edit/<?php echo time(); ?>/<?php echo $item['survey_id']; ?>"><i class="fa fa-pencil" aria-hidden="true"></i></a>
  127. <?php endif; ?>
  128. </td>
  129. <td>
  130. <?php if($item['extra_buttons']): ?>
  131. <button type="button" title="Elimina" class="btn btn-outline-danger btn-sm btn-survey-delete" data-surveyuuid="<?php echo $item['code']; ?>" data-surveyid="<?php echo $item['survey_id']; ?>" data-recipient="<?php echo $item['email']; ?>"><i class="fa fa-times" aria-hidden="true"></i></button>
  132. <?php endif; ?>
  133. </td>
  134. </tr>
  135. <?php endforeach; ?>
  136. </tbody>
  137. </table>
  138. </div>
  139. </form>
  140. <hr>
  141. <?php echo $this->partial('Layout/pagination'); ?>
  142. <?php else: ?>
  143. <div class="alert alert-warning" role="alert">
  144. <?php echo _('No data available in this list.'); ?>
  145. </div>
  146. <?php endif; ?>
  147. </div>
  148. </div>
  149. </div>
  150. <div class="modal" id="dialog-survey-preview" tabindex="-1" role="dialog">
  151. <div class="modal-dialog modal-lg" role="document">
  152. <div class="modal-content">
  153. <div class="modal-header">
  154. <h5 class="modal-title"><?php echo _('Survey preview'); ?></h5>
  155. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  156. <span aria-hidden="true">&times;</span>
  157. </button>
  158. </div>
  159. <div class="modal-body">
  160. <div class="text-center" id="dialog-loader"><img src="<?php echo $this->layout->getPublicUri(); ?>images/ajaxloader.svg" width="50"></div>
  161. <div class="modal-body-survey-preview"></div>
  162. </div>
  163. <div class="modal-footer">
  164. <button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo _('Close'); ?></button>
  165. </div>
  166. </div>
  167. </div>
  168. </div>