Created
June 26, 2020 20:53
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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