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/admin/panelindex.html
akuma06 93364dac77 activity log for users (#1002)
List Torrent delete log
Torrent edit log
Comment delete log
And every other logged activities
Can be filtered out by a filter tag ("edit" or "delete" supported)
Pages navigation

Can be accessed by /activities

Added some translation string
Fixed hidden username on api request
Fixed comments username on modpanel
New Activity model
New Activity handler
New Activity Service
Fixed some updating issue for ES when moderating torrents

Be aware deleting torrents and comments return the model now!
2017-06-15 12:44:46 +10:00

107 lignes
4,7 Kio
HTML

{{define "title"}}{{ call $.T "moderation_overview" }}{{end}}
{{define "content"}}
<div class="results box">
<h3 id="torrents">{{ call $.T "last_torrents" }}</h3>
<table class="table">
<thead class="torrent-info">
<tr>
<th class="tr-name">{{ call $.T "name" }}</th>
<th class="tr-size">{{ call $.T "username" }}</th>
<th class="tr-size">{{ call $.T "actions" }}</th>
</tr>
</thead>
<tbody>
{{range .Torrents}}
<tr>
<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 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>
</table>
<nav class="adminNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_tlist" }}">More</a></li>
</ul>
</nav>
<hr />
<h3 id="torrents">{{ call $.T "last_reports" }}</h3>
<table class="table">
<thead class="torrent-info">
<tr>
<th class="tr-name">{{ call $.T "name" }}</th>
<th class="tr-size">{{ call $.T "username" }}</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 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-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>
</table>
<nav class="adminNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_trlist" }}">{{ call $.T "more" }}</a></li>
</ul>
</nav>
<hr />
<h3 id="users">{{ call $.T "last_users" }}</h3>
<table class="table">
<thead class="torrent-info">
<tr>
<th class="tr-name">{{ call $.T "username" }}</th>
<th class="tr-size">{{ call $.T "actions" }}</th>
</tr>
</thead>
<tbody>
{{range .Users}}
<tr>
<td class="tr-name home-td"><a href="{{ genRoute "user_profile_details" "id" (print .ID) "username" .Username }}">{{ .Username }}</a></td>
<td class="tr-size 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>
</table>
<nav class="adminNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_ulist" }}">{{ call $.T "more" }} </a></li>
</ul>
</nav>
<hr />
<h3 id="comments">{{ call $.T "last_comments" }}</h3>
<table class="table">
<thead class="torrent-info">
<tr>
<th class="tr-name">{{ call $.T "comments" }}</th>
<th class="tr-size">{{ call $.T "username" }}</th>
<th class="tr-size">{{ call $.T "actions" }}</th>
</tr>
</thead>
<tbody>
{{range .Comments}}
<tr>
<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}}">{{if .User }}{{ .User.Username }}{{else}}れんちょん{{end}}</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>
</table>
<nav class="adminNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_clist" }}">{{ call $.T "more" }}</a></li>
</ul>
</nav>
</div>
{{end}}