$def with (torrent_list) $:render.header(_('Torrent list'))
$:(sort_head('calc_state_str', 'S')) $:(sort_head('queue_pos', '#')) $:(sort_head('name', _('Name'))) $:(sort_head('total_size', _('Size'))) $:(sort_head('progress', _('Progress'))) $:(sort_head('num_seeds', _('Seeders'))) $:(sort_head('num_peers', _('Peers'))) $:(sort_head('download_rate', _('Download'))) $:(sort_head('upload_rate', _('Upload'))) $:(sort_head('eta', _('Eta'))) $:(sort_head('distributed_copies', _('Ava'))) $:(sort_head('ratio', _('Ratio'))) $#4-space indentation is mandatory for for-loops in templetor! $for torrent in torrent_list:
$torrent.queue_pos $(crop(torrent.name, 40)) $fsize(torrent.total_size)
$torrent.message
$torrent.num_seeds ($torrent.total_seeds) $torrent.num_peers ($torrent.total_peers) $fspeed(torrent.download_rate) $fspeed(torrent.upload_rate) $torrent.eta $("%.3f" % torrent.distributed_copies) $("%.3f" % torrent.ratio)
$:render.part_button('GET', '/torrent/add', _('Add torrent'), 'tango/list-add.png') $:render.part_button('POST', '/pause_all', _('Pause all'), 'tango/media-playback-pause.png') $:render.part_button('POST', '/resume_all', _('Resume all'), 'tango/media-playback-start.png')
$:part_stats() $:render.footer()