PATH:
home
/
centosnipponia
/
public_html
/
ticketing.nipponia.com
/
ticketing-old
/
include
/
staff
/
templates
<?php /* * Ticket Preview popup template * */ $staff=$ticket->getStaff(); $lock=$ticket->getLock(); $role=$ticket->getRole($thisstaff); $error=$msg=$warn=null; $thread = $ticket->getThread(); if($lock && $lock->getStaffId()!==$thisstaff->getId()) $warn.=' <span class="Icon lockedTicket">' .sprintf(__('Ticket is locked by %s'), $lock->getStaffName()).'</span>'; elseif($ticket->isOverdue()) $warn.=' <span class="Icon overdueTicket">'.__('Marked overdue!').'</span>'; echo sprintf( '<div style="width:600px; padding: 2px 2px 0 5px;" id="t%s"> <h2>'.__('Ticket #%s').': %s</h2>', $ticket->getNumber(), $ticket->getNumber(), Format::htmlchars($ticket->getSubject())); if($error) echo sprintf('<div id="msg_error">%s</div>',$error); elseif($msg) echo sprintf('<div id="msg_notice">%s</div>',$msg); elseif($warn) echo sprintf('<div id="msg_warning">%s</div>',$warn); echo '<ul class="tabs" id="ticket-preview">'; echo ' <li class="active"><a id="preview_tab" href="#preview" ><i class="icon-list-alt"></i> '.__('Ticket Summary').'</a></li>'; if ($thread && $thread->getNumCollaborators()) { echo sprintf(' <li><a id="collab_tab" href="#collab" ><i class="icon-fixed-width icon-group faded"></i> '.__('Collaborators (%d)').'</a></li>', $thread->getNumCollaborators()); } echo '<li><a id="thread_tab" href="#threadPreview" ><i class="icon-fixed-width icon-list faded"></i> '.__('Thread Preview').'</a></li>'; echo '</ul>'; echo '<div id="ticket-preview_container">'; echo '<div class="tab_content" id="preview">'; echo '<table border="0" cellspacing="" cellpadding="1" width="100%" class="ticket_info">'; $ticket_state=sprintf('<span>%s</span>',ucfirst($ticket->getStatus())); if($ticket->isOpen()) { if($ticket->isOverdue()) $ticket_state.=' — <span>'.__('Overdue').'</span>'; else $ticket_state.=sprintf(' — <span>%s</span>',$ticket->getPriority()); } echo sprintf(' <tr> <th width="100">'.__('Ticket State').':</th> <td>%s</td> </tr> <tr> <th>'.__('Created').':</th> <td>%s</td> </tr>',$ticket_state, Format::datetime($ticket->getCreateDate())); if($ticket->isClosed()) { echo sprintf(' <tr> <th>'.__('Closed').':</th> <td>%s <span class="faded">'.__('by').' %s</span></td> </tr>', Format::datetime($ticket->getCloseDate()), ($staff?$staff->getName():'staff') ); } elseif($ticket->getEstDueDate()) { echo sprintf(' <tr> <th>'.__('Due Date').':</th> <td>%s</td> </tr>', Format::datetime($ticket->getEstDueDate())); } echo '</table>'; echo '<hr> <table border="0" cellspacing="" cellpadding="1" width="100%" class="ticket_info">'; if($ticket->isOpen()) { echo sprintf(' <tr> <th width="100">'.__('Assigned To').':</th> <td>%s</td> </tr>',$ticket->isAssigned()?implode('/', $ticket->getAssignees()):' <span class="faded">— '.__('Unassigned').' —</span>'); } echo sprintf( ' <tr> <th>'.__('From').':</th> <td><a href="users.php?id=%d" class="no-pjax">%s</a> <span class="faded">%s</span></td> </tr> <tr> <th width="100">'.__('Department').':</th> <td>%s</td> </tr> <tr> <th>'.__('Help Topic').':</th> <td>%s</td> </tr>', $ticket->getUserId(), Format::htmlchars($ticket->getName()), $ticket->getEmail(), Format::htmlchars($ticket->getDeptName()), Format::htmlchars($ticket->getHelpTopic())); echo ' </table>'; ?> <?php foreach (DynamicFormEntry::forTicket($ticket->getId()) as $form) { // Skip core fields shown earlier in the ticket preview $answers = $form->getAnswers()->exclude(Q::any(array( 'field__flags__hasbit' => DynamicFormField::FLAG_EXT_STORED, 'field__name__in' => array('subject', 'priority') ))); $displayed = array(); foreach($answers as $a) { if (!($v = $a->display())) continue; $displayed[] = array($a->getLocal('label'), $v); } if (count($displayed) == 0) continue; echo '<hr>'; echo '<table border="0" cellspacing="" cellpadding="1" width="100%" style="margin-bottom:0px;" class="ticket_info">'; echo '<tbody>'; foreach ($displayed as $stuff) { list($label, $v) = $stuff; echo '<tr>'; echo '<th width="20%" style="white-space: nowrap;">'.Format::htmlchars($label).':</th>'; echo '<td>'.$v.'</td>'; echo '</tr>'; } echo '</tbody>'; echo '</table>'; } echo '</div>'; // ticket preview content. ?> <div class="hidden tab_content" id="collab"> <table border="0" cellspacing="" cellpadding="1"> <colgroup><col style="min-width: 250px;"></col></colgroup> <?php if ($thread && ($collabs=$thread->getCollaborators())) {?> <?php foreach($collabs as $collab) { echo sprintf('<tr><td %s>%s <a href="users.php?id=%d" class="no-pjax">%s</a> <em><%s></em></td></tr>', ($collab->isActive()? '' : 'class="faded"'), (($U = $collab->getUser()) && ($A = $U->getAvatar())) ? $A->getImageTag(20) : sprintf('<i class="icon-%s"></i>', $collab->isActive() ? 'comments' : 'comment-alt'), $collab->getUserId(), $collab->getName(), $collab->getEmail()); } } else { echo __("Ticket doesn't have any collaborators."); }?> </table> <br> <?php echo sprintf('<span><a class="collaborators" href="#thread/%d/collaborators/1">%s</a></span>', $thread->getId(), $thread && $thread->getNumCollaborators() ? __('Manage Collaborators') : __('Add Collaborator') ); ?> </div> <div class="hidden tab_content thread-preview" id="threadPreview"> <div id="ticketThread"> <div id="thread-items"> <?php include STAFFINC_DIR.'templates/thread-entries-preview.tmpl.php'; ?> </div> </div> </div> <?php $options = array(); $options[]=array('action'=>sprintf(__('Thread (%d)'),$ticket->getThreadCount()),'url'=>"tickets.php?id=$tid"); if($ticket->getNumNotes()) $options[]=array('action'=>sprintf(__('Notes (%d)'),$ticket->getNumNotes()),'url'=>"tickets.php?id=$tid#notes"); if($ticket->isOpen()) $options[]=array('action'=>__('Reply'),'url'=>"tickets.php?id=$tid#reply"); if ($role->hasPerm(Ticket::PERM_ASSIGN)) $options[]=array('action'=>($ticket->isAssigned()?__('Reassign'):__('Assign')),'url'=>"tickets.php?id=$tid#assign"); if ($role->hasPerm(Ticket::PERM_TRANSFER)) $options[]=array('action'=>__('Transfer'),'url'=>"tickets.php?id=$tid#transfer"); $options[]=array('action'=>__('Post Note'),'url'=>"tickets.php?id=$tid#note"); if ($role->hasPerm(Ticket::PERM_EDIT)) $options[]=array('action'=>__('Edit Ticket'),'url'=>"tickets.php?id=$tid&a=edit"); if($options) { echo '<ul class="tip_menu">'; foreach($options as $option) echo sprintf('<li><a href="%s">%s</a></li>',$option['url'],$option['action']); echo '</ul>'; } echo '</div>'; ?> <script type="text/javascript"> $('.thread-preview-entry').on('click', function(){ if($(this).hasClass('collapsed')) { $(this).removeClass('collapsed', 500); } }); $('.header').on('click', function(){ if(!$(this).closest('.thread-preview-entry').hasClass('collapsed')) { $(this).closest('.thread-preview-entry').addClass('collapsed', 500); } }); </script>
[+]
..
[-] 2fas.tmpl.php
[edit]
[-] advanced-search-criteria.tmpl.php
[edit]
[-] advanced-search-field.tmpl.php
[edit]
[-] advanced-search.tmpl.php
[edit]
[-] assign.tmpl.php
[edit]
[-] collaborators-preview.tmpl.php
[edit]
[-] collaborators.tmpl.php
[edit]
[-] confirm.tmpl.php
[edit]
[-] content-manage.tmpl.php
[edit]
[-] delete.tmpl.php
[edit]
[-] dynamic-field-config.tmpl.php
[edit]
[-] dynamic-form-fields-view.tmpl.php
[edit]
[-] dynamic-form-simple.tmpl.php
[edit]
[-] dynamic-form.tmpl.php
[edit]
[-] email-basicauth.tmpl.php
[edit]
[-] email-mailbox.tmpl.php
[edit]
[-] email-oauth2auth.tmpl.php
[edit]
[-] email-smtp.tmpl.php
[edit]
[-] export.tmpl.php
[edit]
[-] faq-print.tmpl.php
[edit]
[-] field-edit.tmpl.php
[edit]
[-] field-view.tmpl.php
[edit]
[-] form-manage.tmpl.php
[edit]
[-] inline-form.tmpl.php
[edit]
[-] list-import.tmpl.php
[edit]
[-] list-item-preview.tmpl.php
[edit]
[-] list-item-properties.tmpl.php
[edit]
[-] list-item-row.tmpl.php
[edit]
[-] list-items.tmpl.php
[edit]
[-] mark-as.tmpl.php
[edit]
[-] merge-preview.tmpl.php
[edit]
[-] merge-tickets.tmpl.php
[edit]
[-] navigation.tmpl.php
[edit]
[-] note.tmpl.php
[edit]
[-] notes.tmpl.php
[edit]
[-] org-delete.tmpl.php
[edit]
[-] org-lookup.tmpl.php
[edit]
[-] org-profile.tmpl.php
[edit]
[-] org.tmpl.php
[edit]
[-] plugin-instance-modal.tmpl.php
[edit]
[-] plugin-instance.tmpl.php
[edit]
[-] plugin-instances.tmpl.php
[edit]
[-] queue-column-add.tmpl.php
[edit]
[-] queue-column-condition-prop.tmpl.php
[edit]
[-] queue-column-condition.tmpl.php
[edit]
[-] queue-column-edit.tmpl.php
[edit]
[-] queue-column.tmpl.php
[edit]
[-] queue-columns.tmpl.php
[edit]
[-] queue-export.tmpl.php
[edit]
[-] queue-fields.tmpl.php
[edit]
[-] queue-navigation.tmpl.php
[edit]
[-] queue-preview.tmpl.php
[edit]
[-] queue-quickfilter.tmpl.php
[edit]
[-] queue-savedsearches-nav.tmpl.php
[edit]
[-] queue-sort.tmpl.php
[edit]
[-] queue-sorting-add.tmpl.php
[edit]
[-] queue-sorting-edit.tmpl.php
[edit]
[-] queue-sorting.tmpl.php
[edit]
[-] queue-subnavigation.tmpl.php
[edit]
[-] queue-tickets.tmpl.php
[edit]
[-] quick-add-role.tmpl.php
[edit]
[-] quick-add.tmpl.php
[edit]
[-] refer.tmpl.php
[edit]
[-] release.tmpl.php
[edit]
[-] reset-agent-permissions.tmpl.php
[edit]
[-] savedqueue-settings.tmpl.php
[edit]
[-] schedule-add.tmpl.php
[edit]
[-] schedule-diagnostic.tmpl.php
[edit]
[-] schedule-entries.tmpl.php
[edit]
[-] schedule-entry.tmpl.php
[edit]
[-] schedule-holidays.tmpl.php
[edit]
[-] sequence-manage.tmpl.php
[edit]
[-] set-password.tmpl.php
[edit]
[-] simple-form.tmpl.php
[edit]
[-] status-options.tmpl.php
[edit]
[-] sub-navigation.tmpl.php
[edit]
[-] task-edit.tmpl.php
[edit]
[-] task-preview.tmpl.php
[edit]
[-] task-print.tmpl.php
[edit]
[-] task-status.tmpl.php
[edit]
[-] task-view.tmpl.php
[edit]
[-] task.tmpl.php
[edit]
[-] tasks-actions.tmpl.php
[edit]
[-] tasks-queue-sort.tmpl.php
[edit]
[-] thread-email-headers.tmpl.php
[edit]
[-] thread-email-recipients.tmpl.php
[edit]
[-] thread-entries-preview.tmpl.php
[edit]
[-] thread-entries.tmpl.php
[edit]
[-] thread-entry-edit.tmpl.php
[edit]
[-] thread-entry-resend.tmpl.php
[edit]
[-] thread-entry-view.tmpl.php
[edit]
[-] thread-entry.tmpl.php
[edit]
[-] thread-event.tmpl.php
[edit]
[-] ticket-preview.tmpl.php
[edit]
[-] ticket-print.tmpl.php
[edit]
[-] ticket-status.tmpl.php
[edit]
[-] tickets-actions.tmpl.php
[edit]
[-] tickets.tmpl.php
[edit]
[-] timezone.tmpl.php
[edit]
[-] transfer.tmpl.php
[edit]
[-] user-account.tmpl.php
[edit]
[-] user-delete.tmpl.php
[edit]
[-] user-import.tmpl.php
[edit]
[-] user-lookup.tmpl.php
[edit]
[-] user.tmpl.php
[edit]
[-] user-register.tmpl.php
[edit]
[-] users.tmpl.php
[edit]