Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

New modpanel fix (#895)

* Comments count number

* New Modpanel fix

Fixes #755 (@ilikecats)
modpanel tables have margins
modpanel delete buttons are red
some coloring for buttons
reassign form looks better
reassign form textarea have rows="20" cols="40"
"save changes" btn green
report reasons are now translated in modpanel
delete is a real button on modpanel users page

* moved getReportDescription
Cette révision appartient à :
akuma06 2017-06-04 02:28:33 +02:00 révisé par GitHub
Parent 991fc73c4e
révision 38e8ee3a7a
15 fichiers modifiés avec 167 ajouts et 53 suppressions

Voir le fichier

@ -34,21 +34,6 @@ type TorrentReportJSON struct {
User UserJSON `json:"user"`
}
/* Model Conversion to Json */
func getReportDescription(d string) string {
if d == "illegal" {
return "Illegal content"
} else if d == "spam" {
return "Spam / Garbage"
} else if d == "wrongcat" {
return "Wrong category"
} else if d == "dup" {
return "Duplicate / Deprecated"
}
return "???"
}
// ToJSON : conversion to json of a torrent report
func (report *TorrentReport) ToJSON() TorrentReportJSON {
t := TorrentJSON{}
@ -59,7 +44,7 @@ func (report *TorrentReport) ToJSON() TorrentReportJSON {
if report.User != nil {
u = report.User.ToJSON()
}
json := TorrentReportJSON{report.ID, getReportDescription(report.Description), t, u}
json := TorrentReportJSON{report.ID, report.Description, t, u}
return json
}

Voir le fichier

@ -50,3 +50,26 @@
display: inline-block;
background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIg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NTMuNTg4LDE3NS4zOCwzNDguMjk5LDE2OS44ODMsMzQxLjY0NSwxNjkuNzU2eiIgZmlsbD0iIzAwMDAwMCIvPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=)
}
.btn-green {
background: #98D9A8;
color:white;
font-weight: bold;
}
.btn-red {
background: #E84C4C;
color:white;
font-weight: bold;
}
.btn-blue {
background: #60B0F0;
color:white;
font-weight: bold;
}
.btn-orange {
background: #F0B080;
color:white;
font-weight: bold;
}

Voir le fichier

@ -155,3 +155,24 @@ td.tr-le, .error-text { color: #E84C4C; }
width: 13px;
}
.btn-green {
background: #98D9A8;
color:white;
font-weight: bold;
}
.btn-red {
background: #E84C4C;
color:white;
font-weight: bold;
}
.btn-blue {
background: #60B0F0;
color:white;
font-weight: bold;
}
.btn-orange {
background: #F0B080;
color:white;
font-weight: bold;
}

Voir le fichier

