Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/templates/view.html
2017-05-09 23:21:58 -05:00

98 lignes
4,5 Kio
HTML

{{define "title"}}{{.Torrent.Name}}{{end}} {{define "contclass"}}cont-view{{end}} {{define "content"}}
<div class="blockBody">
{{with .Torrent}}
<hr>
<div class="content" style="margin-bottom: 2em;">
<div class="row">
<div class="col-md-8">
<div class="row">
<div class="col-md-12">
<h3 style="word-break:break-all" {{if eq .Status 2}}class="remake" {{end}} {{if eq .Status 3}}class="trusted" {{end}} {{if eq .Status 4}}class="aplus"{{end}}>{{.Name}}</h3>
<div class="uploaded_by">
<img style="float:left; margin-right: 1em;" src="{{$.URL.Parse (printf "/img/torrents/%s.png" .Sub_Category) }}">
<h4>Uploaded by <a href="{{$.URL.Parse (printf " /user/%d/- " .UploaderId) }}">{{.UploaderName}}</a></h4>
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">
<a style="margin: 5px;" aria-label="Magnet Button" href="{{.Magnet}}" type="button" class="btn btn-lg btn-success download-btn">
<span class="glyphicon glyphicon-magnet" aria-hidden="true"></span> Download!
</a>
{{if ne .TorrentLink ""}}
<a style="margin: 5px;" aria-label="Torrent file" href="{{.TorrentLink}}" type="button" class="btn btn-lg btn-success download-btn">
<span class="glyphicon glyphicon-floppy-save" aria-hidden="true"></span> Torrent file
</a>
<a style="margin: 5px;" aria-label="Report button" href="{{.TorrentLink}}" type="button" data-toggle="modal" data-target="#reportModal" class="btn btn-danger btn-lg download-btn">
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Report!
</a> {{end}}
</div>
</div>
</div>
<div class="col-md-4">
<h4>{{T "hash"}}</h4>
<p>{{.Hash}}</p>
<hr>
<h4>{{T "date"}}</h4>
<p>{{.Date}}</p>
<hr>
<h4>{{T "size"}}</h4>
<p>{{.Filesize}}</p>
<hr>
{{if ne .WebsiteLink ""}}
<h4>{{T "Link"}}</h4>
<p><a href="{{.WebsiteLink}}">{{.WebsiteLink}}</a></p>
<hr>
{{end}}
</div>
</div>
<div class="row" id="comments">
<div class="col-md-12">
<h4>{{T "description"}}</h4>
<div style="word-break:break-all;">{{.Description}}</div>
</div>
</div>
</div>
{{end}}
<div class="row" style="margin-bottom: 2em;">
<div class="col-md-12">
<form method="post">
<div class="form-group">
{{/* There should be a better way to use translation on this... */}}
<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}}
<input type="submit" value="{{T " submit "}}">
</form>
</div>
</div>
</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}}