* Fix "torrent is being generated" message showing up even when the torrent couldn't be generated * Add janitor user status * Remove usage of deprecated HasAdmin() function * Give Janitors access to mod panel * Stop using deprecated HasAdmin() function * Stop using deprecated HasAdmin() function * Update edit.go * Update profile.go * Rollback bad changes, remove redundant email check and stop using deprecated function * Show every userstatus (member, janitor, banned, mod) in comments * Return empty status if anonymous * Show no userstatus for anonymous profile * Show moderation link to janitors too * Stop using deprecated HasAdmin() function * Stop using deprecated HasAdmin() function * Stop using deprecated HasAdmin() function * Add Janitor to userstatus select in user edit * "Janitor" translation string * didnt mean to commit this change * rollback wrongfully comitted changes * rollback commit * Update CHANGELOG.md * Fix wrong id for translation * remove deprecated HasAdmin() function again * change name of variable used in comment loop for clarity purposes * visual cue for locked torrents in torrent listing for admins * add visual cues for hidden torrents in admin torrent listing * Dont show delete buttons for janitors * janitor cannot delete torrents * show block/unblock button in torrent list for janitors instead of delete button * fix function that didnt get executed * add ban buttons on userlist & visual cue for banned users * Fix "user successfully deleted" message showing even if user wasnt deleted * Add "ban" button, no "delete" button for jantiors * add "unban" and "ban" translation strings * add "unban" and "ban" translation strings * different <form> for ban button * Update index.jet.html * add userprofile ban route * add toggleBan() function, janitors dont need captcha either * fix panic error when deleting an anonymous comment * add user_banned_by and user_unbanned_by * add user_banned_by and user_unbanned_by * Make ToggleBan() return whether or not the user is now banned * Add handler for /ban route * change log filter * hide locked torrents from regular users * hide locked torrents from regular users * hide locked torrent from api search for regular users * change function to CurrentOrJanitor * change function to currentorjanitor * change function to currentorjanitor * add CurrentOrJanitor function * fix extra ( * fix extra ) and wrong variable name * Fix wrong value for janitor user status * Fix user edit that did not work because of "unique constraint user.emails" error * only immediately visually update user if user has been updated successfully * use FindAllForAdminsOrderBy in order to preload users * create FindAllForAdminsOrderBy that preloads users * Show username instead of ID in Uploader column in admin panel * Fix userprofile buttons overflowing at some specific resolutions * Mods can set users as janitors * Show ban/unban buttons on userprofile for janitors * Identical styling for usermenu links and buttons * dont show ban buttons on other staff * add ban message through get parameter * make toggleBan() trigger user update * Add "user_banned" and "user_unbanned" * add "user_banned" and "user_unbanned" * Visual cue for banned user * banned users can still log in * visual cue for banned user in badgemenu * locked status if banned user on upload * banned users cannot comment * Put "banned" text between () * add GetCategoryName() to template_test * add GetCategoryName() that returns full category name from full category string * Show search content in page title if it exists, or search category if it exists, otherwise shows "Home" * error message when user uploads an torrent & is banned * add torrent_uploaded_locked * add torrent_uploaded_locked * fix delete definitely button that never appeared * Show delete definitely button on admin panel index * admins can undelete a torrent by editing it's status * Trigger ViewHandler() directly instead of redirecting * Render the template directly instead of triggering torrent view handler * bigger usermenu buttons once responsive design kicks in * make btn-* class non-bold * Responsive notification page * visual cue for locked torrents in torrent listing * Update search.go * Update search.go * Update api.go * Update helpers.go * Update template.go * Update torrentParam.go * remove "hidden" class * Update search.go * fix an html error * Add files via upload * Update admin.jet.html * Update index.go * Update index.go * Update router.go * Update torrentParam_test.go * Update torrentParam_test.go * fix extra " * fix bad copypaste * Update CHANGELOG.md * Update guidelines.jet.html * Update CHANGELOG.md * add Guidelines and Moderation Guidelines * fix missing commas * Update torrentlist.jet.html * Update find.go * Update stats.go * Update view.jet.html * Update index.jet.html
155 lignes
5,9 Kio
HTML
155 lignes
5,9 Kio
HTML
{{ extends "layouts/index_admin" }}
|
|
{{ import "layouts/partials/helpers/csrf" }}
|
|
{{ block title()}}{{ T("moderation_overview") }}{{end}}
|
|
{{ block content_body()}}
|
|
<div class="results box">
|
|
<h3 id="torrents">{{ T("last_torrents") }}</h3>
|
|
<table class="table">
|
|
<thead class="torrent-info">
|
|
<tr>
|
|
<th class="tr-name">{{ T("name") }}</th>
|
|
<th class="tr-actions">{{ T("username") }}</th>
|
|
<th class="tr-actions">{{ T("actions") }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range Torrents}}
|
|
<tr {{ if .IsBlocked() }}class="locked"{{end}}>
|
|
<td class="tr-name home-td">
|
|
<a href="/view/{{.ID }}">{{ .Name }}</a>
|
|
<a href="/mod/torrent?id={{.ID}}" class="form-input btn-blue float-right">{{ T("edit") }}</a>
|
|
</td>
|
|
<td class="tr-size home-td">
|
|
<a href="/mod/torrents?userID={{.UploaderID}}">{{ if .Uploader }}{{.Uploader.Username }}{{else}}れんちょん{{end}}</a>
|
|
</td>
|
|
<td class="tr-size home-td">
|
|
{{ if User.IsModerator() }}
|
|
<form method="POST" action="/mod/torrent/delete" class="delete-form">
|
|
<input type="hidden" name="id" value="{{ .ID }}">
|
|
{{ if .IsDeleted() }}<input type="hidden" name="definitely" value="true">{{ end }}
|
|
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }} {{ if !.IsDeleted() }}{{ T("delete") }}{{else}}{{ T("delete_definitely_torrent_warning ")}}{{end}}')) return false;"><i class="icon-trash"></i>{{ if .IsDeleted() }}{{ T("delete_definitely") }}{{else}}{{ T("delete") }}{{end}}</button>
|
|
</form>
|
|
{{end}}
|
|
<form method="POST" action="/mod/torrent/block" class="delete-form">
|
|
<input type="hidden" name="id" value="{{ .ID }}">
|
|
<button type="submit" class="form-input btn-orange" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i>{{ if .IsBlocked() }}{{ T("torrent_unblock") }}{{else}}{{ T("torrent_block") }}{{end}}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
<nav class="adminNav" aria-label="Page navigation">
|
|
<a href="/mod/torrents">{{T("more")}}</a></li>
|
|
</ul>
|
|
</nav>
|
|
<hr />
|
|
|
|
<h3 id="torrents">{{ T("last_reports") }}</h3>
|
|
<table class="torrent-report-table">
|
|
<thead class="torrent-info">
|
|
<tr>
|
|
<th class="tr-name">{{ T("name") }}</th>
|
|
<th class="tr-actions">{{ T("username") }}</th>
|
|
<th class="tr-actions">{{ T("reason") }}</th>
|
|
<th class="td-report-message">{{ T("message") }}</th>
|
|
<th class="tr-actions">{{ T("actions") }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range TorrentReports}}
|
|
<tr>
|
|
<td class="tr-name home-td">
|
|
<a href="/view/{{.Torrent.ID }}">{{ .Torrent.Name }}</a>
|
|
<a href="/mod/torrent?id={{.Torrent.ID}}" class="form-input btn-blue float-right">{{ 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="td-report-message home-td">{{.Message}}</td>
|
|
<td class="tr-actions home-td">
|
|
<form method="POST" action="/mod/report/delete" >
|
|
<input type="hidden" name="id" value="{{ .ID }}">
|
|
<button type="submit" class="form-input btn-red"><i class="icon-trash"></i> {{ T("delete") }}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
<nav class="adminNav" aria-label="Page navigation">
|
|
<a href="/mod/reports">{{ T("more") }}</a>
|
|
</nav>
|
|
<hr />
|
|
<h3 id="users">{{ T("last_users") }}</h3>
|
|
<table class="table">
|
|
<thead class="torrent-info">
|
|
<tr>
|
|
<th class="tr-name">{{ T("username") }}</th>
|
|
<th class="tr-actions">{{ T("actions") }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range Users}}
|
|
<tr>
|
|
<td class="tr-name home-td">
|
|
<a href="/user/{{.ID}}/{{.Username }}">{{ .Username }}</a>
|
|
</td>
|
|
<td class="tr-size home-td">{{if .ID > 0}}
|
|
{{ if User.IsModerator() }}
|
|
<form method="POST" action="/user/{{.ID}}/{{.Username }}/delete" class="delete-form">
|
|
{{ yield csrf_field()}}
|
|
<button type="submit" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</button>
|
|
</form>
|
|
{{end}}
|
|
<form method="POST" action="/user/{{.ID}}/{{.Username }}/ban" class="delete-form">
|
|
{{ yield csrf_field()}}
|
|
<button type="submit" class="form-input btn-orange" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i>{{ if .IsBanned() }}{{ T("unban") }}{{else}}{{ T("ban") }}{{end}}</button>
|
|
</form>
|
|
{{end}}
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
<nav class="adminNav" aria-label="Page navigation">
|
|
<a href="/mod/users">{{ T("more") }} </a></li>
|
|
</ul>
|
|
</nav>
|
|
<hr />
|
|
<h3 id="comments">{{ T("last_comments") }}</h3>
|
|
<table class="table">
|
|
<thead class="torrent-info">
|
|
<tr>
|
|
<th class="tr-name">{{ T("comments") }}</th>
|
|
<th class="tr-actions">{{ T("username") }}</th>
|
|
<th class="tr-actions">{{ T("actions") }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{range Comments}}
|
|
<tr>
|
|
<td class="tr-name home-td">
|
|
<a href="/mod/comment?id={{.ID}}">{{ .Content }}</a>
|
|
</td>
|
|
<td class="tr-size home-td">
|
|
<a href="/mod/comment?id={{.ID}}">
|
|
{{if .User }}{{ .User.Username }}{{else}}れんちょん{{end}}
|
|
</a>
|
|
</td>
|
|
<td class="tr-size home-td">
|
|
<form method="POST" action="/mod/comment/delete">
|
|
<input type="hidden" name="id" value="{{ .ID }}">
|
|
<button type="submit" class="form-input btn-red"><i class="icon-trash"></i> {{ T("delete") }}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
<nav class="adminNav" aria-label="Page navigation">
|
|
<a href="/mod/comments">{{ T("more") }}</a></li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
{{end}}
|