[% 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; %] [% 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; %] [% SET class = ['rate', 'digit'] %] [% IF torrent.ratio >= 1.0; class.push('positive'); ELSE; class.push('negative'); END %] [% END %]
[% gettext('Name') %] [% gettext('Priority') %] [% gettext('Size') %] [% gettext('Done') %] [% gettext('Status') %] [% gettext('Peers') %] [% gettext('Down Speed') %] [% gettext('Up Speed') %] [% gettext('Rate') %]
[% 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 %] [% gettext(torrent.priority_str) %] [% torrent.size_bytes.as_human_size %] [% torrent.size_bytes %] [% torrent.percent %]
[% IF torrent.hashing; gettext('Hashing'); ELSIF torrent.complete; IF torrent.is_active; gettext('Seeding'); ELSE; gettext('Finished'); END; ELSE; IF torrent.is_active; gettext('Downloading'); ELSE; IF torrent.state; gettext('Paused'); ELSE; gettext('Stoped'); END; END; END; %] [% torrent.peers_connected %] [% torrent.down_rate.as_human_speed %] [% torrent.down_rate %] [% torrent.up_rate.as_human_speed %] [% torrent.up_rate %] [% torrent.ratio %]