Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

New ModPanel Theme (#883)

* New ModPanel Theme

* Implemented the new @kipukun theme in ModPanel
* Added new translation string
* Fixed the toolbar in /mod/torrents

* Little fix on torrents report

* Remove double navigation

* Added a tag h1 for pages and new translation strings~

* fix warn message
Cette révision appartient à :
akuma06 2017-06-02 20:10:36 +02:00 révisé par GitHub
Parent 3afde2e3c1
révision bd7fe52273
11 fichiers modifiés avec 491 ajouts et 307 suppressions

Voir le fichier

@ -553,7 +553,7 @@ td.tr-le, .error-text { color: #E84C4C; }
width: 70%;
text-align: left;
}
div.profile-content.box > nav > ul > li {
div.profile-content.box > nav > ul > li, nav.adminNav > ul > li {
border-right-width: 1px;
}
.magnet-icon {
@ -741,7 +741,7 @@ input.filelist-checkbox:checked + table.table-filelist {
.modtools span.btn-group {
margin-left: 20px;
}
.modtools .cb_action {
.modtools .cb_action, .toolbar .cb_action {
height: 100%;
}
/* Modal box */
@ -920,8 +920,47 @@ input.filelist-checkbox:checked + table.table-filelist {
.logs_mess div.error {
color: #893636;
}
.error-text, .success-text {
text-align: center;
}
.header-admin {
height: 120px;
}
.float-right {
float:right;
}
.header-admin .user-menu {
width: 155px!important;
z-index: 10;
}
#content.content-admin {
top:130px;
}
#content.content-admin .tr-cb {
display: table-cell;
}
.tr-actions .form-input{
display: inline-block;
}
.tr-actions {
width: 130px;
}
.toolbar {
height: 40px;
padding: 5px;
text-align: left;
}
.toolbar > div.float-right {
margin-top: 5px;
}

Voir le fichier

@ -1,26 +1,27 @@
{{define "title"}}Comments List{{end}}
{{define "title"}}{{ call $.T "comments_list" }}{{end}}
{{define "content"}}
<table class="table">
<tr>
<th class="col-xs-10">Content</th>
<th class="col-xs-1">Torrent</th>
<th class="col-xs-1">User</th>
<th class="col-xs-1">Action</th>
</tr>
{{ range .Models}}
<tr>
<!-- TODO: add href="{{ genRoute "mod_cedit" }}?id={{.ID}}" for comment editing -->
<td><a>{{ .Content }}</a></td>
<td><a href="{{ genViewTorrentRoute .TorrentID }}">{{ .TorrentID }}</a></td>
<td>{{ .UserID }}</td>
<td><a href="{{ genRoute "mod_cdelete" }}?id={{.ID}}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete" }}</a></td></tr>
{{end}}
</table>
<nav class="torrentNav" aria-label="Page navigation">
<ul class="pagination">
{{ genNav .Navigation .URL 5 }}
</ul>
</nav>
<div class="results box">
<h1>{{ call $.T "comments_list" }}</h1>
<table class="table">
<thead class="torrent-info">
<tr>
<th class="tr-name">{{ call $.T "comments" }}</th>
<th class="tr-size">{{ call $.T "torrents" }}</th>
<th class="tr-size">{{ call $.T "username" }}</th>
<th class="tr-actions">{{ call $.T "actions" }}</th>
</tr>
</thead>
<tbody>
{{ 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-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>
</tr>
{{end}}
</tbody>
</table>
</div>
{{end}}

Voir le fichier

@ -1,92 +1,105 @@
{{define "title"}}Moderation Overview{{end}}
{{define "title"}}{{ call $.T "moderation_overview" }}{{end}}
{{define "content"}}
<h3 id="torrents">Last Torrents</h3>
<div class="results box">
<h3 id="torrents">{{ call $.T "last_torrents" }}</h3>
<table class="table">
<tr>
<th class="col-xs-10">Torrent Name</th>
<th class="col-xs-1">Uploader</th>
<th class="col-xs-1">Action</th>
</tr>
{{range .Torrents}}
<tr>
<td><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> (<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}">Edit</a>)</td>
<td><a href="{{ genRoute "mod_tlist" }}?userID={{.UploaderID}}">{{ .UploaderID }}</a></td>
<td><a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
<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"><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-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>
</tr>
{{end}}
</tbody>
</table>
<nav class="torrentNav" aria-label="Page navigation">
<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">Last Torrents Reports</h3>
<h3 id="torrents">{{ call $.T "last_reports" }}</h3>
<table class="table">
<tr>
<th class="col-xs-9">Torrent Name</th>
<th class="col-xs-1">User</th>
<th class="col-xs-1">Reason</th>
<th class="col-xs-1">Action</th>
</tr>
{{range .TorrentReports}}
<tr>
<td><a href="{{ genRoute "view_torrent" "id" (print .Torrent.ID ) }}">{{ .Torrent.Name }}</a> (<a href="{{ genRoute "mod_tedit" }}?id={{ print .Torrent.ID}}">Edit</a>)</td>
<td>{{.User.Username}}</td>
<td>{{.Description}}</td>
<td><a href="{{ genRoute "mod_trdelete" }}?id={{ print .ID }}" class="btn btn-danger btn-lg"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
<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 "reason" }}</th>
<th class="tr-size">{{ 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-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>
</tr>
{{end}}
</tbody>
</table>
<nav class="torrentNav" aria-label="Page navigation">
<nav class="adminNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_trlist" }}">More</a></li>
<li><a href="{{ genRoute "mod_trlist" }}">{{ call $.T "more" }}</a></li>
</ul>
</nav>
<hr />
<h3 id="users">Last Users</h3>
<h3 id="users">{{ call $.T "last_users" }}</h3>
<table class="table">
<tr>
<th class="col-xs-11">Username</th>
<th class="col-xs-1">Action</th>
</tr>
{{range .Users}}
<tr>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
<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"><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>
</tr>
{{end}}
</tbody>
</table>
<nav class="torrentNav" aria-label="Page navigation">
<nav class="adminNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_ulist" }}">More </a></li>
<li><a href="{{ genRoute "mod_ulist" }}">{{ call $.T "more" }} </a></li>
</ul>
</nav>
<hr />
<h3 id="comments">Last Comments</h3>
<h3 id="comments">{{ call $.T "last_comments" }}</h3>
<table class="table">
<tr>
<th class="col-xs-10">Content</th>
<th class="col-xs-1">User</th>
<th class="col-xs-1">Action</th>
</tr>
{{range .Comments}}
<tr>
<td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</a></td>
<td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{.UserID}}</a></td>
<td><a href="{{ genRoute "mod_cdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete" }}</a></td>
</tr>
{{end}}
<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"><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>
</tr>
{{end}}
</tbody>
</table>
<nav class="torrentNav" aria-label="Page navigation">
<nav class="adminNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_clist" }}">More</a></li>
<li><a href="{{ genRoute "mod_clist" }}">{{ call $.T "more" }}</a></li>
</ul>
</nav>
</div>
{{end}}

