& Elements/Tabs &>
<&|/l,$session{'CurrentUser'}->UserObj->Name&>Journal of [_1]&>
%while( my $post = $tix->Next) {
% my $my_category = $post->FirstCustomFieldValue('RT::Journal-Category');
<%$post->CreatedObj->AsString%>
% my $content = $post->Transactions->First->Content;
% $content =~ s/^-- (.*)$//gism; # kill all signatures
% $content =~ s/\n/
/gi;
<%$content|n%>
% my $refto = $post->RefersTo;
% my $comments = $post->Transactions;
% $comments->Limit(FIELD => 'Type', VALUE => 'Correspond');
[<&|/l,$comments->Count&>[_1] Comments&>]
<%$my_category%>
% }
<&|/l&>Next page&> |
% if ($first > 1) {
<&|/l&>Previous page&> |
% }
<%INIT>
my $q = RT::Queue->new($RT::SystemUser);
$q->Load($RT::JournalQueue);
my $cat = RT::CustomField->new($RT::SystemUser);
$cat->LoadByNameAndQueue( Name => 'RT::Journal-Category', Queue => $q->Id );
my $tix = RT::Tickets->new( $session{'CurrentUser'} );
$tix->LimitQueue( VALUE => $RT::JournalQueue );
$tix->OrderBy( FIELD => 'Created', ORDER => 'DESC' );
if ($user) {
$tix->LimitOwner( VALUE => $user );
}
if ($category) {
$tix->LimitCustomField(
CUSTOMFIELD => $cat->Id,
OPERATOR => 'LIKE',
VALUE => $category . "%"
);
}
$tix->RowsPerPage($count);
$tix->FirstRow($first);
%INIT>
<%ARGS>
$user => undef
$first => 1
$category => undef
$show => 'article'
$count => 25
%ARGS>