From 21a232b78413718d8a68867ba7eb4f52a287f9b6 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 7 Jun 2012 16:58:33 -0700 Subject: rt 4.0.6 --- rt/share/html/Articles/Elements/ShowTopicLink | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 rt/share/html/Articles/Elements/ShowTopicLink (limited to 'rt/share/html/Articles/Elements/ShowTopicLink') diff --git a/rt/share/html/Articles/Elements/ShowTopicLink b/rt/share/html/Articles/Elements/ShowTopicLink new file mode 100644 index 000000000..7b6d550be --- /dev/null +++ b/rt/share/html/Articles/Elements/ShowTopicLink @@ -0,0 +1,27 @@ +<%args> +$Topic +$Class => 0 + +% if ($Link) { +\ +% } +<% $Topic->Name() || loc("(no name)") %>\ +% if ($Topic->Description) { +: <% $Topic->Description %> +% } + +% if ( $Articles->Count ) { + (<&|/l, $Articles->Count &>[quant,_1,article]) +% } + +% if ($Link) { + +% } + +<%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; + -- cgit v1.2.1