Voir le fichier

@ -1,5 +1,7 @@
{{define "title"}}Torrent Edit Panel{{end}}
{{define "title"}}{{ call $.T "torrent_edit_panel" }}{{end}}
{{define "content"}}
<div class="results box">
<h3 id="torrents">{{ call $.T "torrent_edit_panel" }}</h3>
{{with .Form}}
<form enctype="multipart/form-data" role="upload" method="POST">
{{ block "csrf_field" $ }}{{end}}
@ -49,5 +51,6 @@
</div>
<button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
</form>
</div>
{{end}}
{{end}}

Voir le fichier

@ -1,33 +1,36 @@
{{define "title"}}Torrent Reassign{{end}}
{{define "title"}}{{ call $.T "torrent_reassign" }}{{end}}
{{define "content"}}
<form enctype="multipart/form-data" method="POST">
<div class="results box">
<h1>{{ call $.T "torrent_reassign" }}</h1>
<form enctype="multipart/form-data" method="POST">
{{ block "csrf_field" $ }}{{end}}
{{ range (index $.FormInfos "infos")}}
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
<p class="success-text"> {{ . }}</p>
{{end}}
{{ range (index $.FormErrors "errors")}}
<div class="alert alert-danger"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-exclamation-sign"></i> {{ . }}</div>
<p class="error-text">{{ . }}</p>
{{end}}
<p>Reassigning torrents to a new user is not easily reverted and should be done with care.</p>
<p>{{ call $.T "reassign_warning" }}</p>
{{with .Form}}
<div class="form-group">
<label for="to">Reassign to:</label>
<input type="text" name="to" class="form-control" placeholder="User ID" {{if ne .AssignTo 0}}value="{{.AssignTo}}"{{end}} required>
<label for="to">{{ call $.T "reassign_to" }}</label>
<input type="text" name="to" class="form-control" placeholder="{{ call $.T "user_id" }}" {{if ne .AssignTo 0}}value="{{.AssignTo}}"{{end}} required>
</div>
<div class="form-group">
<label for="by">Reassign based on:</label><br />
<input type="radio" name="by" value="olduser" {{if eq .By "olduser"}}checked{{end}} required> Old Username<br />
<input type="radio" name="by" value="torrentid" {{if eq .By "torrentid"}}checked{{end}} required> Torrent ID
<label for="by">{{ call $.T "reassign_based_on" }}</label><br />
<input type="radio" name="by" value="olduser" {{if eq .By "olduser"}}checked{{end}} required> {{ call $.T "previous_username" }}<br />
<input type="radio" name="by" value="torrentid" {{if eq .By "torrentid"}}checked{{end}} required> {{ call $.T "torrent_id" }}
</div>
<div class="form-group">
<p>One ID per line <b>or</b> a single username</p>
<p>{{call $.T "reassign_indication"}}</p>
<textarea rows="20" cols="40" name="data">{{.Data}}</textarea>
</div>
{{end}}
<p>Might take a long time, do <b>NOT</b> abort the request.</p>
<p>{{ call $.T "reassign_warning_2" }}</p>
<button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
</form>
</div>
{{end}}

