[% FOR torrent = data.list.list %]
[%
SET class = [];
IF loop.index % 2; class.push('odd'); ELSE; class.push('even'); END;
IF data.current == torrent.hash; class.push('selected'); END;
UNLESS torrent.is_active; class.push('inactive'); END;
%]
[% IF torrent.hashing %]
[% ELSIF torrent.complete %]
[% IF torrent.is_active %]
[% ELSE %]
[% IF torrent.state %]
[% ELSE %]
[% END %]
[% END %]
[% ELSE %]
[% IF torrent.is_active %]
[% ELSE %]
[% IF torrent.state %]
[% ELSE %]
[% END %]
[% END %]
[% END %]
[% torrent.name %]
[%
SET message = [];
SET max_custom = data.list.list.0.custom_count || 5;
SET customs = [ 1.. max_custom];
FOR num IN customs;
SET c = 'custom' _ num;
IF torrent.${c};
message.push(gettext('Custom') _ ' ' _ num _ ': ' _
torrent.${c});
END;
END;
SET class = ['custom'];
class.push('has_custom') IF message.size;
%]