@ -252,6 +252,8 @@ th { border-bottom-width: 2px; }
.tr-cat { width: 90px; text-align: center; }
.tr-name { width: auto; text-align: left; white-space: normal; word-break: break-word; font-weight: bold; }
.tr-links { width: 66px; }
.tr-cs { width: 5px; overflow: initial; text-overflow: initial; }
.tr-cs .comment-icon { margin-bottom: 4px; }
.tr-size { width: 90px; }
.tr-se, .tr-le { font-weight: bold; }
.tr-se, .tr-le, .tr-dl { width: 50px; }
@ -556,6 +558,18 @@ td.tr-le, .error-text { color: #E84C4C; }
div.profile-content.box > nav > ul > li, nav.adminNav > ul > li {
border-right-width: 1px;
}
.comment-icon {
width: 20px;
height: 20px;
display: inline-block;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAeCAYAAABNChwpAAAAA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Ozs4Yt4CD1EqkQF9JD7JarRfxJH+m6i5Is6txGRe9JY9QyrIer7vBjGSTo3DvDvSHYseXm5ub80n0D/jlDLKiWXQ6QSIuTLlUSsbq1E1EQ0NDalpa2mt8O1wmkRgYYMULudra2ppKoiMDWVBVfHy8ZOj/C1wzE5fyA5KVG3iqo0kcEHC3CKzYhNQ8j6XoKSkp6/jYkVGzNKwzjsSJ5/onMtm7/f39F6jJJ9hZ473PTUhIWMOX1S3EmpfQ9Q3lrUKheEDdDgZfNSFwGTNL2WHIE6xEB7HIG9jlRdoty8zM7EPfZzjrLaR6CzBCS13Y11YUDJhITk7+7e2yS4LnUwPFD3E0G5joK1x3VSaTrUL2A5Nu4HcBsiH6lPPmstQmCH8A1v3Sgmh4wg0AAAAASUVORK5CYII=');
background-repeat: no-repeat;
background-size: 20px 20px;
font-size: 0.8em;
line-height: 20px;
}
/* Filelist */
.filelist-control {
cursor: pointer;
@ -914,3 +928,36 @@ input.filelist-checkbox:checked + table.table-filelist {
.toolbar > div.float-right {
margin-top: 5px;
}
.content-admin .form-box form {
text-align: left;
padding: 0 10px 10px;
}
.btn-green {
background: #98D9A8;
color:white;
font-weight: bold;
}
.btn-red {
background: #E84C4C;
color:white;
font-weight: bold;
}
.btn-blue {
background: #60B0F0;
color:white;
font-weight: bold;
}
.btn-orange {
background: #F0B080;
color:white;
font-weight: bold;
}
.btn-blue:hover, .btn-red:hover, .btn-green:hover, .btn-orange:hover {
opacity: 0.7;
}

Voir le fichier

@ -142,3 +142,25 @@ td.tr-le, .error-text { color: #cc6666; }
display: inline-block;
background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG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EyLjI3OCAgICBjMC4wNzgsMC4wMDEsMC4xNTgsMC4wMDIsMC4yMzYsMC4wMDJjNi41NDYsMCwxMS45MTYtNS4yNDQsMTIuMDQyLTExLjgxN2wzLjc4MS0xOTYuNjM0ICAgIEMzNTMuNTg4LDE3NS4zOCwzNDguMjk5LDE2OS44ODMsMzQxLjY0NSwxNjkuNzU2eiIgZmlsbD0iIzAwMDAwMCIvPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=)
}
.btn-green {
background: #98D9A8;
color:white;
font-weight: bold;
}
.btn-red {
background: #E84C4C;
color:white;
font-weight: bold;
}
.btn-blue {
background: #60B0F0;
color:white;
font-weight: bold;
}
.btn-orange {
background: #F0B080;
color:white;
font-weight: bold;
}

Voir le fichier

@ -224,4 +224,16 @@ var FuncMap = template.FuncMap{
}
return lastID
},
"getReportDescription": func(d string, T publicSettings.TemplateTfunc) string {
if d == "illegal" {
return "Illegal content"
} else if d == "spam" {
return "Spam / Garbage"
} else if d == "wrongcat" {
return "Wrong category"
} else if d == "dup" {
return "Duplicate / Deprecated"
}
return string(T(d))
},
}

Voir le fichier

@ -15,10 +15,10 @@
{{ range .Models}}
<tr>
<!-- TODO: add href="{{ genRoute "mod_cedit" }}?id={{.ID}}" for comment editing -->
<td class="tr-name"><a>{{ .Content }}</a></td>
<td class="tr-name home-td"><a>{{ .Content }}</a></td>
<td class="tr-size home-td"><a href="{{ genViewTorrentRoute .TorrentID }}">{{ .TorrentID }}</a></td>
<td class="tr-size home-td">{{ .UserID }}</td>
<td class="tr-actions home-td"><a href="{{ genRoute "mod_cdelete" }}?id={{.ID}}" class="form-input" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
<td class="tr-actions home-td"><a href="{{ genRoute "mod_cdelete" }}?id={{.ID}}" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
</tbody>

Voir le fichier