Voir le fichier

@ -1,21 +1,28 @@
{{define "title"}}Torrents Report{{end}}
{{define "title"}}{{ call $.T "reports_list" }}{{end}}
{{define "content"}}
<table class="table">
<tr>
<th class="col-xs-8">Torrent Name</th>
<th class="col-xs-1">User</th>
<th class="col-xs-1">Reason</th>
<th class="col-xs-1">Action</th>
</tr>
{{range .Models}}
<tr>
<td><a href="{{ genRoute "view_torrent" "id" (print .Torrent.ID) }}">{{ .Torrent.Name }}</a> (<a href="{{ genRoute "mod_tedit" }}?id={{ print .Torrent.ID}}">Edit</a>)</td>
<td>{{.User.Username}}</td>
<td>{{.Description}}</td>
<td><a href="{{ genRoute "mod_tdelete" }}?id={{ print .Torrent.ID }}" onclick="if (!confirm('Are you sure?')) return false;">Delete</a><br />
<a href="{{ genRoute "mod_trdelete" }}?id={{ print .ID }}">Delete Report</a></td>
</tr>
{{end}}
</table>
<div class="results box">
<h1>{{ call $.T "reports_list" }}</h1>
<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 "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-size home-td">{{.User.Username}}</td>
<td class="tr-size home-td">{{.Description}}</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>
</tr>
{{end}}
</tbody>
</table>
</div>
{{end}}

Voir le fichier

