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%; width: 70%;
text-align: left; 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; border-right-width: 1px;
} }
.magnet-icon { .magnet-icon {
@ -741,7 +741,7 @@ input.filelist-checkbox:checked + table.table-filelist {
.modtools span.btn-group { .modtools span.btn-group {
margin-left: 20px; margin-left: 20px;
} }
.modtools .cb_action { .modtools .cb_action, .toolbar .cb_action {
height: 100%; height: 100%;
} }
/* Modal box */ /* Modal box */
@ -920,8 +920,47 @@ input.filelist-checkbox:checked + table.table-filelist {
.logs_mess div.error { .logs_mess div.error {
color: #893636; color: #893636;
}
.error-text, .success-text { .error-text, .success-text {
text-align: center; 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"}} {{define "content"}}
<table class="table"> <div class="results box">
<tr> <h1>{{ call $.T "comments_list" }}</h1>
<th class="col-xs-10">Content</th> <table class="table">
<th class="col-xs-1">Torrent</th> <thead class="torrent-info">
<th class="col-xs-1">User</th> <tr>
<th class="col-xs-1">Action</th> <th class="tr-name">{{ call $.T "comments" }}</th>
</tr> <th class="tr-size">{{ call $.T "torrents" }}</th>
<th class="tr-size">{{ call $.T "username" }}</th>
{{ range .Models}} <th class="tr-actions">{{ call $.T "actions" }}</th>
</tr>
<tr> </thead>
<!-- TODO: add href="{{ genRoute "mod_cedit" }}?id={{.ID}}" for comment editing --> <tbody>
<td><a>{{ .Content }}</a></td> {{ range .Models}}
<td><a href="{{ genViewTorrentRoute .TorrentID }}">{{ .TorrentID }}</a></td> <tr>
<td>{{ .UserID }}</td> <!-- TODO: add href="{{ genRoute "mod_cedit" }}?id={{.ID}}" for comment editing -->
<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> <td class="tr-name"><a>{{ .Content }}</a></td>
{{end}} <td class="tr-size home-td"><a href="{{ genViewTorrentRoute .TorrentID }}">{{ .TorrentID }}</a></td>
</table> <td class="tr-size home-td">{{ .UserID }}</td>
<nav class="torrentNav" aria-label="Page navigation"> <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>
<ul class="pagination"> </tr>
{{ genNav .Navigation .URL 5 }} {{end}}
</ul> </tbody>
</nav> </table>
</div>
{{end}} {{end}}

Voir le fichier

@ -1,92 +1,105 @@
{{define "title"}}Moderation Overview{{end}} {{define "title"}}{{ call $.T "moderation_overview" }}{{end}}
{{define "content"}} {{define "content"}}
<h3 id="torrents">Last Torrents</h3> <div class="results box">
<h3 id="torrents">{{ call $.T "last_torrents" }}</h3>
<table class="table"> <table class="table">
<tr> <thead class="torrent-info">
<th class="col-xs-10">Torrent Name</th> <tr>
<th class="col-xs-1">Uploader</th> <th class="tr-name">{{ call $.T "name" }}</th>
<th class="col-xs-1">Action</th> <th class="tr-size">{{ call $.T "username" }}</th>
</tr> <th class="tr-size">{{ call $.T "actions" }}</th>
{{range .Torrents}} </tr>
<tr> </thead>
<td><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> (<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}">Edit</a>)</td> <tbody>
<td><a href="{{ genRoute "mod_tlist" }}?userID={{.UploaderID}}">{{ .UploaderID }}</a></td> {{range .Torrents}}
<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>
</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>
{{end}} <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> </table>
<nav class="torrentNav" aria-label="Page navigation"> <nav class="adminNav" aria-label="Page navigation">
<ul class="pagination"> <ul class="pagination">
<li><a href="{{ genRoute "mod_tlist" }}">More</a></li> <li><a href="{{ genRoute "mod_tlist" }}">More</a></li>
</ul> </ul>
</nav> </nav>
<hr /> <hr />
<h3 id="torrents">Last Torrents Reports</h3> <h3 id="torrents">{{ call $.T "last_reports" }}</h3>
<table class="table"> <table class="table">
<tr> <thead class="torrent-info">
<th class="col-xs-9">Torrent Name</th> <tr>
<th class="col-xs-1">User</th> <th class="tr-name">{{ call $.T "name" }}</th>
<th class="col-xs-1">Reason</th> <th class="tr-size">{{ call $.T "username" }}</th>
<th class="col-xs-1">Action</th> <th class="tr-size">{{ call $.T "reason" }}</th>
</tr> <th class="tr-size">{{ call $.T "actions" }}</th>
</tr>
{{range .TorrentReports}} </thead>
<tr> <tbody>
<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> {{range .TorrentReports}}
<td>{{.User.Username}}</td> <tr>
<td>{{.Description}}</td> <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><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> <td class="tr-size home-td">{{.User.Username}}</td>
</tr> <td class="tr-size home-td">{{.Description}}</td>
{{end}} <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> </table>
<nav class="torrentNav" aria-label="Page navigation"> <nav class="adminNav" aria-label="Page navigation">
<ul class="pagination"> <ul class="pagination">
<li><a href="{{ genRoute "mod_trlist" }}">More</a></li> <li><a href="{{ genRoute "mod_trlist" }}">{{ call $.T "more" }}</a></li>
</ul> </ul>
</nav> </nav>
<hr /> <hr />
<h3 id="users">Last Users</h3> <h3 id="users">{{ call $.T "last_users" }}</h3>
<table class="table"> <table class="table">
<tr> <thead class="torrent-info">
<th class="col-xs-11">Username</th> <tr>
<th class="col-xs-1">Action</th> <th class="tr-name">{{ call $.T "username" }}</th>
</tr> <th class="tr-size">{{ call $.T "actions" }}</th>
</tr>
{{range .Users}} </thead>
<tbody>
<tr> {{range .Users}}
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td> <tr>
<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> <td class="tr-name"><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
</tr> <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>
{{end}} </tr>
{{end}}
</tbody>
</table> </table>
<nav class="torrentNav" aria-label="Page navigation"> <nav class="adminNav" aria-label="Page navigation">
<ul class="pagination"> <ul class="pagination">
<li><a href="{{ genRoute "mod_ulist" }}">More </a></li> <li><a href="{{ genRoute "mod_ulist" }}">{{ call $.T "more" }} </a></li>
</ul> </ul>
</nav> </nav>
<hr /> <hr />
<h3 id="comments">Last Comments</h3> <h3 id="comments">{{ call $.T "last_comments" }}</h3>
<table class="table"> <table class="table">
<tr> <thead class="torrent-info">
<th class="col-xs-10">Content</th> <tr>
<th class="col-xs-1">User</th> <th class="tr-name">{{ call $.T "comments" }}</th>
<th class="col-xs-1">Action</th> <th class="tr-size">{{ call $.T "username" }}</th>
</tr> <th class="tr-size">{{ call $.T "actions" }}</th>
</tr>
{{range .Comments}} </thead>
<tbody>
<tr> {{range .Comments}}
<td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</a></td> <tr>
<td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{.UserID}}</a></td> <td class="tr-name"><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</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> <td class="tr-size home-td"><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{.UserID}}</a></td>
</tr> <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>
{{end}} </tr>
{{end}}
</tbody>
</table> </table>
<nav class="torrentNav" aria-label="Page navigation"> <nav class="adminNav" aria-label="Page navigation">
<ul class="pagination"> <ul class="pagination">
<li><a href="{{ genRoute "mod_clist" }}">More</a></li> <li><a href="{{ genRoute "mod_clist" }}">{{ call $.T "more" }}</a></li>
</ul> </ul>
</nav> </nav>
</div>
{{end}} {{end}}

Voir le fichier

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

Voir le fichier

@ -1,33 +1,36 @@
{{define "title"}}Torrent Reassign{{end}} {{define "title"}}{{ call $.T "torrent_reassign" }}{{end}}
{{define "content"}} {{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}} {{ block "csrf_field" $ }}{{end}}
{{ range (index $.FormInfos "infos")}} {{ 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}} {{end}}
{{ range (index $.FormErrors "errors")}} {{ 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}} {{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}} {{with .Form}}
<div class="form-group"> <div class="form-group">
<label for="to">Reassign to:</label> <label for="to">{{ call $.T "reassign_to" }}</label>
<input type="text" name="to" class="form-control" placeholder="User ID" {{if ne .AssignTo 0}}value="{{.AssignTo}}"{{end}} required> <input type="text" name="to" class="form-control" placeholder="{{ call $.T "user_id" }}" {{if ne .AssignTo 0}}value="{{.AssignTo}}"{{end}} required>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="by">Reassign based on:</label><br /> <label for="by">{{ call $.T "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="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> Torrent ID <input type="radio" name="by" value="torrentid" {{if eq .By "torrentid"}}checked{{end}} required> {{ call $.T "torrent_id" }}
</div> </div>
<div class="form-group"> <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> <textarea rows="20" cols="40" name="data">{{.Data}}</textarea>
</div> </div>
{{end}} {{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> <button type="submit" class="btn btn-success">{{call $.T "save_changes"}}</button>
</form> </form>
</div>
{{end}} {{end}}

Voir le fichier

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

Voir le fichier

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

Voir le fichier

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

Voir le fichier

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

Voir le fichier

@ -875,6 +875,18 @@
"id": "torrent_deleted", "id": "torrent_deleted",
"translation": "Torrent %s 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", "id": "no_action_exist",
"translation": "No such action %s exist!" "translation": "No such action %s exist!"
@ -1102,5 +1114,109 @@
{ {
"id": "query_nb", "id": "query_nb",
"translation": "Query #{0}" "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"
} }
] ]