Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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 width="1%"></th>
  27. <th class="text-center" width="1%">#ID</th>
  28. <th>Ricezione</th>
  29. <th>Tipo</th>
  30. <?php if($this->view->isGlobal): ?>
  31. <th>Gestore</th>
  32. <?php endif; ?>
  33. <th>Paziente</th>
  34. <th>E-mail</th>
  35. <th>Tel.</th>
  36. <th class="text-center"><?php echo _('Opened'); ?></th>
  37. <th class="text-center">Compilato</th>
  38. <th><?php echo _('Sent'); ?></th>
  39. <th width="1%"></th>
  40. <th width="1%"></th>
  41. <th width="1%"></th>
  42. </thead>
  43. <tbody>
  44. <tr>
  45. <td></td>
  46. <td></td>
  47. <td></td>
  48. <td></td>
  49. <td></td>
  50. <td></td>
  51. <td></td>
  52. <td>
  53. <select class="form-control request-search-ctrl" name="searchData[survey_type]">
  54. <option value=""></option>
  55. <?php foreach($this->view->typeList as $id => $label): ?>
  56. <option value="<?php echo $id; ?>" <?php echo $this->session->getSessionValue('search_survey_type') == $id ? 'selected' : ''; ?> ><?php echo $label; ?></option>
  57. <?php endforeach; ?>
  58. </select>
  59. </td>
  60. <?php if($this->view->isGlobal): ?>
  61. <td></td>
  62. <?php endif; ?>
  63. <td>
  64. <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;">
  65. </td>
  66. <td></td>
  67. <td></td>
  68. <td></td>
  69. <td></td>
  70. <td></td>
  71. <td></td>
  72. <td></td>
  73. <td>
  74. <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>
  75. </td>
  76. </tr>
  77. <?php foreach($this->view->survey as $item): ?>
  78. <tr class="<?php if((bool)$item['email_failure']) echo 'cell-danger'; ?>">
  79. <td>
  80. <?php if((bool)$item['aswered_recipient']): ?>
  81. <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>
  82. <?php endif; ?>
  83. </td>
  84. <td class="text-center">
  85. <?php if((int)$item['reported'] == 1): ?>
  86. <!--<i class="fa fa-file-pdf-o" aria-hidden="true" title="Risposta inviata al paziente"></i>-->
  87. <?php endif; ?>
  88. </td>
  89. <td class="text-center">
  90. <?php if((int)$item['remote_added'] == 1): ?>
  91. <i class="fa fa-upload" aria-hidden="true" title="Teleconsulto creato"></i>
  92. <?php endif; ?>
  93. </td>
  94. <td class="text-center">
  95. <?php if($item['attach_count'] > 0): ?>
  96. <i class="fa fa-paperclip" aria-hidden="true" title="Allegati: <?php echo $item['attach_count']; ?>"></i>
  97. <?php endif; ?>
  98. </td>
  99. <td class="text-center">
  100. <?php if((bool)$item['email_failure']): ?>
  101. <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
  102. <?php endif; ?>
  103. </td>
  104. <td class="text-center"><?php echo $item['survey_id']; ?></td>
  105. <td>
  106. <?php
  107. if (!is_null($item['msg_delay_at'])) {
  108. if ($this->utility->isDateInThePast($item['msg_delay_at']) && $item['msg_sent'] == 0) {
  109. $badge_class = 'badge-danger';
  110. $badge_icon = '<i class="fa fa-clock-o" aria-hidden="true"></i>';
  111. } else {
  112. if ($this->utility->isDateInThePast($item['msg_delay_at'])) {
  113. $badge_class = 'badge-success';
  114. $badge_icon = '<i class="fa fa-check" aria-hidden="true"></i>';
  115. } else {
  116. $badge_class = 'badge-warning';
  117. $badge_icon = '<i class="fa fa-clock-o" aria-hidden="true"></i>';
  118. }
  119. }
  120. } else {
  121. $badge_class = '';
  122. $badge_icon = '';
  123. }
  124. ?>
  125. <span class="badge <?php echo $badge_class; ?>"><?php echo $badge_icon; ?> <?php echo $this->helper->getDateString($item['msg_delay_at'], false); ?></span>
  126. </td>
  127. <td><?php echo $item['survey_label']; ?></td>
  128. <?php if($this->view->isGlobal): ?>
  129. <td><?php echo $item['manager_surname'], ' ', $item['manager_name']; ?></td>
  130. <?php endif; ?>
  131. <td><?php echo $item['surname'], ' ', $item['name']; ?></td>
  132. <td><span class="<?php if((bool)$item['email_failure']) echo 'string-wave'; ?>"><?php echo $item['email']; ?></span></td>
  133. <td><?php echo $item['phone']; ?></td>
  134. <td class="text-center">
  135. <?php if((int)$item['opened_recipient'] == 0): ?>
  136. <i class="fa fa-envelope" aria-hidden="true"></i>
  137. <?php else: ?>
  138. <i class="fa fa-envelope-open-o" aria-hidden="true"></i>
  139. <?php endif; ?>
  140. </td>
  141. <td class="text-center">
  142. <?php if((int)$item['aswered_recipient'] == 0): ?>
  143. <i class="fa fa-clock-o" aria-hidden="true"></i>
  144. <?php else: ?>
  145. <div><i class="fa fa-check" aria-hidden="true"></i></div>
  146. <div><small><?php echo $this->helper->getDateString($item['aswered_date']); ?></small></div>
  147. <?php endif; ?>
  148. </td>
  149. <td><?php echo $this->helper->getDateString($item['survey_created_at']); ?></td>
  150. <td>
  151. <?php if($item['extra_buttons']): ?>
  152. <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>
  153. <?php endif; ?>
  154. </td>
  155. <td>
  156. <?php if($item['extra_buttons']): ?>
  157. <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>
  158. <?php endif; ?>
  159. </td>
  160. <td>
  161. <?php if($item['extra_buttons']): ?>
  162. <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>
  163. <?php endif; ?>
  164. </td>
  165. </tr>
  166. <?php endforeach; ?>
  167. </tbody>
  168. </table>
  169. </div>
  170. </form>
  171. <hr>
  172. <?php echo $this->partial('Layout/pagination'); ?>
  173. <?php else: ?>
  174. <div class="alert alert-warning" role="alert">
  175. <?php echo _('No data available in this list.'); ?>
  176. </div>
  177. <?php endif; ?>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="modal" id="dialog-survey-preview" tabindex="-1" role="dialog">
  182. <div class="modal-dialog modal-lg" role="document">
  183. <div class="modal-content">
  184. <div class="modal-header">
  185. <h5 class="modal-title"><?php echo _('Survey preview'); ?></h5>
  186. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  187. <span aria-hidden="true">&times;</span>
  188. </button>
  189. </div>
  190. <div class="modal-body">
  191. <div class="text-center" id="dialog-loader"><img src="<?php echo $this->layout->getPublicUri(); ?>images/ajaxloader.svg" width="50"></div>
  192. <div class="modal-body-survey-preview"></div>
  193. </div>
  194. <div class="modal-footer">
  195. <button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo _('Close'); ?></button>
  196. </div>
  197. </div>
  198. </div>
  199. </div>