@ -13,9 +13,9 @@
<tbody>
{{range .Torrents}}
<tr>
<td class="tr-name"><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> <a href="{{ genRoute "mod_tedit" }}?id={{.ID}}" class="form-input float-right">{{ call $.T "edit" }}</a></td>
<td class="tr-name home-td"><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> <a href="{{ genRoute "mod_tedit" }}?id={{.ID}}" class="form-input btn-blue float-right">{{ call $.T "edit" }}</a></td>
<td class="tr-size home-td"><a href="{{ genRoute "mod_tlist" }}?userID={{.UploaderID}}">{{ .UploaderID }}</a></td>
<td class="tr-size home-td"><a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="form-input" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
<td class="tr-size home-td"><a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
</tbody>
@ -33,17 +33,17 @@
<tr>
<th class="tr-name">{{ call $.T "name" }}</th>
<th class="tr-size">{{ call $.T "username" }}</th>
<th class="tr-size">{{ call $.T "reason" }}</th>
<th class="tr-size">{{ call $.T "actions" }}</th>
<th class="tr-actions">{{ call $.T "reason" }}</th>
<th class="tr-actions">{{ call $.T "actions" }}</th>
</tr>
</thead>
<tbody>
{{range .TorrentReports}}
<tr>
<td class="tr-name"><a href="{{ genRoute "view_torrent" "id" (print .Torrent.ID ) }}">{{ .Torrent.Name }}</a> <a href="{{ genRoute "mod_tedit" }}?id={{ print .Torrent.ID}}" class="form-input float-right">{{ call $.T "edit" }}</a></td>
<td class="tr-name home-td"><a href="{{ genRoute "view_torrent" "id" (print .Torrent.ID ) }}">{{ .Torrent.Name }}</a> <a href="{{ genRoute "mod_tedit" }}?id={{ print .Torrent.ID}}" class="form-input btn-blue float-right">{{ call $.T "edit" }}</a></td>
<td class="tr-size home-td">{{.User.Username}}</td>
<td class="tr-size home-td">{{.Description}}</td>
<td class="tr-size home-td"><a href="{{ genRoute "mod_trdelete" }}?id={{ print .ID }}" class="form-input"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
<td class="tr-actions home-td">{{ getReportDescription .Description $.T }}</td>
<td class="tr-actions home-td"><a href="{{ genRoute "mod_trdelete" }}?id={{ print .ID }}" class="form-input btn-red"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
</tbody>
@ -65,8 +65,8 @@
<tbody>
{{range .Users}}
<tr>
<td class="tr-name"><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td class="tr-size home-td"><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="form-input" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
<td class="tr-name home-td"><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td class="tr-size home-td"><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
</tbody>
@ -89,9 +89,9 @@
<tbody>
{{range .Comments}}
<tr>
<td class="tr-name"><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</a></td>
<td class="tr-name home-td"><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</a></td>
<td class="tr-size home-td"><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{.UserID}}</a></td>
<td class="tr-size home-td"><a href="{{ genRoute "mod_cdelete" }}?id={{ .ID }}" class="form-input" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
<td class="tr-size home-td"><a href="{{ genRoute "mod_cdelete" }}?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
</tbody>

Voir le fichier

@ -49,7 +49,7 @@
<p class="help-block">{{call $.T "description_markdown_notice"}}</p>
<textarea name="desc" class="form-input up-input" rows="10">{{.Description}}</textarea>
</div>
<button type="submit" class="form-input up-input">{{call $.T "save_changes"}}</button>
<button type="submit" class="form-input up-input btn-green">{{call $.T "save_changes"}}</button>
</form>
</div>
{{end}}

Voir le fichier

@ -1,6 +1,6 @@
{{define "title"}}{{ call $.T "torrent_reassign" }}{{end}}
{{define "content"}}
<div class="results box">
<div class="results box form-box">
<h1>{{ call $.T "torrent_reassign" }}</h1>
<form enctype="multipart/form-data" method="POST">
{{ block "csrf_field" $ }}{{end}}
@ -25,12 +25,12 @@
<div class="form-group">
<p>{{call $.T "reassign_indication"}}</p>
<textarea class="form-input" rows="20" cols="40" name="data">{{.Data}}</textarea>
<textarea rows="20" cols="40" name="data">{{.Data}}</textarea>
</div>
{{end}}
<p>{{ call $.T "reassign_warning_2" }}</p>
<button type="submit" class="form-input">{{call $.T "save_changes"}}</button>
<button type="submit" class="form-input btn-green">{{call $.T "save_changes"}}</button>
</form>
</div>
{{end}}

Voir le fichier

