summaryrefslogtreecommitdiffstats
path: root/plugins/WebUi/templates/example/index.html
blob: 7c3ca4aabc3db0ee211e9b4fa25a64253c086f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
$def with (torrent_list)
$:render.header(_('Torrent list'))

<form action="/torrent/pause" method="POST">
<table class="torrent_list" border=1>
    <tr>
        $:(sort_head('calc_state_str', 'S'))
        $:(sort_head('queue_pos', '#'))
        $:(sort_head('name', _('Name')))
        $:(sort_head('progress', _('Progress')))
    </tr>
$#4-space indentation is mandatory for for-loops in templetor!
$for torrent in torrent_list:
    <tr>
    <td><input type="image"
        src="/static/images/$(torrent.calc_state_str)16.png"
        name="$torrent.action" value="$torrent.id">
    </td>
    <td>$torrent.queue_pos</td>
    <td style="width:100px; overflow:hidden;white-space: nowrap">
        <a href="/torrent/info/$torrent.id">$(crop(torrent.name, 40))</a></td>
    <td class="progress_bar">
        <div class="progress_bar_outer">
            <div class="progress_bar" style="width:$(torrent.progress)%">
            $torrent.message
            </div>
        </div>
    </td>
    </tr>
</table>

</form>

<div class="panel" bgcolor="5555AA">
$: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')
$:render.part_button('POST', '/logout', _('Logout'), 'tango/system-log-out.png')
</div>

$:render.footer()