@ -1,84 +1,79 @@
{{define "title"}}Torrents List{{end}}
{{define "contclass"}}cont-view{{end}}
{{define "title"}}{{ call $.T "torrents_list" }}{{end}}
{{define "content"}}
<div class="blockBody">
<form method="post" action="">
<div class="results box">
<h1>{{ call $.T "torrents_list" }}</h1>
<form method="post" action="">
{{ block "csrf_field" $ }}{{end}}
{{ range (index $.Infos "infos")}}
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
<p class="success-text">{{ . }}</p>
{{end}}
{{ range (index $.Errors "errors")}}
<div class="alert alert-danger"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-exclamation-sign"></i> {{ . }}</div>
<p class="error-text">{{ . }}</p>
{{end}}
<nav class="navbar navbar-default">
<div class="navbar-form">
<div class="form-group">
<select class="form-control" name="action">
<option value="">Action...</option>
<option value="status">Change Status</option>
<option value="delete">Delete</option>
<div class="toolbar">
<select class="cb_action" name="action">
<option value="">{{ call $.T "action_select" }}</option>
<option value="status">{{ call $.T "change_status" }}</option>
<option value="delete">{{ call $.T "delete" }}</option>
</select>
<select class="form-control" style="display: none;" name="status">
<option value="">To...</option>
<select class="cb_action" style="display: none;" name="status">
<option value="">{{ call $.T "to_status" }}</option>
<option value="5">{{call $.T "torrent_status_blocked"}}</option>
<option value="0">{{call $.T "torrent_status_hidden"}}</option>
<option value="1">{{call $.T "torrent_status_normal"}}</option>
<option value="2">{{call $.T "torrent_status_remake"}}</option>
<option value="3">{{call $.T "trusted"}}</option>
<option value="4">A+</option>
</select>
<input type="submit" class="form-input" value="Apply">
<input type="reset" class="form-input" value="Reset">
<div class="float-right">
<a href="{{genRoute "mod_tlist" }}" class="form-input">{{ call $.T "torrents_not_deleted" }}</a>
<a href="{{genRoute "mod_tlist_deleted" }}" class="form-input">{{ call $.T "torrents_deleted" }}</a>
</div>
<input type="submit" class="btn btn-success" value="Apply">
<input type="reset" class="btn btn-danger" value="Reset">
<div class="pull-right">
<a href="{{genRoute "mod_tlist" }}" class="btn btn-success">Not Deleted</a>
<a href="{{genRoute "mod_tlist_deleted" }}" class="btn btn-danger">Deleted</a>
</div>
</div>
</nav>
<div class="table-responsive">
<table class="table table-hover">
<tr>
<th style="width:12px;"><input type="checkbox" name="checkall" data-selectall="checkbox"></th>
<th>Torrent Name</th>
<th>Uploader</th>
<th>Action</th>
</tr>
</div>
<table class="table">
<thead class="torrent-info">
<tr>
<th class="tr-cb"><input type="checkbox" name="checkall" data-selectall="checkbox"></th>
<th class="tr-name">{{ call $.T "name" }}</th>
<th class="tr-size">{{ call $.T "uploaded_by" }}</th>
<th class="tr-actions">{{ call $.T "actions" }}</th>
</tr>
</thead>
<tbody>
{{ range .Models}}
<tr>
<td><input type="checkbox" name="torrent_id" value="{{.ID }}"></td>
<td><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> {{ if not .IsDeleted }}(<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}">{{ call $.T "edit"}}</a>){{end}}</td>
<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>
<a href="{{ genRoute "mod_tblock" }}?id={{ .ID }}" class="btn btn-danger" onclick="if (!confirm('{{ call $.T "are_you_sure"}}')) return false;">{{ if .IsBlocked }}{{ call $.T "torrent_unblock" }}{{else}}{{ call $.T "torrent_block" }}{{end}}</a>
<td class="tr-cb"><input type="checkbox" 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}}">{{ 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>
{{ if .IsDeleted }}
<a href="{{ genRoute "mod_tdelete" }}?definitely&id={{ .ID }}" class="btn btn-danger" onclick="if (!confirm('{{ call $.T "are_you_sure"}} {{ call $.T "delete_definitely_torrent_warning"}}')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete_definitely" }}</a>
<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>
{{ else }}
<a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="btn btn-danger" onclick="if (!confirm('{{ call $.T "are_you_sure"}}')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete" }}</a>
<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>
{{ end }}
</td>
</tr>
{{end}}
</table>
</div>
</tbody>
</table>
</form>
<nav class="torrentNav" aria-label="Page navigation">
<ul class="pagination">
{{ genNav .Navigation .URL 5 }}
</ul>
</nav>
</div>
{{end}}
{{ define "js_footer"}}
{{ define "footer_js"}}
<!-- JS Function for selecting multiple checkboxes -->
<script type="text/javascript" src="{{ .URL.Parse "/js/selectAll.js" }}"></script>
<script type="text/javascript">
$("select[name='action']").on("change", function(e) {
if ($(this).val() == "move")
$(this).siblings("select[name='moveto']").show()
else
$(this).siblings("select[name='moveto']").hide()
});
document.addEventListener("DOMContentLoaded", function() {
document.querySelector("select[name='action']").addEventListener("change", function(e) {
var el = e.target;
if (el.value == "status")
document.querySelector("select[name='status']").style.display = "inline"
else
document.querySelector("select[name='status']").style.display = "none"
console.log(el.value);
});
});
</script>
{{end}}

