%# BEGIN LICENSE BLOCK %# %# Copyright (c) 2002-2003 Jesse Vincent %# %# This program is free software; you can redistribute it and/or modify %# it under the terms of version 2 of the GNU General Public License %# as published by the Free Software Foundation. %# %# A copy of that license should have arrived with this %# software, but in any event can be snarfed from www.gnu.org. %# %# This program is distributed in the hope that it will be useful, %# but WITHOUT ANY WARRANTY; without even the implied warranty of %# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the %# GNU General Public License for more details. %# %# END LICENSE BLOCK <& Elements/Tabs, current_tab => 'NoAuth/RTFM/Browse.html', Title => loc('Browse [_1]', $class_obj->Name)&> % while (my $cat = $categories->Next) { % my $arts = RT::FM::ArticleCollection->new($session{'CurrentUser'}); % $arts->Limit(FIELD => 'Class', VALUE => $class_obj->Id); % $arts->LimitCustomField(FIELD => $cat_cf->Id, VALUE => $cat->Name); % if ($arts->Count) {

<%$cat->Name %>

% } % } <%init> my $class_obj = RT::FM::Class->new($session{'CurrentUser'}); $class_obj->LoadByCols(Name => $class); my $cat_cf = RT::FM::CustomField->new($session{'CurrentUser'}); $cat_cf->LoadByCols(Name => $group_by); my $categories = $cat_cf->ValuesObj(); <%args> $class => undef $group_by => undef