Skip to content

Instantly share code, notes, and snippets.

@cgi-caesar
Created June 26, 2020 20:53
Show Gist options
  • Save cgi-caesar/ef00ddef668365a962c4dc05416ea688 to your computer and use it in GitHub Desktop.
Save cgi-caesar/ef00ddef668365a962c4dc05416ea688 to your computer and use it in GitHub Desktop.
aMember (site.php): Add link to ticket action panel for admin interface
<?php
Am_Di::getInstance()->blocks->add('helpdesk/ticket/top', new Am_Block_Base(null, 'helpdesk-action-link', null, function(Am_View $v) {
if ($v->strategy instanceof Am_Helpdesk_Strategy_Admin) {
/** @var HelpdeskTicket $ticket */
$ticket = $v->ticket;
/** @var User $user */
$user = $ticket->getUser();
$url = '/dome/url';
return <<<CUT
<script>
jQuery(function(){
jQuery('.am-helpdesk-ticket-action-refresh').after('\
<li class="am-helpdesk-ticket-action">\
<a class="link" href="{$url}">Link Title</a>\
</li>');
});
</script>
CUT;
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment