blob: 7b6d550be7ad952d019f741bc9990efcae496288 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<%args>
$Topic
$Class => 0
</%args>
% if ($Link) {
<a href="Topics.html?id=<% $Topic->Id %>&class=<% $Class %>">\
% }
<% $Topic->Name() || loc("(no name)") %>\
% if ($Topic->Description) {
: <% $Topic->Description %>
% }
% if ( $Articles->Count ) {
(<&|/l, $Articles->Count &>[quant,_1,article]</&>)
% }
% if ($Link) {
</a>
% }
<%init>
my $Articles = RT::ObjectTopics->new( $session{'CurrentUser'} );
$Articles->Limit( FIELD => 'ObjectType', VALUE => 'RT::Article' );
$Articles->Limit( FIELD => 'Topic', VALUE => $Topic->Id );
my $Link = $Topic->Children->Count || $Articles->Count;
</%init>
|