<div class="am-helpdesk-history">
    <div class="am-helpdesk-history-title">
        <div class="am-helpdesk-history-title-action"><a class="local" href="javascript:;"><?php __e('Requester History') ?> (<?php p($userTotalTickets) ?>)</a></div>
        <div class="am-helpdesk-history-user">
            <a class="link" href="<?php p($this->userUrl($user->user_id)); ?>">
            <?php p($user->login) ?></a>
            #<?php p($user->pk()) ?>
            <?php if (trim($user->getName())) : ?>
            (<?php p($user->getName()) ?>)
            <?php endif; ?>
            <strong><?php p(implode(', ', $di->productTable->getProductTitles($user->getActiveProductIds()))) ?></strong><?php if (empty($this->noHelpdeskHistoryUserTotalPaid)): ?><span class="am-helpdesk-history-user-paid">
            &middot;
            <?php __e('Total Paid') ?>: <span style="color:#488f37"><?php p(Am_Currency::render($totalPaid)) ?></span></span><?php endif; ?>
            <?php if (empty($this->noHelpdeskHistoryUserTotalRefund) && $totalRefund) : ?>
            <span class="am-helpdesk-history-user-refund"> &middot; <?php __e('Refunds') ?>: <span class="red"><?php p(Am_Currency::render($totalRefund)) ?><span></span>
            <?php endif; ?>
        </div>
    </div>
    <div class="am-helpdesk-history-content">
        <?php echo $historyGrid ?>
    </div>
</div>