Voir le fichier

@ -1,22 +1,22 @@
{{define "title"}}Users List{{end}}
{{define "title"}}{{ call $.T "users_list" }}{{end}}
{{define "content"}}
<table class="table">
<tr>
<th class="col-xs-11">Username</th>
<th class="col-xs-1">Action</th>
</tr>
{{ range .Models}}
<tr>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<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('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ call $.T "delete" }}</a>{{end}}</td>
</tr>
{{end}}
</table>
<nav class="torrentNav" aria-label="Page navigation">
<ul class="pagination">
{{ genNav .Navigation .URL 5 }}
</ul>
</nav>
<div class="results box">
<h1>{{ call $.T "users_list" }}</h1>
<table class="table">
<thead class="torrent-info">
<tr>
<th class="tr-name">{{ call $.T "username" }}</th>
<th class="tr-actions">{{ call $.T "actions" }}</th>
</tr>
</thead>
<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>
</tr>
{{end}}
</tbody>
</table>
</div>
{{end}}

Voir le fichier

@ -1,90 +1,98 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{{if Sukebei}}Sukebei{{else}}Nyaa{{end}} Pantsu - {{block "title" .}}{{ call $.T "error_404" }}{{end}}</title>
<link rel="icon" type="image/png" href="/img/favicon.png?v=3" />
<!-- RSS Feed with Context -->
<!-- Bootstrap -->
<!-- Latest compiled and minified CSS -->
<!-- This should come before website CSS because it can f3ck up the website completely.. Use !important as a workaround -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Bootstrap -->
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Website CSS -->
<link rel="stylesheet" id="style" href="{{.URL.Parse "/css/style.css"}}">
{{block "night_theme_init" .}}{{end}}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="torrents, pantsu, anime, manga, sukebei, nyaapassu, horriblesubs, nyaa, hentai, dlsite">
<meta name="description" content='The leading open-source community-based nyaa.se successor, suitable for all anime and manga needs. にゃんぱす~!'>
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{{if Sukebei}}Sukebei{{else}}Nyaa{{end}} Pantsu - {{block "title" .}}{{ call $.T "error_404" }}{{end}}</title>
<!-- Flavicons and icons -->
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="shortcut icon" type="image/png" href="/img/favicon.png">
<!-- SMO -->
<meta property="og:site_name" content="Nyaa Pantsu">
<meta property="og:site_name" content="{{if Sukebei}}Sukebei{{else}}Nyaa{{end}} Pantsu - {{template "title" .}}{{ call $.T "error_404" }}">
<meta property="og:image" content="/img/favicon.png">
<meta property="og:description" content="Nyaa Pantsu Homepage">
<!-- RSS Feed with Context -->
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{block "rsstitle" .}}Last torrents{{end}} RSS Feed" href="{{ block "rss_link" . }}{{ genRouteWithQuery "feed" .URL }}{{end}}" />
<!-- do NOT move -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<!-- Base theme -->
<link rel="stylesheet" id="style" href="{{.URL.Parse "/css/main.css"}}?v={{ .Config.Version }}">
<!-- User selected theme, if any, defaults to /g/ -->
{{if eq $.Theme ""}}
<link rel="stylesheet" id="theme" href="/css/g.css?v={{ .Config.Version }}">
{{else}}
<link rel="stylesheet" id="theme" href="/css/{{$.Theme}}.css?v={{ .Config.Version }}">
{{end}}
<!-- Search Box for Google -->
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","url":"https://nyaa.pantsu.cat/","potentialAction":{"@type":"SearchAction","target":"https://nyaa.pantsu.cat/search?q={search_term_string}","query-input":"required name=search_term_string"}}</script>
{{ block "additional_header" .}}{{end}}
</head>
<body>
<nav class="navbar navbar-default" id="mainmenu">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">{{ call $.T "toggle_navigation" }}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ genRoute "mod_index" }}">Nyaa Pantsu Moderation</a>
<a class="navbar-brand hidden-md pull-right nightswitch" href="javascript:toggleNightMode();" ></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="{{.URL.Parse "/"}}">{{call $.T "Nyaa Pantsu"}}</a></li>
<li><a href="{{ genRoute "mod_tlist"}}">{{call $.T "Torrents"}}</a></li>
<li><a href="{{ genRoute "mod_ulist"}}">{{call $.T "Users"}}</a></li>
<li><a href="{{ genRoute "mod_clist"}}">{{call $.T "Comments"}}</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Other<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ genRoute "mod_trlist"}}">{{call $.T "Torrent Reports"}}</a></li>
<li><a href="{{ genRoute "mod_treassign" }}">Torrent Reassign</a></li>
</ul>
</li>
</ul>
{{block "badge_user" .}}{{end}}
</div>
</div>
</nav>
<div style="padding-top: 10rem"></div>
<div class="container" id="container">
<form class="navbar-form navbar-right" role="search" action="{{ genRoute "mod_tlist" }}" method="get">
{{ block "csrf_field" $ }}{{end}}
<div class="form-group">
<body {{if Sukebei}}class="sukebei"{{end}}>
<nav id="header" class="header header-admin">
<div class="container">
<div>
<div class="h-logo">
<a href="{{ genRoute "mod_index" }}"><img class="hide-md" src="/img/{{if Sukebei}}sukebei_logo.png{{else}}logo.png{{end}}" alt="NyaaPantsu"><img class="visible-md" src="/img/logo_s.png"/></a>
</div>
<div class="h-nav">
<a href="{{.URL.Parse "/"}}" class="nav-btn">{{call $.T "Nyaa Pantsu"}}</a>
<a href="{{ genRoute "mod_tlist"}}" class="nav-btn">{{call $.T "Torrents"}}</a>
<a href="{{ genRoute "mod_ulist"}}" class="nav-btn">{{call $.T "Users"}}</a>
<a href="{{ genRoute "mod_clist"}}" class="nav-btn">{{call $.T "Comments"}}</a>
<a href="{{ genRoute "mod_trlist"}}" class="nav-btn">{{call $.T "Torrent Reports"}}</a>
<a href="{{ genRoute "mod_treassign" }}" class="nav-btn">Torrent Reassign</a>
</div>
</div>
<div class="h-right">
{{block "badge_user" .}}{{end}}
</div>
<div class="float-right">
<div class="h-search">
<form role="search" action="{{ genRoute "mod_tlist" }}" method="get">
{{block "search_common" .}}{{end}}
</div>
<div class="form-group">
{{block "search_button" .}}{{end}}
</div>
</form>
<div style="clear: both;"></div>
{{block "content" .}}{{end}}
</div>
<footer style="text-align: center; padding-bottom: 2rem;font-size: 2rem;font-family: cursive; color: #616161;text-shadow: -1px -1px #999999;">
Powered by NyaaPantsu
</footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js" integrity="sha384-nvAa0+6Qg9clwYCGGPpDQLVpLNn0fRaROjHqs13t4Ggj3Ez50XnGQqc/r8MhnRDZ" crossorigin="anonymous"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/main.js"}}"></script>
{{block "js_footer" .}}{{end}}
</body>
</html>
</form>
</div>
</div>
</div>
</nav>
<div id="content" class="content-admin">
<div class="content container center">
{{block "content" .}}{{call $.T "nothing_here"}}{{end}}
</div>
{{if ne .Mascot "hide"}}
<div id="mascot" class="hide-xs" onclick="playVoice();"></div>
{{ if eq .Theme "tomorrow" }}
<audio id="explosion" hidden preload="none">
<source src="https://megumin.love/sounds/explosion.mp3" type="audio/mpeg">
</audio>
{{ else }}
<audio id="nyanpassu" hidden preload="none">
<source src="https://a.doko.moe/sewang.mp3" type="audio/mpeg">
</audio>
{{end}}
{{end}}
<div class="pagination">
{{ genNav .Navigation .URL 15 }}
</div>
<footer id="footer">
<div class="container footer center">
<div class="footer-opt">
<p><a href="/settings">{{ call $.T "change_settings" }}</a></p>
</div>
<span><i>Powered by <a href="#">NyaaPantsu</a> v{{ .Config.Version }}{{ .Config.Build }}</i></span>
</div>
</footer>
</div>
<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/main.js"}}?v={{ .Config.Version }}" async></script>
{{ block "footer_js" .}}{{end}}
</body>
</html>

