function support_pm_comment_view in Support Ticketing System 7
Implements hook_comment_view().
File
- support_pm/
support_pm.module, line 271 - Support Project Management. @author Jeremy Andrews <jeremy@tag1consulting.com> @package Support
Code
function support_pm_comment_view($comment, $view_mode, $langcode) {
if ($comment->node_type == 'comment_node_support_ticket' && user_access('administer support projects') && ($project = support_pm_project_load_nid($comment->nid))) {
// @@@ Why is this being appended to every comment? It seems weird for something that doesn't change state via ticket updates... --Bdragon
if (!empty($project->project)) {
$comment->content['support']['project'] = array(
'#markup' => '<div class="support-project">' . t('Project') . ': ' . check_plain($project->project) . '</div>',
);
// Make sure the weight is correct.
$comment->content['support']['#weight'] = -1;
}
}
}