From 76e5ec39766dc1e49dda39f404797205766e6ec6 Mon Sep 17 00:00:00 2001 From: Marco Villegas Date: Sat, 7 Aug 2010 02:41:26 -0500 Subject: [PATCH] display project name on the project issue to link filter --- project_issue.module | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git project_issue.module project_issue.module index 32c2428..e37e3fd 100644 --- project_issue.module +++ project_issue.module @@ -1130,6 +1130,7 @@ function project_issue_link_alter(&$links, $node) { */ function theme_project_issue_issue_link($node, $comment_id = NULL, $comment_number = NULL, $include_assigned = FALSE) { $path = "node/$node->nid"; + $project_name = 'somevalue'; //FIXME get the right value // See if the issue is assigned to anyone. If so, we'll include it either // in the title attribute on hover, or next to the issue link if there was @@ -1145,19 +1146,19 @@ function theme_project_issue_issue_link($node, $comment_id = NULL, $comment_numb // We have an assigned user, but we're not going to print it next to the // issue link, so include it in title. l() runs $attributes through // drupal_attributes() which escapes the value. - $attributes = array('title' => t('Status: !status, Assigned to: !username', array('!status' => project_issue_state($node->project_issue['sid']), '!username' => $username))); + $attributes = array('title' => t('Project: !project_name, Status: !status, Assigned to: !username', array('!project_name' => $project_name, '!status' => project_issue_state($node->project_issue['sid']), '!username' => $username))); } else { // Just the status. - $attributes = array('title' => t('Status: !status', array('!status' => project_issue_state($node->project_issue['sid'])))); + $attributes = array('title' => t('Project: !project_name, Status: !status', array('!project_name' => $project_name, '!status' => project_issue_state($node->project_issue['sid'])))); } if (isset($comment_id)) { - $title = "#$node->nid-$comment_number: $node->title"; + $title = "[$project_name] #$node->nid-$comment_number: $node->title"; $link = l($title, $path, array('attributes' => $attributes, 'fragment' => "comment-$comment_id")); } else { - $title = "#$node->nid: $node->title"; + $title = "[$project_name] #$node->nid: $node->title"; $link = l($title, $path, array('attributes' => $attributes)); } $output = ''. $link; -- 1.7.1