$def with (torrent, redirect=None)
<form method="POST" action="$base/torrent/files/$torrent.id">
$if redirect:
    <input type="hidden" name="redir" value="$base/home">
$else:
    <input type="hidden" name="redir" value="$self_url()">

<table width="100%">

$altrow(True)
<tr class="head">
    <th width="100%">$_("File")</th>
    <th width="50px">$_("Size")</th>
    <th width="50px">$_("Progress")</th>
    <th width="16px"><img src="$base/static/images/16/process-stop.png" title="$_('Do not download')"></th>
    <th width="16px"><img src="$base/static/images/16/gtk-yes.png" title="$_('Normal priority')"></th>
    <th width="16px"><img src="$base/static/images/16/queue-up.png" title="$_('High priority')"></th>
    <th width="16px"><img src="$base/static/images/16/go-top.png" title="$_('Highest priority')"></th>
</tr>
$for i, file in enumerate(torrent.files):
    <tr class="$altrow()"  >
    <td title="$file['path']">
    $(crop_left(file["path"], 60))
    </td>
        <td style="white-space:nowrap">$fsize(file["size"])</td>
        <td align="right">$int(torrent.file_progress[i] * 100)%</td>
    $for prio in [0, 1, 2, 5]:
        <td><input type="radio" id="prio_$i" name="prio_$i" value="$prio" style="margin:0px"
        $if torrent.file_priorities[i] == prio:
            checked
        ></input></td>
    </tr>
</table>
<input type="submit" value="$_('Update')" name="submit_files">
</form>
