1cccaf99e0
moveto deprecated in api
71 lignes
3,1 Kio
HTML
71 lignes
3,1 Kio
HTML
{{define "title"}}Torrents List{{end}}
|
||
{{define "contclass"}}cont-view{{end}}
|
||
{{define "content"}}
|
||
<div class="blockBody">
|
||
<form method="post" action="">
|
||
{{ range (index $.Infos "infos")}}
|
||
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
|
||
{{end}}
|
||
{{ range (index $.Errors "errors")}}
|
||
<div class="alert alert-danger"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-exclamation-sign"></i> {{ . }}</div>
|
||
{{end}}
|
||
<nav class="navbar navbar-default">
|
||
<div class="navbar-form">
|
||
<div class="form-group">
|
||
<select class="form-control" name="action">
|
||
<option value="">Action...</option>
|
||
<option value="status">Change Status</option>
|
||
<option value="delete">Delete</option>
|
||
</select>
|
||
<select class="form-control" style="display: none;" name="status">
|
||
<option value="">To...</option>
|
||
<option value="0">{{call $.T "torrent_status_hidden"}}</option>
|
||
<option value="1">{{call $.T "torrent_status_normal"}}</option>
|
||
<option value="2">{{call $.T "torrent_status_remake"}}</option>
|
||
<option value="3">{{call $.T "trusted"}}</option>
|
||
<option value="4">A+</option>
|
||
</select>
|
||
</div>
|
||
<input type="submit" class="btn btn-success" value="Apply">
|
||
<input type="reset" class="btn btn-danger" value="Reset">
|
||
</div>
|
||
</nav>
|
||
<div class="table-responsive">
|
||
<table class="table table-hover">
|
||
<tr>
|
||
<th style="width:12px;"><input type="checkbox" name="checkall" data-selectall="checkbox"></th>
|
||
<th>Torrent Name</th>
|
||
<th>Uploader</th>
|
||
<th>Action</th>
|
||
</tr>
|
||
|
||
{{ range .Torrents}}
|
||
<tr>
|
||
<td><input type="checkbox" name="torrent_id" value="{{.ID }}"></td>
|
||
<td><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> (<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}">Edit</a>)</td>
|
||
<td>{{ if gt .UploaderID 0 }}<a href="{{ genRoute "mod_tlist" }}?userID={{.UploaderID}}">{{ .Uploader.Username }}</a>{{ else }}れんちょん{{end}}</td>
|
||
<td><a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="btn btn-danger" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete" }}</a></td>
|
||
</tr>
|
||
{{end}}
|
||
</table>
|
||
</div>
|
||
</form>
|
||
<nav class="torrentNav" aria-label="Page navigation">
|
||
<ul class="pagination">
|
||
{{ genNav .Navigation .URL 5 }}
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
{{end}}
|
||
{{ define "js_footer"}}
|
||
<!-- JS Function for selecting multiple checkboxes -->
|
||
<script type="text/javascript" src="{{ .URL.Parse "/js/selectAll.js" }}"></script>
|
||
<script type="text/javascript">
|
||
$("select[name='action']").on("change", function(e) {
|
||
if ($(this).val() == "move")
|
||
$(this).siblings("select[name='moveto']").show()
|
||
else
|
||
$(this).siblings("select[name='moveto']").hide()
|
||
});
|
||
</script>
|
||
{{end}}
|