Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Merge pull request #244 from kipukun/master

Added front end for report on torrent view
Cette révision appartient à :
PantsuDev 2017-05-10 10:56:20 +10:00 révisé par GitHub
révision 8277143dfa

Voir le fichier

@ -1,13 +1,10 @@
{{define "title"}}{{.Torrent.Name}}{{end}}
{{define "contclass"}}cont-view{{end}}
{{define "content"}}
{{define "title"}}{{.Torrent.Name}}{{end}} {{define "contclass"}}cont-view{{end}} {{define "content"}}
<div class="blockBody">
{{with .Torrent}}
<hr>
<table class="table table-borderless">
<tr {{if eq .Status 2}}class="remake"{{end}}
{{if eq .Status 3}}class="trusted"{{end}}
{{if eq .Status 4}}class="aplus"{{end}}>
<tr {{if eq .Status 2}}class="remake" {{end}} {{if eq .Status 3}}class="trusted" {{end}} {{if eq .Status 4}}class="aplus"
{{end}}>
<td>{{T "name"}}</td>
<td>
{{.Name}}
@ -41,19 +38,23 @@
<a aria-label="Magnet Button" href="{{.Magnet}}" type="button" class="btn btn-success download-btn">
<span class="glyphicon glyphicon-magnet" aria-hidden="true"></span> Download!
</a>
<a style="padding-left: 0.5em"></a>
{{if ne .TorrentLink ""}}
<a style="padding-left: 0.5em"></a> {{if ne .TorrentLink ""}}
<a aria-label="Torrent file" href="{{.TorrentLink}}" type="button" class="btn btn-success download-btn">
<span class="glyphicon glyphicon-floppy-save" aria-hidden="true"></span> Torrent file
</a>
{{end}}
<a aria-label="Report button" href="{{.TorrentLink}}" type="button" data-toggle="modal" data-target="#reportModal" class="btn btn-danger download-btn">
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Report!
</a> {{end}}
</td>
</tr>
<tr>
<td>{{T "description"}}</td>
<td>{{.Description}}</td>
</tr>
<tr style="height:2em"> <td></td><td></td> </tr>
<tr style="height:2em">
<td></td>
<td></td>
</tr>
<tr>
<td>{{T "comments"}}</td>
<td></td>
@ -61,8 +62,7 @@
{{ range $index, $element := .Comments }}
<tr class="comment-row" id="comment_{{$index}}">
<td>
<a href="#comment_{{$index}}">{{$index}}</a>
{{.Username}}
<a href="#comment_{{$index}}">{{$index}}</a> {{.Username}}
</td>
<td>{{.Content}}</td>
</tr>
@ -75,10 +75,34 @@
<label for="comment">{{ if gt .User.Id 0}} {{T "submit_a_comment_as_username" .User.Username}} {{else}} {{T "submit_a_comment_as_anonymous"}} {{end}}</label>
<textarea name="comment" class="form-control" rows="5"></textarea>
</div>
{{with .Captcha}}
{{block "captcha" .}}{{end}}
{{end}}
{{with .Captcha}} {{block "captcha" .}}{{end}} {{end}}
<input type="submit" value="{{T " submit "}}">
</form>
</div>
{{with .Torrent}}
<div id="reportModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Report Torrent #{{.Id}}</h4>
</div>
{{end}}
<div class="modal-body">
<b>Report type:</b>
<form action="">
<input type="radio" name="report" value="illegal"> Illegal content <br/>
<input type="radio" name="report" value="spam"> Spam / garbage
</form> <br />
{{with .Captcha}} {{block "captcha" .}}{{end}} {{end}}
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-default">Report!</button>
</div>
</div>
</div>
</div>
{{end}}