From 3c7ad4581f47bccbfcf1fa2361e4e07f2827eabb Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Sat, 31 Jan 2009 22:23:49 +0100 Subject: [PATCH] Added the display of the number of people following a ticket. --- src/IDF/Views/Issue.php | 3 ++- src/IDF/templates/idf/issues/view.html | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/IDF/Views/Issue.php b/src/IDF/Views/Issue.php index 106c11c..7e5da10 100644 --- a/src/IDF/Views/Issue.php +++ b/src/IDF/Views/Issue.php @@ -251,6 +251,7 @@ class IDF_Views_Issue $form = false; // The form is available only if logged in. $starred = false; $closed = in_array($issue->status, $prj->getTagIdsByStatus('closed')); + $interested = $issue->get_interested_list(); if (!$request->user->isAnonymous()) { $starred = Pluf_Model_InArray($request->user, $issue->get_interested_list()); $params = array( @@ -270,7 +271,6 @@ class IDF_Views_Issue array($prj->shortname, $issue->id)); $request->user->setMessage(sprintf(__('Issue %d has been updated.'), $urlissue, $issue->id)); // Get the list of interested person + owner + submitter - $interested = $issue->get_interested_list(); if (!Pluf_Model_InArray($issue->get_submitter(), $interested)) { $interested[] = $issue->get_submitter(); } @@ -324,6 +324,7 @@ class IDF_Views_Issue 'starred' => $starred, 'page_title' => $title, 'closed' => $closed, + 'interested' =>$interested->count(), ), $arrays), $request); diff --git a/src/IDF/templates/idf/issues/view.html b/src/IDF/templates/idf/issues/view.html index 2807b5e..766b3e3 100644 --- a/src/IDF/templates/idf/issues/view.html +++ b/src/IDF/templates/idf/issues/view.html @@ -126,7 +126,9 @@ {trans 'Status:'} {$issue.get_status.name}

{if $issue.get_owner != null}

{trans 'Owner:'} {showuser $issue.get_owner(), $request} -

{/if}{assign $tags = $issue.get_tags_list()}{if $tags.count()} +

{/if} +{if $interested > 0}

{trans 'Followed by:'} {blocktrans $interested}{$interested} person{plural}{$interested} persons{/blocktrans}

{/if} +{assign $tags = $issue.get_tags_list()}{if $tags.count()}

{trans 'Labels:'}
{foreach $tags as $tag}{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $tag.id, 'open')}