@ -7,19 +7,19 @@
<tr>
<th class="tr-name">{{ call $.T "name" }}</th>
<th class="tr-size">{{ call $.T "username" }}</th>
<th class="tr-size">{{ call $.T "reason" }}</th>
<th class="tr-actions">{{ call $.T "reason" }}</th>
<th class="tr-actions">{{ call $.T "actions" }}</th>
</tr>
</thead>
<tbody>
{{range .Models}}
<tr>
<td class="tr-name"><a href="{{ genRoute "view_torrent" "id" (print .Torrent.ID) }}">{{ .Torrent.Name }}</a> <a href="{{ genRoute "mod_tedit" }}?id={{ print .Torrent.ID}}" class="form-input float-right">{{ call $.T "edit"}}</a></td>
<td class="tr-name home-td"><a href="{{ genRoute "view_torrent" "id" (print .Torrent.ID) }}">{{ .Torrent.Name }}</a> <a href="{{ genRoute "mod_tedit" }}?id={{ print .Torrent.ID}}" class="form-input btn-blue float-right">{{ call $.T "edit"}}</a></td>
<td class="tr-size home-td">{{.User.Username}}</td>
<td class="tr-size home-td">{{.Description}}</td>
<td class="tr-actions home-td">{{ getReportDescription .Description $.T }}</td>
<td class="tr-actions home-td">
<a href="{{ genRoute "mod_tdelete" }}?id={{ print .Torrent.ID }}" class="form-input" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i>{{ call $.T "delete_torrent" }}</a><br>
<a href="{{ genRoute "mod_trdelete" }}?id={{ print .ID }}" class="form-input"><i class="trash-icon"></i>{{ call $.T "delete_report" }}</a></td>
<a href="{{ genRoute "mod_tdelete" }}?id={{ print .Torrent.ID }}" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i>{{ call $.T "delete_torrent" }}</a><br>
<a href="{{ genRoute "mod_trdelete" }}?id={{ print .ID }}" class="form-input btn-red"><i class="trash-icon"></i>{{ call $.T "delete_report" }}</a></td>
</tr>
{{end}}
</tbody>

Voir le fichier

@ -44,14 +44,14 @@
{{ range .Models}}
<tr>
<td class="tr-cb"><input type="checkbox" class="selectable" name="torrent_id" value="{{.ID }}"></td>
<td class="tr-name"><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> {{ if not .IsDeleted }}<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}" class="form-input float-right">{{ call $.T "edit"}}</a>{{end}}</td>
<td class="tr-name home-td"><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> {{ if not .IsDeleted }}<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}" class="form-input btn-blue float-right">{{ call $.T "edit"}}</a>{{end}}</td>
<td class="tr-size home-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 class="tr-actions home-td">
<a href="{{ genRoute "mod_tblock" }}?id={{ .ID }}" class="form-input" onclick="if (!confirm('{{ call $.T "are_you_sure"}}')) return false;">{{ if .IsBlocked }}{{ call $.T "torrent_unblock" }}{{else}}{{ call $.T "torrent_block" }}{{end}}</a>
<a href="{{ genRoute "mod_tblock" }}?id={{ .ID }}" class="form-input btn-orange" 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 }}
<br><a href="{{ genRoute "mod_tdelete" }}?definitely&id={{ .ID }}" class="form-input" onclick="if (!confirm('{{ call $.T "are_you_sure"}} {{ call $.T "delete_definitely_torrent_warning"}}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete_definitely" }}</a>
<br><a href="{{ genRoute "mod_tdelete" }}?definitely&id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure"}} {{ call $.T "delete_definitely_torrent_warning"}}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete_definitely" }}</a>
{{ else }}
<a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="form-input" onclick="if (!confirm('{{ call $.T "are_you_sure"}}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a>
<a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure"}}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a>
{{ end }}
</td>
</tr>

Voir le fichier

@ -12,8 +12,8 @@
<tbody>
{{ range .Models}}
<tr>
<td class="tr-name"><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td class="tr-actions home-td">{{if gt .ID 0}}<a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="btn btn-danger btn-lg" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a>{{end}}</td>
<td class="tr-name home-td"><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td class="tr-actions home-td">{{if gt .ID 0}}<a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="form-input btn-red" onclick="if (!confirm('{{ call $.T "are_you_sure" }}')) return false;"><i class="trash-icon"></i> {{ call $.T "delete" }}</a>{{end}}</td>
</tr>
{{end}}
</tbody>

Voir le fichier

