Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Merge pull request #262 from azhao12345/revert-256-master

Revert "New view template design"
Cette révision appartient à :
ewhal 2017-05-10 16:08:10 +10:00 révisé par GitHub
révision 1a77a4e880

Voir le fichier

@ -1,84 +1,96 @@
{{define "title"}}{{.Torrent.Name}}{{end}} {{define "contclass"}}cont-view{{end}} {{define "content"}} {{define "title"}}{{.Torrent.Name}}{{end}}
<div class="blockBody"> {{define "contclass"}}cont-view{{end}}
{{with .Torrent}} {{define "content"}}
<hr> <div class="blockBody">
<div class="content" style="margin-bottom: 2em;"> {{with .Torrent}}
<div class="row"> <hr>
<div class="col-md-8"> <table class="table table-borderless">
<div class="row"> <tr {{if eq .Status 2}}class="remake"{{end}}
<div class="col-md-12"> {{if eq .Status 3}}class="trusted"{{end}}
<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> {{if eq .Status 4}}class="aplus"{{end}}>
<div class="uploaded_by"> <td>{{T "name"}}</td>
<img style="float:left; margin-right: 1em;" src="{{$.URL.Parse (printf "/img/torrents/%s.png" .Sub_Category) }}"> <td>
<h4>Uploaded by <a href="{{$.URL.Parse (printf " /user/%d/- " .UploaderId) }}">{{.UploaderName}}</a></h4> {{.Name}}
</div> <img style="float:right" src="{{$.URL.Parse (printf "/img/torrents/%s.png" .SubCategory) }}">
</div> </td>
</div> </tr>
<br /> <tr>
<div class="row"> <td>{{T "hash"}}</td>
<div class="col-md-12"> <td class="torrent-hash">{{.Hash}}</td>
<a style="margin: 5px;" aria-label="Magnet Button" href="{{.Magnet}}" type="button" class="btn btn-lg btn-success download-btn"> </tr>
<span class="glyphicon glyphicon-magnet" aria-hidden="true"></span> Download! <tr>
</a> <td>{{T "date"}}</td>
{{if ne .TorrentLink ""}} <td class="date-full">{{.Date}}</td>
<a style="margin: 5px;" aria-label="Torrent file" href="{{.TorrentLink}}" type="button" class="btn btn-lg btn-success download-btn"> </tr>
<span class="glyphicon glyphicon-floppy-save" aria-hidden="true"></span> Torrent file <tr>
</a> <td>{{T "size"}}</td>
<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"> <td>{{.Filesize}}</td>
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Report! </tr>
</a> {{end}} <tr>
</div> <td>Uploader</td>
</div> <td><a href="{{$.URL.Parse (printf "/user/%d/-" .UploaderID) }}">{{.UploaderName}}</a></td>
</div> {{if ne .WebsiteLink ""}}
<div class="col-md-4"> <tr>
<h4>{{T "hash"}}</h4> <td>{{T "Link"}}</td>
<p>{{.Hash}}</p> <td><a href="{{.WebsiteLink}}">{{.WebsiteLink}}</td>
<hr> </tr>
<h4>{{T "date"}}</h4> {{end}}
<p>{{.Date}}</p> <tr>
<hr> <td>{{T "links"}}</td>
<h4>{{T "size"}}</h4> <td>
<p>{{.Filesize}}</p> <a aria-label="Magnet Button" href="{{.Magnet}}" type="button" class="btn btn-success download-btn">
<hr> <span class="glyphicon glyphicon-magnet" aria-hidden="true"></span> Download!
{{if ne .WebsiteLink ""}} </a>
<h4>{{T "Link"}}</h4> <a style="padding-left: 0.5em"></a> {{if ne .TorrentLink ""}}
<p><a href="{{.WebsiteLink}}">{{.WebsiteLink}}</a></p> <a aria-label="Torrent file" href="{{.TorrentLink}}" type="button" class="btn btn-success download-btn">
<hr> <span class="glyphicon glyphicon-floppy-save" aria-hidden="true"></span> Torrent file
{{end}} </a>
</div> <a aria-label="Report button" href="{{.TorrentLink}}" type="button" data-toggle="modal" data-target="#reportModal" class="btn btn-danger download-btn">
</div> <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Report!
<div class="row" id="comments"> </a> {{end}}
<div class="col-md-12"> </td>
<h4>{{T "description"}}</h4> </tr>
<div style="word-break:break-all;">{{.Description}}</div> <tr>
</div> <td>{{T "description"}}</td>
</div> <td>{{.Description}}</td>
</div> </tr>
<tr style="height:2em">
<td></td>
<td></td>
</tr>
<tr>
<td>{{T "comments"}}</td>
<td></td>
</tr>
{{ range $index, $element := .Comments }}
<tr class="comment-row" id="comment_{{$index}}">
<td>
<a href="#comment_{{$index}}">{{$index}}</a> {{.Username}}
</td>
<td>{{.Content}}</td>
</tr>
{{end}}
</table>
{{end}} {{end}}
<form method="post">
<div class="row" style="margin-bottom: 2em;"> <div class="form-group">
<div class="col-md-12"> {{/* There should be a better way to use translation on this... */}}
<form method="post"> <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>
<div class="form-group"> <textarea name="comment" class="form-control" rows="5"></textarea>
{{/* 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 .Captcha}} {{block "captcha" .}}{{end}} {{end}}
<input type="submit" value="{{T " submit "}}">
</form>
</div> </div>
{{with .Torrent}} {{with .Torrent}}
<div id="reportModal" class="modal fade" role="dialog"> <div id="reportModal" class="modal fade" role="dialog">
<div class="modal-dialog"> <div class="modal-dialog">
<!-- Modal content--> <!-- Modal content-->
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Report Torrent #{{.Id}}</h4> <h4 class="modal-title">Report Torrent #{{.ID}}</h4>
</div> </div>
{{end}} {{end}}
<div class="modal-body"> <div class="modal-body">
@ -93,6 +105,7 @@
<button type="submit" class="btn btn-default">Report!</button> <button type="submit" class="btn btn-default">Report!</button>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
{{end}} {{end}}