2017-05-10 17:37:49 +02:00
{{define "title"}}Torrents List{{end}}
2017-05-10 23:42:14 +02:00
{{define "contclass"}}cont-view{{end}}
2017-05-10 06:43:53 +02:00
{{define "content"}}
2017-05-10 23:42:14 +02:00
< div class = "blockBody" >
2017-05-20 13:45:15 +02:00
< 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 >
2017-05-24 21:43:07 +02:00
< option value = "status" > Change Status< / option >
2017-05-20 13:45:15 +02:00
< option value = "delete" > Delete< / option >
< / select >
2017-05-24 21:43:07 +02:00
< select class = "form-control" style = "display: none;" name = "status" >
2017-05-20 13:45:15 +02:00
< option value = "" > To...< / option >
2017-05-25 02:19:05 +02:00
< option value = "5" > {{call $.T "torrent_status_blocked"}}< / option >
2017-05-21 00:38:28 +02:00
< 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 >
2017-05-20 13:45:15 +02:00
< 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" >
2017-05-25 02:19:05 +02:00
< div class = "pull-right" >
< a href = "{{genRoute " mod_tlist " } } " class = "btn btn-success" > Not Deleted< / a >
< a href = "{{genRoute " mod_tlist_deleted " } } " class = "btn btn-danger" > Deleted< / a >
< / div >
2017-05-20 13:45:15 +02:00
< / 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 >
2017-05-11 01:00:00 +02:00
2017-05-20 13:45:15 +02:00
{{ range .Torrents}}
< tr >
< td > < input type = "checkbox" name = "torrent_id" value = "{{.ID }}" > < / td >
2017-05-25 02:19:05 +02:00
< td > < a href = "{{ genViewTorrentRoute .ID }}" > {{ .Name }}< / a > {{ if not .IsDeleted }}(< a href = "{{ genRoute " mod_tedit " } } ? id = {{.ID}}" > {{ call $.T "edit"}}< / a > ){{end}}< / td >
< td > {{ if .Uploader }}< a href = "{{ if .IsDeleted }}{{ genRoute " mod_tlist_deleted " } } { { else } } { { genRoute " mod_tlist " } } { { end } } ? userID = {{.UploaderID}}" > {{ .Uploader.Username }}< / a > {{ else }}れんちょん{{end}}< / td >
< td >
< a href = "{{ genRoute " mod_tblock " } } ? id = {{ . ID } } " class = "btn btn-danger" onclick = "if (!confirm('{{ call $.T " are_you_sure " } } ' ) ) return false ; " > {{ if .IsBlocked }}{{ call $.T "torrent_unblock" }}{{else}}{{ call $.T "torrent_block" }}{{end}}< / a >
{{ if .IsDeleted }}
< a href = "{{ genRoute " mod_tdelete " } } ? definitely & id = {{ . ID } } " class = "btn btn-danger" onclick = "if (!confirm('{{ call $.T " are_you_sure " } } { { call $ . T " delete_definitely_torrent_warning " } } ' ) ) return false ; " > < i class = "glyphicon glyphicon-trash" > < / i > {{ call $.T "delete_definitely" }}< / a >
{{ else }}
< a href = "{{ genRoute " mod_tdelete " } } ? id = {{ . ID } } " class = "btn btn-danger" onclick = "if (!confirm('{{ call $.T " are_you_sure " } } ' ) ) return false ; " > < i class = "glyphicon glyphicon-trash" > < / i > {{ call $.T "delete" }}< / a >
{{ end }}
< / td >
2017-05-20 13:45:15 +02:00
< / tr >
{{end}}
< / table >
< / div >
< / form >
2017-05-10 15:08:38 +02:00
< nav class = "torrentNav" aria-label = "Page navigation" >
< ul class = "pagination" >
{{ genNav .Navigation .URL 5 }}
< / ul >
< / nav >
2017-05-10 23:42:14 +02:00
< / div >
2017-05-10 07:47:01 +02:00
{{end}}
2017-05-20 13:45:15 +02:00
{{ 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 >
2017-05-21 00:38:28 +02:00
{{end}}