@ -24,6 +24,7 @@ Your browser does not support the audio element.
<th class="tr-name">
<a href="{{ genSearchWithOrdering .URL "1" }}">{{call $.T "name"}}<span class="sort-arrows">{{ genSortArrows .URL "1" }}</span></a>
</th>
<th class="tr-cs"></th>
<th class="tr-links"></th>
<th class="tr-size hide-xs"><a href="{{ genSearchWithOrdering .URL "4" }}">{{call $.T "size"}}<span class="sort-arrows">{{ genSortArrows .URL "4" }}</span></a></th>
@ -65,11 +66,11 @@ Your browser does not support the audio element.
{{.Name}}
</a>
</td>
<!--
<td class="hidden-xs">
{{len .Comments}}
<td class="tr-cs home-td hide-xs">
{{ if gt (len .Comments) 0 }}
<i class="comment-icon" title="{{ call $.T "comments" }}">{{len .Comments}}</i>
{{end}}
</td>
-->
<td class="tr-links home-td">
<a href="{{.Magnet}}" title="{{ call $.T "magnet_link" }}">
<div class="magnet-icon"></div>
@ -227,7 +228,7 @@ Your browser does not support the audio element.
<!-- JS Template for torrents ajax -->
<script type="text/javascript">
Templates.Add("torrents.item", function(torrent) {
return "<tr class=\"torrent-info"+ ((torrent.status == 2) ? " remake" : ((torrent.status == 3) ? " trusted" : ((torrent.status == 3) ? " aplus" : "" )))+"\">"+
return "<tr id=\"torrent_" + torrent.id + "\" class=\"torrent-info"+ ((torrent.status == 2) ? " remake" : ((torrent.status == 3) ? " trusted" : ((torrent.status == 3) ? " aplus" : "" )))+"\">"+
{{ if HasAdmin $.User }}
"<td class=\"tr-cb\""+ ((TorrentsMod.enabled) ? "style=\"display:table-cell;\"" : "") +">"+
"<input data-name=\""+Templates.EncodeEntities(torrent.name)+"\" type=\"checkbox\" id=\"torrent_cb_"+torrent.id+"\" name=\"torrent_id\" value=\""+torrent.id+"\">"+
@ -243,6 +244,9 @@ Your browser does not support the audio element.
"</a>"+
"</td>"+
"<td class=\"tr-name home-td\"><a href=\"/view/"+torrent.id+"\">"+Templates.EncodeEntities(torrent.name) +"</a></td>"+
"<td class=\"tr-cs home-td hide-xs\">"+
((torrent.comments.length > 0) ? "<i class=\"comment-icon\" title=\"{{ call $.T "comments" }}\">" + torrent.comments.length + "</i>" : "")+
"</td>"+
"<td class=\"tr-links home-td\">"+
"<a href=\""+torrent.magnet +"\" title=\"{{ call $.T "magnet_link" }}\">"+
"<div class=\"magnet-icon\"></div>"+

Voir le fichier

@ -75,10 +75,10 @@
<b>{{ call $.T "report_type" }}:</b>
<form method="post" action="/report/{{$.Torrent.ID}}">
{{ block "csrf_field" $ }}{{end}}
<input type="radio" name="report_type" value="illegal" id="illegal" required> <label for="illegal">{{ call $.T "illegal_content" }}</label><br />
<input type="radio" name="report_type" value="spam" id="spam" required> <label for="spam">{{ call $.T "spam_garbage" }}</label><br />
<input type="radio" name="report_type" value="wrongcat" id="wrongcat" required> <label for="wrongcat">{{ call $.T "wrong_category" }}</label><br />
<input type="radio" name="report_type" value="dup" id="dup" required> <label for="dup">{{ call $.T "duplicate_deprecated" }}</label><br />
<input type="radio" name="report_type" value="illegal_content" id="illegal" required> <label for="illegal">{{ call $.T "illegal_content" }}</label><br />
<input type="radio" name="report_type" value="spam_garbage" id="spam" required> <label for="spam">{{ call $.T "spam_garbage" }}</label><br />
<input type="radio" name="report_type" value="wrong_category" id="wrongcat" required> <label for="wrongcat">{{ call $.T "wrong_category" }}</label><br />
<input type="radio" name="report_type" value="duplicate_deprecated" id="dup" required> <label for="dup">{{ call $.T "duplicate_deprecated" }}</label><br />
<button type="submit" class="btn btn-default">{{ call $.T "report_btn" }}</button>
</form> <br />
`;