Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds
The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.
* Style changes and old code removal in router
Router needs a lot of work done to its (lack of) error handling.
* Dead code removal and style changes
Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.
* Finish dead code removal and style changes
Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.
* Fix accidental find-and-replace
* Style, error checking, saftey, bug fix changes
* Redo error checking erased during merge
* Re-add merge-erased fix. Make Safe safe.
2017-05-10 04:34:40 +02:00
{{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}}>
< td > {{T "name"}}< / td >
< td >
{{.Name}}
< img style = "float:right" src = "{{$.URL.Parse (printf " / img / torrents / % s . png " . SubCategory ) } } " >
< / td >
< / tr >
< tr >
< td > {{T "hash"}}< / td >
< td class = "torrent-hash" > {{.Hash}}< / td >
< / tr >
< tr >
< td > {{T "date"}}< / td >
< td class = "date-full" > {{.Date}}< / td >
< / tr >
< tr >
< td > {{T "size"}}< / td >
< td > {{.Filesize}}< / td >
< / tr >
< tr >
< td > Uploader< / td >
< td > < a href = "{{$.URL.Parse (printf " / user / % d / - " . UploaderID ) } } " > {{.UploaderName}}< / a > < / td >
{{if ne .WebsiteLink ""}}
< tr >
< td > {{T "Link"}}< / td >
< td > < a href = "{{.WebsiteLink}}" > {{.WebsiteLink}}< / td >
2017-05-09 08:15:56 +02:00
< / tr >
2017-05-09 12:24:26 +02:00
{{end}}
2017-05-05 05:04:04 +02:00
< tr >
2017-05-08 22:42:44 +02:00
< td > {{T "links"}}< / td >
2017-05-07 18:58:11 +02:00
< td >
< a aria-label = "Magnet Button" href = "{{.Magnet}}" type = "button" class = "btn btn-success download-btn" >
2017-05-08 05:34:12 +02:00
< span class = "glyphicon glyphicon-magnet" aria-hidden = "true" > < / span > Download!
2017-05-07 18:58:11 +02:00
< / a >
2017-05-10 02:51:05 +02:00
< 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" >
2017-05-07 18:58:11 +02:00
< span class = "glyphicon glyphicon-floppy-save" aria-hidden = "true" > < / span > Torrent file
< / a >
2017-05-10 02:51:05 +02:00
< 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 >
< 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}}
< form method = "post" >
< div class = "form-group" >
{{/* There should be a better way to use translation on this... */}}
Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds
The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.
* Style changes and old code removal in router
Router needs a lot of work done to its (lack of) error handling.
* Dead code removal and style changes
Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.
* Finish dead code removal and style changes
Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.
* Fix accidental find-and-replace
* Style, error checking, saftey, bug fix changes
* Redo error checking erased during merge
* Re-add merge-erased fix. Make Safe safe.
2017-05-10 04:34:40 +02:00
< 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 >
2017-05-10 02:51:05 +02:00
< textarea name = "comment" class = "form-control" rows = "5" > < / textarea >
< / div >
{{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" > × < / button >
Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds
The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.
* Style changes and old code removal in router
Router needs a lot of work done to its (lack of) error handling.
* Dead code removal and style changes
Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.
* Finish dead code removal and style changes
Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.
* Fix accidental find-and-replace
* Style, error checking, saftey, bug fix changes
* Redo error checking erased during merge
* Re-add merge-erased fix. Make Safe safe.
2017-05-10 04:34:40 +02:00
< h4 class = "modal-title" > Report Torrent #{{.ID}}< / h4 >
2017-05-10 02:51:05 +02:00
< / 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 >
Consistency, formatting, error checking, cleanup, and a couple bug fixes (#245)
* Checkpoint: it builds
The config, db, model, network, os, and public packages have had some
fixes to glaringly obvious flaws, dead code removed, and stylistic
changes.
* Style changes and old code removal in router
Router needs a lot of work done to its (lack of) error handling.
* Dead code removal and style changes
Now up to util/email/email.go. After I'm finished with the initial sweep
I'll go back and fix error handling and security issues. Then I'll fix
the broken API. Then I'll go through to add documentation and fix code
visibility.
* Finish dead code removal and style changes
Vendored libraries not touched. Everything still needs security fixes
and documentation. There's also one case of broken functionality.
* Fix accidental find-and-replace
* Style, error checking, saftey, bug fix changes
* Redo error checking erased during merge
* Re-add merge-erased fix. Make Safe safe.
2017-05-10 04:34:40 +02:00
{{end}}