Voir le fichier

@ -2,25 +2,25 @@
<html lang="{{ call $.T "language_code" }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="torrents, pantsu, anime, manga, sukebei, nyaapassu, horriblesubs, nyaa, hentai, dlsite">
<meta name="description" content='The leading open-source community-based nyaa.se successor, suitable for all anime and manga needs. にゃんぱす~!'>
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{{if Sukebei}}Sukebei{{else}}Nyaa{{end}} Pantsu - {{block "title" .}}{{ call $.T "error_404" }}{{end}}</title>
<!-- Flavicons and icons -->
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="shortcut icon" type="image/png" href="/img/favicon.png">
<!-- SMO -->
<meta property="og:site_name" content="Nyaa Pantsu">
<meta property="og:site_name" content="{{if Sukebei}}Sukebei{{else}}Nyaa{{end}} Pantsu - {{template "title" .}}{{ call $.T "error_404" }}">
<meta property="og:image" content="/img/favicon.png">
<meta property="og:description" content="Nyaa Pantsu Homepage">
<!-- RSS Feed with Context -->
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{block "rsstitle" .}}Last torrents{{end}} RSS Feed" href="{{ block "rss_link" . }}{{ genRouteWithQuery "feed" .URL }}{{end}}" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="torrents, pantsu, anime, manga, sukebei, nyaapassu, horriblesubs, nyaa, hentai, dlsite">
<meta name="description" content='The leading open-source community-based nyaa.se successor, suitable for all anime and manga needs. にゃんぱす~!'>
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{{if Sukebei}}Sukebei{{else}}Nyaa{{end}} Pantsu - {{block "title" .}}{{ call $.T "error_404" }}{{end}}</title>
<!-- Flavicons and icons -->
<link rel="icon" type="image/png" href="/img/favicon.png" />
<link rel="shortcut icon" type="image/png" href="/img/favicon.png">
<!-- SMO -->
<meta property="og:site_name" content="Nyaa Pantsu">
<meta property="og:site_name" content="{{if Sukebei}}Sukebei{{else}}Nyaa{{end}} Pantsu - {{template "title" .}}{{ call $.T "error_404" }}">
<meta property="og:image" content="/img/favicon.png">
<meta property="og:description" content="Nyaa Pantsu Homepage">
<!-- RSS Feed with Context -->
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{block "rsstitle" .}}Last torrents{{end}} RSS Feed" href="{{ block "rss_link" . }}{{ genRouteWithQuery "feed" .URL }}{{end}}" />
<!-- do NOT move -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
<!-- Base theme -->
@ -84,16 +84,15 @@
{{ genNav .Navigation .URL 15 }}
</div>
<footer id="footer">
<div class="container footer center">
<div class="footer-opt">
<p><a href="/settings">{{ call $.T "change_settings" }}</a></p>
</div>
<span><i>Powered by <a href="#">NyaaPantsu</a> v{{ .Config.Version }}{{ .Config.Build }}</i></span>
</div>
<div class="container footer center">
<div class="footer-opt">
<p><a href="/settings">{{ call $.T "change_settings" }}</a></p>
</div>
<span><i>Powered by <a href="#">NyaaPantsu</a> v{{ .Config.Version }}{{ .Config.Build }}</i></span>
</div>
</footer>
</div>
<script type="text/javascript" charset="utf-8" src="{{.URL.Parse "/js/main.js"}}?v={{ .Config.Version }}" async></script>
{{ block "footer_js" .}}{{end}}
</body>
</html>
</html>

