| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243 |
- <?php echo $this->partial('Layout/nav'); ?>
-
- <div class="container-fluid">
- <div class="container-page-wrapper shodowed bordered">
- <div class="container-page-container">
- <div class="row">
- <div class="col-lg-6">
- <h1><?php echo $this->actionTitle; ?></h1>
- <p><small><?php echo $this->view->ccStringList; ?>.</small></p>
- </div>
- <div class="col-lg-6 clearfix">
- <div class="float-right">
- <button type="button" class="btn btn-info btn-refresh-list"><span class="icon-loop2"></span></button>
- </div>
- </div>
- </div>
-
- <?php //debug($this->view->testt); ?>
-
- <?php if(is_array($this->view->survey)): ?>
- <?php echo $this->partial('Layout/pagination'); ?>
-
- <form id="form-survey-list" autocomplete="off">
- <div class="table-overflow">
- <table class="table table-striped">
- <thead>
- <th width="1%"></th>
- <th width="1%"></th>
- <th width="1%"></th>
- <th class="text-center" width="1%">#ID</th>
- <th class="text-center"><?php echo _('Viewed'); ?></th>
- <th class="text-center" nowrap><?php echo $this->helper->setSortableCol(_('Filled'), 'survey-list/'.time(), 'sy.aswered_date', 'desc'); ?></th>
- <th nowrap><?php echo $this->helper->setSortableCol(_('Reception'), 'survey-list/'.time(), 'sq.msg_delay_at', 'desc'); ?></th>
- <th><?php echo _('Type'); ?></th>
-
- <?php if($this->view->isGlobal): ?>
- <th><?php echo _('Manager'); ?></th>
- <?php endif; ?>
-
- <th><?php echo _('Patient name'); ?></th>
- <th><?php echo _('E-mail'); ?></th>
- <th><?php echo _('Phone'); ?></th>
- <th nowrap><?php echo $this->helper->setSortableCol(_('Request'), 'survey-list/'.time(), 'sy.created_at', 'desc'); ?></th>
- <!--<th width="1%"></th>-->
- <th width="1%"></th>
- <th width="1%"></th>
- </thead>
-
- <tbody>
- <tr>
- <td>
- <select class="form-control request-search-ctrl" name="searchData[tlc_linked]" style="min-width: 32px;">
- <option value="-1"></option>
- <option value="0" <?php echo $this->session->getSessionValue('search_survey_tlc_linked') === 0 ? 'selected' : ''; ?>><?php echo _('Without report'); ?></option>
- <option value="1" <?php echo $this->session->getSessionValue('search_survey_tlc_linked') == 1 ? 'selected' : ''; ?>><?php echo _('With report'); ?></option>
- </select>
- </td>
- <td></td>
- <td></td>
- <td></td>
- <td class="text-center">
- <select class="form-control request-search-ctrl" name="searchData[mail_opened]" style="min-width: 32px;">
- <option value="-1"></option>
- <option value="0" <?php echo $this->session->getSessionValue('search_survey_email_opened') === 0 ? 'selected' : ''; ?>><?php echo _('Not viewed'); ?></option>
- <option value="1" <?php echo $this->session->getSessionValue('search_survey_email_opened') == 1 ? 'selected' : ''; ?>><?php echo _('Viewed'); ?></option>
- </select>
- </td>
- <td class="text-center">
- <select class="form-control request-search-ctrl" name="searchData[survey_filled]" style="min-width: 32px;">
- <option value="-1"></option>
- <option value="0" <?php echo $this->session->getSessionValue('search_survey_filled') === 0 ? 'selected' : ''; ?>><?php echo _('Not filled'); ?></option>
- <option value="1" <?php echo $this->session->getSessionValue('search_survey_filled') == 1 ? 'selected' : ''; ?>><?php echo _('Filled'); ?></option>
- </select>
- </td>
- <td>
- <select class="form-control request-search-ctrl" name="searchData[email_delivered]" style="min-width: 32px;">
- <option value="-1"></option>
- <option value="0" <?php echo $this->session->getSessionValue('search_survey_email_delivered') === 0 ? 'selected' : ''; ?>><?php echo _('Not received'); ?></option>
- <option value="1" <?php echo $this->session->getSessionValue('search_survey_email_delivered') == 1 ? 'selected' : ''; ?>><?php echo _('Received'); ?></option>
- </select>
- </td>
- <td>
- <select class="form-control request-search-ctrl" name="searchData[survey_type]">
- <option value=""></option>
- <?php foreach($this->view->typeList as $id => $label): ?>
- <option value="<?php echo $id; ?>" <?php echo $this->session->getSessionValue('search_survey_type') == $id ? 'selected' : ''; ?> ><?php echo $label; ?></option>
- <?php endforeach; ?>
- </select>
- </td>
- <?php if($this->view->isGlobal): ?>
- <td></td>
- <?php endif; ?>
- <td>
- <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;">
- </td>
- <td></td>
- <td></td>
- <td></td>
- <td></td>
- <td>
- <button type="button" class="btn btn-outline-dark btn-sm btn-search-refresh-list"><i class="fa fa-search" aria-hidden="true"></i></button>
- </td>
- </tr>
- <?php foreach($this->view->survey as $item): ?>
- <tr class="<?php if((bool)$item['email_failure']) echo 'cell-danger'; ?>">
- <!--<td>
- <?php if((bool)$item['aswered_recipient']): ?>
- <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>
- <?php endif; ?>
- </td>-->
-
- <td class="text-center" nowrap>
- <?php if((int)$item['remote_added'] == 1): ?>
- <i class="fa fa-upload" aria-hidden="true" title="<?php echo _('Report created'); ?>"></i>
- <?php else: ?>
- <i class="fa fa-ellipsis-h text-muted" aria-hidden="true" title="<?php echo _('Report is creating or updating'); ?>"></i>
- <?php endif; ?>
- <?php if($item['remote_auto_tlc_id'] > 0): ?>
- <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>
- <?php endif; ?>
- </td>
- <td class="text-center">
- <?php if($item['attach_count'] > 0): ?>
- <i class="fa fa-paperclip" aria-hidden="true" title="<?php echo _('Attachments'); ?>: <?php echo $item['attach_count']; ?>"></i>
- <?php endif; ?>
- </td>
- <td class="text-center">
- <?php if((bool)$item['email_failure']): ?>
- <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
- <?php endif; ?>
- </td>
-
-
- <td class="text-center"><?php echo $item['survey_id']; ?></td>
-
-
- <td class="text-center">
- <?php $envelope_color = is_null($item['msg_sent']) ? 'text-warning' : 'text-success'; ?>
- <span class="fa-stack">
- <?php if((int)$item['opened_recipient'] == 0): ?>
- <i class="fa fa-envelope <?php echo $envelope_color; ?>" aria-hidden="true"></i>
- <?php if($envelope_color == 'text-warning'): ?>
- <i class="fa fa-ban fa-stack-2x text-danger"></i>
- <?php endif; ?>
- <?php else: ?>
- <i class="fa fa-envelope-open-o" aria-hidden="true"></i>
- <?php endif; ?>
- </span>
- </td>
- <td class="text-center" nowrap>
- <?php if((int)$item['aswered_recipient'] == 0): ?>
- <i class="fa fa-clock-o" aria-hidden="true"></i>
- <?php else: ?>
- <div><small><i class="fa fa-check" aria-hidden="true"></i> <?php echo $this->helper->getDateString($item['aswered_date']); ?></small></div>
- <?php endif; ?>
- </td>
-
-
- <td>
- <?php
- if (!is_null($item['msg_delay_at'])) {
- if ($this->utility->isDateInThePast($item['msg_delay_at']) && $item['msg_sent'] == 0) {
- $badge_class = 'badge-danger';
- $badge_icon = '<i class="fa fa-clock-o" aria-hidden="true"></i>';
- } else {
- if ($this->utility->isDateInThePast($item['msg_delay_at'])) {
- $badge_class = 'badge-success';
- $badge_icon = '<i class="fa fa-check" aria-hidden="true"></i>';
- } else {
- $badge_class = 'badge-warning';
- $badge_icon = '<i class="fa fa-clock-o" aria-hidden="true"></i>';
- }
- }
-
- } else {
- $badge_class = '';
- $badge_icon = '';
- }
- ?>
- <span class="badge <?php echo $badge_class; ?>"><?php echo $badge_icon; ?> <?php echo $this->helper->getDateString($item['msg_delay_at'], false); ?></span>
- </td>
- <td><?php echo $item['survey_label']; ?></td>
-
- <?php if($this->view->isGlobal): ?>
- <td><?php echo $item['manager_surname'], ' ', $item['manager_name']; ?></td>
- <?php endif; ?>
-
- <td nowrap><?php echo $item['surname'], ' ', $item['name']; ?></td>
- <td><span class="<?php if((bool)$item['email_failure']) echo 'string-wave'; ?>"><?php echo $item['email']; ?></span></td>
- <td><?php echo $item['phone']; ?></td>
- <td nowrap><small><?php echo $this->helper->getDateString($item['survey_created_at']); ?></small></td>
- <?php /*
- <td>
- <?php if($item['extra_buttons']): ?>
- <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>
- <?php endif; ?>
- </td>
- */ ?>
- <td>
- <?php if($item['extra_buttons']): ?>
- <a title="<?php echo _("Add a new remote visit or edit the patient's data"); ?>" 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>
- <?php endif; ?>
- </td>
- <td>
- <?php if($item['extra_buttons']): ?>
- <button type="button" title="<?php echo _('Delete'); ?>" 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>
- <?php endif; ?>
- </td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
- </div>
- </form>
- <?php echo $this->partial('Layout/pagination'); ?>
- <?php else: ?>
- <div class="alert alert-warning" role="alert">
- <?php echo _('No data available in this list.'); ?>
- </div>
- <?php endif; ?>
- </div>
- </div>
- </div>
-
- <div class="modal" id="dialog-survey-preview" tabindex="-1" role="dialog">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title"><?php echo _('Survey preview'); ?></h5>
- <button type="button" class="close" data-dismiss="modal" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <div class="modal-body">
- <div class="text-center" id="dialog-loader"><img src="<?php echo $this->layout->getPublicUri(); ?>images/ajaxloader.svg" width="50"></div>
- <div class="modal-body-survey-preview"></div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-primary" data-dismiss="modal"><?php echo _('Close'); ?></button>
- </div>
- </div>
- </div>
- </div>
|