Added the display of the number of people following a ticket.

This commit is contained in:
Loic d'Anterroches 2009-01-31 22:23:49 +01:00
parent 01b68978ff
commit 3c7ad4581f
2 changed files with 5 additions and 2 deletions

View File

@ -251,6 +251,7 @@ class IDF_Views_Issue
$form = false; // The form is available only if logged in. $form = false; // The form is available only if logged in.
$starred = false; $starred = false;
$closed = in_array($issue->status, $prj->getTagIdsByStatus('closed')); $closed = in_array($issue->status, $prj->getTagIdsByStatus('closed'));
$interested = $issue->get_interested_list();
if (!$request->user->isAnonymous()) { if (!$request->user->isAnonymous()) {
$starred = Pluf_Model_InArray($request->user, $issue->get_interested_list()); $starred = Pluf_Model_InArray($request->user, $issue->get_interested_list());
$params = array( $params = array(
@ -270,7 +271,6 @@ class IDF_Views_Issue
array($prj->shortname, $issue->id)); array($prj->shortname, $issue->id));
$request->user->setMessage(sprintf(__('<a href="%s">Issue %d</a> has been updated.'), $urlissue, $issue->id)); $request->user->setMessage(sprintf(__('<a href="%s">Issue %d</a> has been updated.'), $urlissue, $issue->id));
// Get the list of interested person + owner + submitter // Get the list of interested person + owner + submitter
$interested = $issue->get_interested_list();
if (!Pluf_Model_InArray($issue->get_submitter(), $interested)) { if (!Pluf_Model_InArray($issue->get_submitter(), $interested)) {
$interested[] = $issue->get_submitter(); $interested[] = $issue->get_submitter();
} }
@ -324,6 +324,7 @@ class IDF_Views_Issue
'starred' => $starred, 'starred' => $starred,
'page_title' => $title, 'page_title' => $title,
'closed' => $closed, 'closed' => $closed,
'interested' =>$interested->count(),
), ),
$arrays), $arrays),
$request); $request);

View File

@ -126,7 +126,9 @@
<strong>{trans 'Status:'}</strong> {$issue.get_status.name}</p> <strong>{trans 'Status:'}</strong> {$issue.get_status.name}</p>
{if $issue.get_owner != null}<p> {if $issue.get_owner != null}<p>
<strong>{trans 'Owner:'}</strong> {showuser $issue.get_owner(), $request} <strong>{trans 'Owner:'}</strong> {showuser $issue.get_owner(), $request}
</p>{/if}{assign $tags = $issue.get_tags_list()}{if $tags.count()} </p>{/if}
{if $interested > 0}<p><strong>{trans 'Followed by:'}</strong> {blocktrans $interested}{$interested} person{plural}{$interested} persons{/blocktrans}</p>{/if}
{assign $tags = $issue.get_tags_list()}{if $tags.count()}
<p> <p>
<strong>{trans 'Labels:'}</strong><br /> <strong>{trans 'Labels:'}</strong><br />
{foreach $tags as $tag}{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $tag.id, 'open')} {foreach $tags as $tag}{aurl 'url', 'IDF_Views_Issue::listLabel', array($project.shortname, $tag.id, 'open')}