Voir le fichier

@ -875,6 +875,18 @@
"id": "torrent_deleted",
"translation": "Torrent %s deleted!"
},
{
"id": "torrents_deleted",
"translation": "Torrents Deleted"
},
{
"id": "delete_torrent",
"translation": "Delete Torrent"
},
{
"id": "delete_report",
"translation": "Delete Report"
},
{
"id": "no_action_exist",
"translation": "No such action %s exist!"
@ -1102,5 +1114,109 @@
{
"id": "query_nb",
"translation": "Query #{0}"
},
{
"id": "reason",
"translation": "Reason"
},
{
"id": "actions",
"translation": "Actions"
},
{
"id": "action_select",
"translation": "Action..."
},
{
"id": "change_status",
"translation": "Change Status"
},
{
"id": "to_status",
"translation": "To..."
},
{
"id": "torrents_not_deleted",
"translation": "Torrents Not Deleted"
},
{
"id": "more",
"translation": "More"
},
{
"id": "last_comments",
"translation": "Last Comments"
},
{
"id": "last_reports",
"translation": "Last Reports"
},
{
"id": "last_torrents",
"translation": "Last Torrents"
},
{
"id": "last_users",
"translation": "Last Users"
},
{
"id": "moderation_overview",
"translation": "Moderation Overview"
},
{
"id": "users_list",
"translation": "Users List"
},
{
"id": "comments_list",
"translation": "Comments List"
},
{
"id": "reports_list",
"translation": "Reports List"
},
{
"id": "torrents_list",
"translation": "Torrents List"
},
{
"id": "torrent_edit_panel",
"translation": "Torrent Edit Panel"
},
{
"id": "torrent_reassign",
"translation": "Torrent Reassign"
},
{
"id": "reassign_warning",
"translation": "Reassigning torrents to a new user is not easily reverted and should be done with care."
},
{
"id": "previous_username",
"translation": "Previous Username"
},
{
"id": "torrent_id",
"translation": "Torrent ID"
},
{
"id": "reassign_indication",
"translation": "One ID per line <b>or</b> a single username"
},
{
"id": "reassign_warning_2",
"translation": "Might take a long time, do <b>NOT</b> abort the request."
},
{
"id":"reassign_to",
"translation": "Reassign to:"
},
{
"id": "reassign_based_on",
"translation": "Reassign based on:"
},
{
"id": "user_id",
"translation": "User ID"
}
]