選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

surveyList.view copy 9.php 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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->testt); ?>
  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 class="text-center">Visionato</th>
  28. <th class="text-center" nowrap><?php echo $this->helper->setSortableCol('Compilato', 'survey-list/'.time(), 'sy.aswered_date', 'desc'); ?></th>
  29. <th nowrap><?php echo $this->helper->setSortableCol('Ricezione', 'survey-list/'.time(), 'sq.msg_delay_at', 'desc'); ?></th>
  30. <th>Tipo</th>
  31. <?php if($this->view->isGlobal): ?>
  32. <th>Gestore</th>
  33. <?php endif; ?>
  34. <th>Paziente</th>
  35. <th>E-mail</th>
  36. <th>Tel.</th>
  37. <th nowrap><?php echo $this->helper->setSortableCol('Richiesta', 'survey-list/'.time(), 'sy.created_at', 'desc'); ?></th>
  38. <th width="1%"></th>
  39. <th width="1%"></th>
  40. <th width="1%"></th>
  41. </thead>
  42. <tbody>
  43. <tr>
  44. <td></td>
  45. <td>
  46. <select class="form-control request-search-ctrl" name="searchData[tlc_linked]" style="min-width: 32px;">
  47. <option value="-1"></option>
  48. <option value="0" <?php echo $this->session->getSessionValue('search_survey_tlc_linked') === 0 ? 'selected' : ''; ?>>Senza televisita</option>
  49. <option value="1" <?php echo $this->session->getSessionValue('search_survey_tlc_linked') == 1 ? 'selected' : ''; ?>>Con televisita</option>
  50. </select>
  51. </td>
  52. <td></td>
  53. <td></td>
  54. <td></td>
  55. <td class="text-center">
  56. <select class="form-control request-search-ctrl" name="searchData[mail_opened]" style="min-width: 32px;">
  57. <option value="-1"></option>
  58. <option value="0" <?php echo $this->session->getSessionValue('search_survey_email_opened') === 0 ? 'selected' : ''; ?>>Non visionato</option>
  59. <option value="1" <?php echo $this->session->getSessionValue('search_survey_email_opened') == 1 ? 'selected' : ''; ?>>Visionato</option>
  60. </select>
  61. </td>
  62. <td class="text-center">
  63. <select class="form-control request-search-ctrl" name="searchData[survey_filled]" style="min-width: 32px;">
  64. <option value="-1"></option>
  65. <option value="0" <?php echo $this->session->getSessionValue('search_survey_filled') === 0 ? 'selected' : ''; ?>>Non compilato</option>
  66. <option value="1" <?php echo $this->session->getSessionValue('search_survey_filled') == 1 ? 'selected' : ''; ?>>Compilato</option>
  67. </select>
  68. </td>
  69. <td>
  70. <select class="form-control request-search-ctrl" name="searchData[email_delivered]" style="min-width: 32px;">
  71. <option value="-1"></option>
  72. <option value="0" <?php echo $this->session->getSessionValue('search_survey_email_delivered') === 0 ? 'selected' : ''; ?>>Non ricevuto</option>
  73. <option value="1" <?php echo $this->session->getSessionValue('search_survey_email_delivered') == 1 ? 'selected' : ''; ?>>Ricevuto</option>
  74. </select>
  75. </td>
  76. <td>
  77. <select class="form-control request-search-ctrl" name="searchData[survey_type]">
  78. <option value=""></option>
  79. <?php foreach($this->view->typeList as $id => $label): ?>
  80. <option value="<?php echo $id; ?>" <?php echo $this->session->getSessionValue('search_survey_type') == $id ? 'selected' : ''; ?> ><?php echo $label; ?></option>
  81. <?php endforeach; ?>
  82. </select>
  83. </td>
  84. <?php if($this->view->isGlobal): ?>
  85. <td></td>
  86. <?php endif; ?>
  87. <td>
  88. <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;">
  89. </td>
  90. <td></td>
  91. <td></td>
  92. <td></td>
  93. <td></td>
  94. <td></td>
  95. <td>
  96. <button type="button" class="btn btn-outline-dark btn-sm btn-search-refresh-list"><i class="fa fa-search" aria-hidden="true"></i></button>
  97. </td>
  98. </tr>
  99. <?php foreach($this->view->survey as $item): ?>
  100. <tr class="<?php if((bool)$item['email_failure']) echo 'cell-danger'; ?>">
  101. <td>
  102. <?php if((bool)$item['aswered_recipient']): ?>
  103. <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>
  104. <?php endif; ?>
  105. </td>
  106. <td class="text-center" nowrap>
  107. <?php if((int)$item['remote_added'] == 1): ?>
  108. <i class="fa fa-upload" aria-hidden="true" title="Teleconsulto creato"></i>
  109. <?php else: ?>
  110. <i class="fa fa-ellipsis-h text-muted" aria-hidden="true" title="Teleconsulto in creazione o aggiornamento"></i>
  111. <?php endif; ?>
  112. <?php if($item['remote_auto_tlc_id'] > 0): ?>
  113. <div class="text-muted"><small><i class="fa fa-external-link" aria-hidden="true"></i> <i>#<?php echo $item['remote_auto_tlc_id']; ?></i></small></div>
  114. <?php endif; ?>
  115. </td>
  116. <td class="text-center">
  117. <?php if($item['attach_count'] > 0): ?>
  118. <i class="fa fa-paperclip" aria-hidden="true" title="Allegati: <?php echo $item['attach_count']; ?>"></i>
  119. <?php endif; ?>
  120. </td>
  121. <td class="text-center">
  122. <?php if((bool)$item['email_failure']): ?>
  123. <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
  124. <?php endif; ?>
  125. </td>
  126. <td class="text-center"><?php echo $item['survey_id']; ?></td>
  127. <td class="text-center">
  128. <?php if((int)$item['opened_recipient'] == 0): ?>
  129. <i class="fa fa-envelope" aria-hidden="true"></i>
  130. <?php else: ?>
  131. <i class="fa fa-envelope-open-o" aria-hidden="true"></i>
  132. <?php endif; ?>
  133. </td>
  134. <td class="text-center">
  135. <?php if((int)$item['aswered_recipient'] == 0): ?>
  136. <i class="fa fa-clock-o" aria-hidden="true"></i>
  137. <?php else: ?>
  138. <div><i class="fa fa-check" aria-hidden="true"></i></div>
  139. <div><small><?php echo $this->helper->getDateString($item['aswered_date']); ?></small></div>
  140. <?php endif; ?>
  141. </td>
  142. <td>
  143. <?php
  144. if (!is_null($item['msg_delay_at'])) {
  145. if ($this->utility->isDateInThePast($item['msg_delay_at']) && $item['msg_sent'] == 0) {
  146. $badge_class = 'badge-danger';
  147. $badge_icon = '<i class="fa fa-clock-o" aria-hidden="true"></i>';
  148. } else {
  149. if ($this->utility->isDateInThePast($item['msg_delay_at'])) {
  150. $badge_class = 'badge-success';
  151. $badge_icon = '<i class="fa fa-check" aria-hidden="true"></i>';
  152. } else {
  153. $badge_class = 'badge-warning';
  154. $badge_icon = '<i class="fa fa-clock-o" aria-hidden="true"></i>';
  155. }
  156. }
  157. } else {
  158. $badge_class = '';
  159. $badge_icon = '';
  160. }
  161. ?>
  162. <span class="badge <?php echo $badge_class; ?>"><?php echo $badge_icon; ?> <?php echo $this->helper->getDateString($item['msg_delay_at'], false); ?></span>
  163. </td>
  164. <td><?php echo $item['survey_label']; ?></td>
  165. <?php if($this->view->isGlobal): ?>
  166. <td><?php echo $item['manager_surname'], ' ', $item['manager_name']; ?></td>
  167. <?php endif; ?>
  168. <td><?php echo $item['surname'], ' ', $item['name']; ?></td>
  169. <td><span class="<?php if((bool)$item['email_failure']) echo 'string-wave'; ?>"><?php echo $item['email']; ?></span></td>
  170. <td>
  171. <?php
  172. $mob_number = $this->utility->getMobileNumber($item['phone'], $this->view->mobile_prefixes);
  173. ?>
  174. <div style="white-space: nowrap;"><?php if(is_null($mob_number)): ?><i class="fa fa-exclamation-triangle" aria-hidden="true"></i><?php endif; ?> <?php echo $item['phone']; ?></div>
  175. <?php if(!is_null($mob_number)): ?><div class="badge badge-success"><i class="fa fa-check" aria-hidden="true"></i> <?php echo $mob_number; ?></div><?php endif; ?>
  176. </td>
  177. <td><?php echo $this->helper->getDateString($item['survey_created_at']); ?></td>
  178. <td>
  179. <?php if($item['extra_buttons']): ?>
  180. <button type="button" title="Reinvia subito la richiesta di televisita al paziente" 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>
  181. <?php endif; ?>
  182. </td>
  183. <td>
  184. <?php if($item['extra_buttons']): ?>
  185. <a title="Aggiungi nuova richiesta di televisita o modifica i dati del paziente" class="btn btn-outline-dark btn-sm" href="/survey-edit/<?php echo time(); ?>/<?php echo $item['survey_id']; ?>"><i class="fa fa-plus" aria-hidden="true"></i></a>
  186. <?php endif; ?>
  187. </td>
  188. <td>
  189. <?php if($item['extra_buttons']): ?>
  190. <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>
  191. <?php endif; ?>
  192. </td>
  193. </tr>
  194. <?php endforeach; ?>
  195. </tbody>
  196. </table>
  197. </div>
  198. </form>
  199. <hr>
  200. <?php echo $this->partial('Layout/pagination'); ?>
  201. <?php else: ?>
  202. <div class="alert alert-warning" role="alert">
  203. <?php echo _('No data available in this list.'); ?>
  204. </div>
  205. <?php endif; ?>
  206. </div>
  207. </div>
  208. </div>
  209. <div class="modal" id="dialog-survey-preview" tabindex="-1" role="dialog">
  210. <div class="modal-dialog modal-lg" role="document">
  211. <div class="modal-content">
  212. <div class="modal-header">
  213. <h5 class="modal-title"><?php echo _('Survey preview'); ?></h5>
  214. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  215. <span aria-hidden="true">&times;</span>
  216. </button>
  217. </div>
  218. <div class="modal-body">
  219. <div class="text-center" id="dialog-loader"><img src="<?php echo $this->layout->getPublicUri(); ?>images/ajaxloader.svg" width="50"></div>
  220. <div class="modal-body-survey-preview"></div>
  221. </div>
  222. <div class="modal-footer">
  223. <button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo _('Close'); ?></button>
  224. </div>
  225. </div>
  226. </div>
  227. </div>