diff --git a/include/staff/footer.inc.php b/include/staff/footer.inc.php index fb434ffb0f80b2a7bf510818b1e9cae9ba0c7b15..529fe8bfcd81aa4014ce0cbbb97a76b784d63f1a 100644 --- a/include/staff/footer.inc.php +++ b/include/staff/footer.inc.php @@ -26,7 +26,8 @@ if(is_object($thisstaff) && $thisstaff->isStaff()) { ?> if ($.support.pjax) { $(document).on('click', 'a', function(event) { if (!$(this).hasClass('no-pjax') - && !$(this).closest('.no-pjax').length) + && !$(this).closest('.no-pjax').length + && $(this).attr('href')[0] != '#') $.pjax.click(event, {container: $('#pjax-container'), timeout: 2000}); }) } diff --git a/include/staff/templates/ticket-preview.tmpl.php b/include/staff/templates/ticket-preview.tmpl.php index 82c3e392f80c91441330a5c9befee4e50e870752..8e0fc32b68647b851e8bf798f388a74d2e7c0b17 100644 --- a/include/staff/templates/ticket-preview.tmpl.php +++ b/include/staff/templates/ticket-preview.tmpl.php @@ -95,7 +95,7 @@ echo sprintf( ' <tr> <th>From:</th> - <td>%s <span class="faded">%s</span></td> + <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> @@ -105,6 +105,7 @@ echo sprintf( <th>Help Topic:</th> <td>%s</td> </tr>', + $ticket->getUserId(), Format::htmlchars($ticket->getName()), $ticket->getEmail(), Format::htmlchars($ticket->getDeptName()), @@ -118,14 +119,16 @@ echo '</div>'; // ticket preview content. <table border="0" cellspacing="" cellpadding="1"> <colgroup><col style="min-width: 250px;"></col></colgroup> <?php - if (($users=$ticket->getCollaborators())) {?> + if (($collabs=$ticket->getCollaborators())) {?> <?php - foreach($users as $user) { - echo sprintf('<tr><td %s><i class="icon-%s"></i> %s <em><%s></em></td></tr>', - ($user->isActive()? '' : 'class="faded"'), - ($user->isActive()? 'comments' : 'comment-alt'), - $user->getName(), - $user->getEmail()); + foreach($collabs as $collab) { + echo sprintf('<tr><td %s><i class="icon-%s"></i> + <a href="users.php?id=%d" class="no-pjax">%s</a> <em><%s></em></td></tr>', + ($collab->isActive()? '' : 'class="faded"'), + ($collab->isActive()? 'comments' : 'comment-alt'), + $collab->getUserId(), + $collab->getName(), + $collab->getEmail()); } } else { echo "Ticket doesn't have collaborators."; diff --git a/include/staff/user-view.inc.php b/include/staff/user-view.inc.php index 8e6514447332f4ed3e421139000957ae41edd2c6..52af878ed3e475c5e7d2541a0483ad043e6c89c7 100644 --- a/include/staff/user-view.inc.php +++ b/include/staff/user-view.inc.php @@ -84,9 +84,8 @@ $org = $user->getOrganization(); <span id="user-<?php echo $user->getId(); ?>-org"> <?php if ($org) - echo sprintf('<a href="#users/%d/org" - class="user-action">%s</a>', - $user->getId(), $org->getName()); + echo sprintf('<a href="orgs.php?id=%d">%s</a>', + $org->getId(), $org->getName()); else echo sprintf('<a href="#users/%d/org" class="user-action">Add Organization</a>',