Fix more style issues
Cette révision appartient à :
Parent
18813627be
révision
cdabd79c03
|
@ -5,8 +5,8 @@
|
|||
"attr-unsafe-chars": true,
|
||||
"attr-value-double-quotes": false,
|
||||
"attr-value-not-empty": false,
|
||||
"doctype-first": true,
|
||||
"doctype-html5": true,
|
||||
"doctype-first": false,
|
||||
"doctype-html5": false,
|
||||
"head-script-disabled": true,
|
||||
"href-abs-or-rel": false,
|
||||
"id-class-ad-disabled": true,
|
||||
|
@ -19,7 +19,7 @@
|
|||
"src-not-empty": true,
|
||||
"style-disabled": true,
|
||||
"tag-pair": true,
|
||||
"tag-self-close": false,
|
||||
"tag-self-close": true,
|
||||
"tagname-lowercase": true,
|
||||
"title-require": true
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// Switches between themes when a new one is selected
|
||||
|
||||
function switchThemes() {
|
||||
themeName = document.getElementById("theme-selector").value
|
||||
var themeName = document.getElementById("theme-selector").value
|
||||
var head = document.getElementsByTagName("head")[0]
|
||||
// Remove the theme in place, it fails if one isn't set
|
||||
try {
|
||||
|
|
|
@ -1,28 +1,42 @@
|
|||
{{ extends "layouts/index_admin" }}
|
||||
{{block title()}}{{ T("comments_list") }}{{end}}
|
||||
{{block title()}}{{ T("comments_list") }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="results box">
|
||||
<h1>{{ T("comments_list") }}</h1>
|
||||
<table class="table">
|
||||
<thead class="torrent-info">
|
||||
<tr>
|
||||
<th class="tr-name">{{ T("comments") }}</th>
|
||||
<th class="tr-size">{{ T("torrents") }}</th>
|
||||
<th class="tr-actions">{{ T("username") }}</th>
|
||||
<th class="tr-actions">{{ T("actions") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range Models}}
|
||||
<tr>
|
||||
<!-- TODO: add href="/mod/comment?id={{.ID}}" for comment editing -->
|
||||
<td class="tr-name home-td"><a>{{ .Content }}</a></td>
|
||||
<td class="tr-size home-td"><a href="/view/{{.TorrentID }}">{{ .TorrentID }}</a></td>
|
||||
<td class="tr-size home-td">{{if .User }}{{ .User.Username }}{{else}}れんちょん{{end}}</td>
|
||||
<td class="tr-actions home-td"><a href="/mod/comment/delete?id={{.ID}}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<h1>{{ T("comments_list") }}</h1>
|
||||
<table class="table">
|
||||
<thead class="torrent-info">
|
||||
<tr>
|
||||
<th class="tr-name">{{ T("comments") }}</th>
|
||||
<th class="tr-size">{{ T("torrents") }}</th>
|
||||
<th class="tr-actions">{{ T("username") }}</th>
|
||||
<th class="tr-actions">{{ T("actions") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range Models}}
|
||||
<tr>
|
||||
<!-- TODO: add href="/mod/comment?id={{.ID}}" for comment editing -->
|
||||
<td class="tr-name home-td">
|
||||
<a>{{ .Content }}</a>
|
||||
</td>
|
||||
<td class="tr-size home-td">
|
||||
<a href="/view/{{.TorrentID }}">{{ .TorrentID }}</a>
|
||||
</td>
|
||||
<td class="tr-size home-td">
|
||||
{{if .User }}
|
||||
{{ .User.Username }}
|
||||
{{else}}
|
||||
れんちょん
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="tr-actions home-td">
|
||||
<a href="/mod/comment/delete?id={{.ID}}" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;">
|
||||
<i class="icon-trash"></i> {{ T("delete") }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,108 +1,138 @@
|
|||
{{ extends "layouts/index_admin" }}
|
||||
{{ block title()}}{{ T("moderation_overview") }}{{end}}
|
||||
{{ block content_body()}}
|
||||
{{ block title()}}{{ T("moderation_overview") }}{{end}}
|
||||
{{ block content_body()}}
|
||||
<div class="results box">
|
||||
<h3 id="torrents">{{ T("last_torrents") }}</h3>
|
||||
<table class="table">
|
||||
<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>
|
||||
<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>
|
||||
<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}}">{{ .UploaderID }}</a></td>
|
||||
<td class="tr-size home-td"><a href="/mod/torrent/delete?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{range Torrents}}
|
||||
<tr>
|
||||
<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}}">{{ .UploaderID }}</a>
|
||||
</td>
|
||||
<td class="tr-size home-td">
|
||||
<a href="/mod/torrent/delete?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;">
|
||||
<i class="icon-trash"></i> {{ T("delete") }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<nav class="adminNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<li><a href="/mod/torrents">More</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<hr />
|
||||
</table>
|
||||
<nav class="adminNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<li><a href="/mod/torrents">More</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<hr />
|
||||
|
||||
<h3 id="torrents">{{ T("last_reports") }}</h3>
|
||||
<table class="table">
|
||||
<h3 id="torrents">{{ T("last_reports") }}</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("reason") }}</th>
|
||||
<th class="tr-actions">{{ T("actions") }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="tr-name">{{ T("name") }}</th>
|
||||
<th class="tr-actions">{{ T("username") }}</th>
|
||||
<th class="tr-actions">{{ T("reason") }}</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>
|
||||
{{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="tr-actions home-td"><a href="/mod/torrent/delete?id={{ .ID }}" class="form-input btn-red"><i class="icon-trash"></i> {{ T("delete") }}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
<td class="tr-actions home-td">
|
||||
<a href="/mod/torrent/delete?id={{ .ID }}" class="form-input btn-red">
|
||||
<i class="icon-trash"></i> {{ T("delete") }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<nav class="adminNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<li><a href="/mod/reports">{{ T("more") }}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<hr />
|
||||
<h3 id="users">{{ T("last_users") }}</h3>
|
||||
<table class="table">
|
||||
</table>
|
||||
<nav class="adminNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<li><a href="/mod/reports">{{ T("more") }}</a></li>
|
||||
</ul>
|
||||
</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>
|
||||
<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>
|
||||
{{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}}
|
||||
<a href="/user/{{.ID}}/{{.Username }}?delete" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</a>
|
||||
{{end}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
<a href="/user/{{.ID}}/{{.Username }}?delete" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;">
|
||||
<i class="icon-trash"></i> {{ T("delete") }}
|
||||
</a>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<nav class="adminNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<li><a href="/mod/users">{{ T("more") }} </a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<hr />
|
||||
<h3 id="comments">{{ T("last_comments") }}</h3>
|
||||
<table class="table">
|
||||
</table>
|
||||
<nav class="adminNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<li><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>
|
||||
<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"><a href="/mod/comment/delete?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{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">
|
||||
<a href="/mod/comment/delete?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;">
|
||||
<i class="icon-trash"></i> {{ T("delete") }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<nav class="adminNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<li><a href="/mod/comments">{{ T("more") }}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</table>
|
||||
<nav class="adminNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<li><a href="/mod/comments">{{ T("more") }}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,57 +1,59 @@
|
|||
{{ extends "layouts/index_admin" }}
|
||||
{{ import "layouts/partials/helpers/flags" }}
|
||||
{{block title()}}{{ T("torrent_edit_panel") }}{{end}}
|
||||
{{ block content_body()}}
|
||||
{{ extends "layouts/index_admin" }} {{ import "layouts/partials/helpers/flags" }} {{block title()}}{{ T("torrent_edit_panel") }}{{end}} {{ block content_body()}}
|
||||
<div class="results box">
|
||||
<h3 id="torrents">{{ T("torrent_edit_panel") }}</h3>
|
||||
<h3 id="torrents">{{ T("torrent_edit_panel") }}</h3>
|
||||
<form style="text-align:left;padding-left:10px;padding-right:10px;" enctype="multipart/form-data" role="upload" method="POST">
|
||||
<div class="form-group">
|
||||
<div class="form-group">
|
||||
<label for="name">{{ T("name")}}</label>
|
||||
<input type="text" name="name" class="form-input up-input" placeholder="{{ T("file_name")}}" value="{{Form.Name}}" required>
|
||||
<input type="text" name="name" class="form-input up-input" placeholder="{{ T(" file_name ")}}" value="{{Form.Name}}" required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c">{{ T("category")}}</label>
|
||||
<select name="c" class="form-input up-input">
|
||||
<option value="">{{ T("select_a_torrent_category")}}</option>
|
||||
{{ range _, cat := GetCategories(false, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Form.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="language">{{ T("torrent_language") }}</label>
|
||||
<div name="language" class="form-input language">
|
||||
{{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="c">{{ T("category")}}</label>
|
||||
<select name="c" class="form-input up-input">
|
||||
<option value="">{{ T("select_a_torrent_category")}}</option>
|
||||
{{ range _, cat := GetCategories(false, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Form.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="language">{{ T("torrent_language") }}</label>
|
||||
<div name="language" class="form-input language">
|
||||
{{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="Status">{{ T("torrent_status")}}</label>
|
||||
<select name="status" class="form-input up-input">
|
||||
<option value="5" {{if Form.Status == 5}}selected{{end}}>{{ T("torrent_status_blocked") }}</option>
|
||||
<option value="1" {{if Form.Status == 1}}selected{{end}}>{{ T("torrent_status_normal")}}</option>
|
||||
<option value="2" {{if Form.Status == 2}}selected{{end}}>{{ T("torrent_status_remake")}}</option>
|
||||
<option value="3" {{if Form.Status == 3}}selected{{end}}>{{ T("trusted")}}</option>
|
||||
<option value="4" {{if Form.Status == 4}}selected{{end}}>A+</option>
|
||||
</select>
|
||||
</div>
|
||||
<p>
|
||||
<input type="checkbox" value="true" name="hidden" id="hidden" {{ if Form.Hidden }}checked{{end}}>
|
||||
<label for="hidden">{{ T("upload_as_anon")}}</label>
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label for="website_link">{{ T("website_link")}}</label>
|
||||
<input name="website_link" id="website_link" class="form-input up-input" type="text" value="{{Form.WebsiteLink}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="desc">{{ T("torrent_description")}}</label>
|
||||
<p class="help-block">{{ T("description_markdown_notice")}}</p>
|
||||
<textarea name="desc" id="desc" class="form-input up-input" rows="10">{{Form.Description}}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="form-input up-input btn-green">{{ T("save_changes")}}</button>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="Status">{{ T("torrent_status")}}</label>
|
||||
<select name="status" class="form-input up-input">
|
||||
<option value="5" {{if Form.Status == 5}}selected{{end}}>{{ T("torrent_status_blocked") }}</option>
|
||||
<option value="1" {{if Form.Status == 1}}selected{{end}}>{{ T("torrent_status_normal")}}</option>
|
||||
<option value="2" {{if Form.Status == 2}}selected{{end}}>{{ T("torrent_status_remake")}}</option>
|
||||
<option value="3" {{if Form.Status == 3}}selected{{end}}>{{ T("trusted")}}</option>
|
||||
<option value="4" {{if Form.Status == 4}}selected{{end}}>A+</option>
|
||||
</select>
|
||||
</div>
|
||||
<p>
|
||||
<input type="checkbox" value="true" name="hidden" id="hidden" {{ if Form.Hidden }}checked{{end}}/>
|
||||
<label for="hidden">{{ T("upload_as_anon")}}</label>
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label for="website_link">{{ T("website_link")}}</label>
|
||||
<input name="website_link" id="website_link" class="form-input up-input" type="text" value="{{Form.WebsiteLink}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="desc">{{ T("torrent_description")}}</label>
|
||||
<p class="help-block">{{ T("description_markdown_notice")}}</p>
|
||||
<textarea name="desc" id="desc" class="form-input up-input" rows="10">{{Form.Description}}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="form-input up-input btn-green">{{ T("save_changes")}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ block footer_js()}}
|
||||
{{end}} {{ block footer_js()}}
|
||||
<script type="text/javascript" src="/js/simplemde.min.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript">new SimpleMDE({ element: document.getElementById("desc"), spellChecker: false, showIcons: [ "strikethrough", "code", "table", "horizontal-rule" ] });</script>
|
||||
{{end}}
|
||||
<script type="text/javascript">
|
||||
new SimpleMDE({
|
||||
element: document.getElementById("desc"),
|
||||
spellChecker: false,
|
||||
showIcons: ["strikethrough", "code", "table", "horizontal-rule"]
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
|
|
|
@ -1,28 +1,29 @@
|
|||
{{ extends "layouts/index_admin" }}
|
||||
{{block title()}}{{ T("torrent_reassign") }}{{end}}
|
||||
{{block title()}}{{ T("torrent_reassign") }}{{end}}
|
||||
{{ block content_body()}}
|
||||
<div class="results box form-box">
|
||||
<h1>{{ T("torrent_reassign") }}</h1>
|
||||
<form enctype="multipart/form-data" method="POST">
|
||||
<p>{{ T("reassign_warning") }}</p>
|
||||
<h1>{{ T("torrent_reassign") }}</h1>
|
||||
<form enctype="multipart/form-data" method="POST">
|
||||
<p>{{ T("reassign_warning") }}</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="to">{{ T("reassign_to") }}</label>
|
||||
<input class="form-input" type="text" name="to" class="form-control" placeholder="{{ T("user_id") }}" {{if Form.AssignTo != 0}}value="{{Form.AssignTo}}"{{end}} required>
|
||||
<label for="to">{{ T("reassign_to") }}</label>
|
||||
<input class="form-input" type="text" name="to" class="form-control" placeholder="{{ T(" user_id ") }}" {{if Form.AssignTo !=0 }}value="{{Form.AssignTo}}" {{end}} required/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="by">{{ T("reassign_based_on") }}</label><br />
|
||||
<input type="radio" name="by" value="olduser" {{if Form.By == "olduser"}}checked{{end}} required> {{ T("previous_username") }}<br />
|
||||
<input type="radio" name="by" value="torrentid" {{if Form.By == "torrentid"}}checked{{end}} required> {{ T("torrent_id") }}
|
||||
<label for="by">{{ T("reassign_based_on") }}</label><br />
|
||||
<input type="radio" name="by" value="olduser" {{if Form.By=="olduser" }}checked{{end}} required> {{ T("previous_username") }}
|
||||
<br />
|
||||
<input type="radio" name="by" value="torrentid" {{if Form.By=="torrentid" }}checked{{end}} required> {{ T("torrent_id") }}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<p>{{ T("reassign_indication")|raw}}</p>
|
||||
<textarea rows="20" cols="40" name="data">{{Form.Data}}</textarea>
|
||||
<p>{{ T("reassign_indication")|raw}}</p>
|
||||
<textarea rows="20" cols="40" name="data">{{Form.Data}}</textarea>
|
||||
</div>
|
||||
|
||||
<p>{{ T("reassign_warning_2") }}</p>
|
||||
<p>{{ T("reassign_warning_2") }}</p>
|
||||
<button type="submit" class="form-input btn-green">{{ T("save_changes")}}</button>
|
||||
</form>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,29 +1,38 @@
|
|||
{{ extends "layouts/index_admin" }}
|
||||
{{block title()}}{{ T("reports_list") }}{{end}}
|
||||
{{block title()}}{{ T("reports_list") }}{{end}}
|
||||
{{ block content_body()}}
|
||||
<div class="results box">
|
||||
<h1>{{ T("reports_list") }}</h1>
|
||||
<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("reason") }}</th>
|
||||
<th class="tr-actions">{{ T("actions") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range Models}}
|
||||
<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="tr-actions home-td">
|
||||
<a href="/mod/torrent/delete?id={{ .Torrent.ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i>{{ T("delete_torrent") }}</a><br>
|
||||
<a href="/mod/report/delete?id={{ .ID }}" class="form-input btn-red"><i class="icon-trash"></i>{{ T("delete_report") }}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<h1>{{ T("reports_list") }}</h1>
|
||||
<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("reason") }}</th>
|
||||
<th class="tr-actions">{{ T("actions") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range Models}}
|
||||
<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="tr-actions home-td">
|
||||
<a href="/mod/torrent/delete?id={{ .Torrent.ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;">
|
||||
<i class="icon-trash"></i>{{ T("delete_torrent") }}
|
||||
</a>
|
||||
<br/>
|
||||
<a href="/mod/report/delete?id={{ .ID }}" class="form-input btn-red">
|
||||
<i class="icon-trash"></i>{{ T("delete_report") }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,73 +1,96 @@
|
|||
{{ extends "layouts/index_admin" }}
|
||||
{{block title()}}{{ T("torrents_list") }}{{end}}
|
||||
{{ block content_body()}}
|
||||
{{ extends "layouts/index_admin" }} {{block title()}}{{ T("torrents_list") }}{{end}} {{ block content_body()}}
|
||||
<div class="results box">
|
||||
<h1>{{ T("torrents_list") }}</h1>
|
||||
<form method="post" action="">
|
||||
<h1>{{ T("torrents_list") }}</h1>
|
||||
<form method="post" action="">
|
||||
<div class="toolbar">
|
||||
<select class="cb_action" name="action">
|
||||
<option value="">{{ T("action_select") }}</option>
|
||||
<option value="status">{{ T("change_status") }}</option>
|
||||
<option value="delete">{{ T("delete") }}</option>
|
||||
</select>
|
||||
<select class="cb_action" style="display: none;" name="status">
|
||||
<option value="">{{ T("to_status") }}</option>
|
||||
<option value="5">{{ T("torrent_status_blocked")}}</option>
|
||||
<option value="1">{{ T("torrent_status_normal")}}</option>
|
||||
<option value="2">{{ T("torrent_status_remake")}}</option>
|
||||
<option value="3">{{ 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="/mod/torrents" class="form-input">{{ T("torrents_not_deleted") }}</a>
|
||||
<a href="/mod/torrents/deleted" class="form-input">{{ T("torrents_deleted") }}</a>
|
||||
</div>
|
||||
<select class="cb_action" name="action">
|
||||
<option value="">{{ T("action_select") }}</option>
|
||||
<option value="status">{{ T("change_status") }}</option>
|
||||
<option value="delete">{{ T("delete") }}</option>
|
||||
</select>
|
||||
<select class="cb_action" style="display: none;" name="status">
|
||||
<option value="">{{ T("to_status") }}</option>
|
||||
<option value="5">{{ T("torrent_status_blocked")}}</option>
|
||||
<option value="1">{{ T("torrent_status_normal")}}</option>
|
||||
<option value="2">{{ T("torrent_status_remake")}}</option>
|
||||
<option value="3">{{ 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="/mod/torrents" class="form-input">{{ T("torrents_not_deleted") }}</a>
|
||||
<a href="/mod/torrents/deleted" class="form-input">{{ T("torrents_deleted") }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead class="torrent-info">
|
||||
<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">{{ T("name") }}</th>
|
||||
<th class="tr-actions">{{ T("uploaded_by") }}</th>
|
||||
<th class="tr-actions" style="width:190px">{{ T("actions") }}</th>
|
||||
<th class="tr-cb">
|
||||
<input type="checkbox" name="checkall" data-selectall="checkbox" />
|
||||
</th>
|
||||
<th class="tr-name">{{ T("name") }}</th>
|
||||
<th class="tr-actions">{{ T("uploaded_by") }}</th>
|
||||
<th class="tr-actions" style="width:190px">{{ T("actions") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range Models}}
|
||||
<tr>
|
||||
<td class="tr-cb"><input type="checkbox" class="selectable" name="torrent_id" value="{{.ID }}"></td>
|
||||
<td class="tr-name home-td"><a href="/view/{{ .ID }}">{{ .Name }}</a> {{ if !.IsDeleted }}<a href="/mod/torrent?id={{.ID}}" class="form-input btn-blue float-right">{{ T("edit")}}</a>{{end}}</td>
|
||||
<td class="tr-size home-td">{{ if .Uploader }}<a href="/torrents{{ if .IsDeleted }}/deleted{{end}}?userID={{.UploaderID}}">{{ .Uploader.Username }}</a>{{ else }}れんちょん{{end}}</td>
|
||||
<td class="tr-actions home-td">
|
||||
<a href="/torrent/block?id={{ .ID }}" class="form-input btn-orange" onclick="if (!confirm('{{ T("are_you_sure")}}')) return false;">{{ if .IsBlocked }}{{ T("torrent_unblock") }}{{else}}{{ T("torrent_block") }}{{end}}</a>
|
||||
{{ if .IsDeleted }}
|
||||
<br><a href="/mod/torrent/delete?definitely&id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure")}} {{ T("delete_definitely_torrent_warning")}}')) return false;"><i class="icon-trash"></i> {{ T("delete_definitely") }}</a>
|
||||
{{ else }}
|
||||
<a href="/mod/torrent/delete?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure")}}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range Models}}
|
||||
<tr>
|
||||
<td class="tr-cb">
|
||||
<input type="checkbox" class="selectable" name="torrent_id" value="{{.ID }}" />
|
||||
</td>
|
||||
<td class="tr-name home-td">
|
||||
<a href="/view/{{ .ID }}">{{ .Name }}</a> {{ if !.IsDeleted }}
|
||||
<a href="/mod/torrent?id={{.ID}}" class="form-input btn-blue float-right">
|
||||
{{ T("edit")}}
|
||||
</a> {{end}}
|
||||
</td>
|
||||
<td class="tr-size home-td">
|
||||
{{ if .Uploader }}
|
||||
<a href="/torrents{{ if .IsDeleted }}/deleted{{end}}?userID={{.UploaderID}}">
|
||||
{{ .Uploader.Username }}
|
||||
</a> {{ else }}れんちょん{{end}}
|
||||
</td>
|
||||
<td class="tr-actions home-td">
|
||||
<a href="/torrent/block?id={{ .ID }}" class="form-input btn-orange" onclick="if (!confirm('{{ T(" are_you_sure ")}}')) return false;">
|
||||
{{ if .IsBlocked }}
|
||||
{{ T("torrent_unblock") }}
|
||||
{{else}}
|
||||
{{ T("torrent_block") }}
|
||||
{{end}}
|
||||
</a>
|
||||
{{ if .IsDeleted }}
|
||||
<br/>
|
||||
<a href="/mod/torrent/delete?definitely&id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ")}} {{ T("delete_definitely_torrent_warning ")}}')) return false;">
|
||||
<i class="icon-trash"></i>
|
||||
{{ T("delete_definitely") }}
|
||||
</a>
|
||||
{{ else }}
|
||||
<a href="/mod/torrent/delete?id={{ .ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ")}}')) return false;">
|
||||
<i class="icon-trash"></i> {{ T("delete") }}
|
||||
</a>
|
||||
{{ end }}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ block footer_js()}}
|
||||
{{end}} {{ block footer_js()}}
|
||||
<!-- 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">
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
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);
|
||||
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}}
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
{{ extends "layouts/index_admin" }}
|
||||
{{block title()}}{{ T("users_list") }}{{end}}
|
||||
{{block title()}}{{ T("users_list") }}{{end}}
|
||||
{{ block content_body()}}
|
||||
<div class="results box">
|
||||
<h1>{{ T("users_list") }}</h1>
|
||||
<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 Models}}
|
||||
<tr>
|
||||
<td class="tr-name home-td"><a href="/user/{{.ID}}/{{.Username }}">{{ .Username }}</a></td>
|
||||
<td class="tr-actions home-td">{{if .ID > 0}}<a href="/user/{{.ID}}/{{.Username }}?delete" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;"><i class="icon-trash"></i> {{ T("delete") }}</a>{{end}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<h1>{{ T("users_list") }}</h1>
|
||||
<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 Models}}
|
||||
<tr>
|
||||
<td class="tr-name home-td">
|
||||
<a href="/user/{{.ID}}/{{.Username }}">{{ .Username }}</a>
|
||||
</td>
|
||||
<td class="tr-actions home-td">
|
||||
{{if .ID > 0}}
|
||||
<a href="/user/{{.ID}}/{{.Username }}?delete" class="form-input btn-red" onclick="if (!confirm('{{ T(" are_you_sure ") }}')) return false;">
|
||||
<i class="icon-trash"></i> {{ T("delete") }}
|
||||
</a>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{{ extends "layouts/index_site" }}
|
||||
{{block title()}}{{ T("error_400")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div style="text-align: center;">
|
||||
<h1>{{ T("400_bad_request")}}</h1>
|
||||
<img src="/img/400.png" width="500px" />
|
||||
</div>
|
||||
{{end}}
|
||||
{{block mascot()}}<br>{{end}}
|
||||
<div style="text-align: center;">
|
||||
<h1>{{ T("400_bad_request")}}</h1>
|
||||
<img src="/img/400.png" width="500px" alt="400"/>
|
||||
</div>
|
||||
{{end}} {{block mascot()}}<br />{{end}}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{{ extends "layouts/index_site" }}
|
||||
{{block title()}}{{ T("404_not_found")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div style="text-align: center;">
|
||||
<h1>{{ T("404_not_found")}}</h1>
|
||||
<img src="/img/404.png" />
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<h1>{{ T("404_not_found")}}</h1>
|
||||
<img src="/img/404.png" alt="404"/>
|
||||
</div>
|
||||
{{end}}
|
||||
{{block mascot()}}<br>{{end}}
|
||||
{{block mascot()}}<br />{{end}}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{{ extends "layouts/index_site" }}
|
||||
{{block title()}}{{ T("error_500")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div style="text-align: center;">
|
||||
<h1>{{ T("500_internal_server_error")}}</h1>
|
||||
<img src="/img/500.png" width="500px" />
|
||||
</div>
|
||||
<div style="text-align: center;">
|
||||
<h1>{{ T("500_internal_server_error")}}</h1>
|
||||
<img src="/img/500.png" width="500px" alt="500"/>
|
||||
</div>
|
||||
{{end}}
|
||||
{{block mascot()}}<br>{{end}}
|
||||
{{block mascot()}}<br />{{end}}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
{{ extends "layouts/index_site" }}
|
||||
{{block title()}}{{ T("err_no_results")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div style="text-align: center;">
|
||||
<h1>{{ T("err_no_results")}}</h1>
|
||||
<img src="/img/no_results.jpg" />
|
||||
</div>
|
||||
{{end}}
|
||||
{{block mascot()}}<br>{{end}}
|
||||
<div style="text-align: center;">
|
||||
<h1>{{ T("err_no_results")}}</h1>
|
||||
<img src="/img/no_results.jpg" alt="no results"/>
|
||||
</div>
|
||||
{{end}} {{block mascot()}}<br />{{end}}
|
||||
|
|
|
@ -1,20 +1,3 @@
|
|||
{* We extend the base template *}
|
||||
{{ extends "partials/base" }}
|
||||
{{import "partials/helpers/search"}}
|
||||
|
||||
{* We apply the menu in the base template *}
|
||||
{{ block menu()}}
|
||||
{{include "partials/menu/admin"}}
|
||||
{{end}}
|
||||
|
||||
{* We add the class content for admin *}
|
||||
{{ block contclass()}}content-admin{{end}}
|
||||
|
||||
{* We add the mod panel title and the title block *}
|
||||
{{block titleBase()}}Moderation Panel - {{block title()}}{{end}}{{end}}
|
||||
|
||||
{* We add the mod panel search refine and the body block *}
|
||||
{{ block content_body_base()}}
|
||||
{{ yield search_refine(url=URL.Parse("/mod/torrents")) }}
|
||||
{{ block content_body()}}{{end}}
|
||||
{{end}}
|
||||
{* We extend the base template *} {{ extends "partials/base" }} {{import "partials/helpers/search"}} {* We apply the menu in the base template *} {{ block menu()}} {{include "partials/menu/admin"}} {{end}} {* We add the class content for admin *} {{ block
|
||||
contclass()}}content-admin{{end}} {* We add the mod panel title and the title block *} {{block titleBase()}}Moderation Panel - {{block title()}}{{end}}{{end}} {* We add the mod panel search refine and the body block *} {{ block content_body_base()}} {{
|
||||
yield search_refine(url=URL.Parse("/mod/torrents")) }} {{ block content_body()}}{{end}} {{end}}
|
||||
|
|
|
@ -2,96 +2,96 @@
|
|||
{{import "helpers/infos"}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ 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 titleBase()}}{{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="{{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu">
|
||||
<meta property="og:title" content="{{yield titleBase()}} - {{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu">
|
||||
<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()}}Latest torrents{{end}} RSS Feed" href="/feed/?{{ block rss_link() }}{{ getRawQuery(URL) }}{{end}}" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{ yield rsstitle()}} Torznab RSS Feed" href="/feed/torznab?{{ yield rss_link() }}&t=search" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{ yield rsstitle()}} EZTV RSS Feed" href="/feed/eztv??{{ yield rss_link() }}" />
|
||||
|
||||
<!-- do NOT move -->
|
||||
<link rel="stylesheet" href="/css/simplemde.min.css?v={{ Config.Version }}{{ Config.Build }}">
|
||||
<!-- Base theme -->
|
||||
<link rel="stylesheet" id="style" href="/css/main.css?v={{ Config.Version }}{{ Config.Build }}">
|
||||
<!-- nyaacon, custom icon set -->
|
||||
<link rel="stylesheet" href="/css/nyacon.css?v={{ Config.Version}}{{ Config.Build }}">
|
||||
<!-- User selected theme, if any, defaults to /g/ -->
|
||||
{{if Theme == ""}}
|
||||
<link rel="stylesheet" id="theme" href="/css/g.css?v={{ Config.Version }}{{ Config.Build }}">
|
||||
{{else}}
|
||||
<link rel="stylesheet" id="theme" href="/css/{{Theme}}.css?v={{ Config.Version }}{{ Config.Build }}">
|
||||
{{end}}
|
||||
<!-- Flags css -->
|
||||
<link rel="stylesheet" href="/css/flags/flags.min.css">
|
||||
<!-- Search Box for Google -->
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","url":"{{Config.WebAddress.Nyaa}}/","potentialAction":{"@type":"SearchAction","target":"{{Config.WebAddress.Nyaa}}/search?q={search_term_string}","query-input":"required name=search_term_string"} }</script>
|
||||
{{block additional_header()}}{{end}}
|
||||
</head>
|
||||
<body {{if Sukebei()}}class="sukebei"{{end}}>
|
||||
<nav id="header" class="header">
|
||||
{{block menu()}}{{end}}
|
||||
</nav>
|
||||
<div id="content" class="{{ block contclass() }}{{end}}">
|
||||
<div class="content container center">
|
||||
{{ yield infos()}}
|
||||
{{ yield errors()}}
|
||||
{{ block content_body_base() }}{{end}}
|
||||
</div>
|
||||
{{ block mascot() }}
|
||||
{{if Mascot != "hide"}}
|
||||
<div id="mascot" class="hide-xs{{if MascotURL != ""}} custom-mascot{{end}}" onclick="playVoice();" {{if MascotURL != ""}}style="background-image: url('{{MascotURL}}');"{{end}}></div>
|
||||
{* Only play the sounds with the default mascot *}
|
||||
{{ if MascotURL == "" }}
|
||||
{{ if Sukebei() }}
|
||||
<audio id="kawaii" hidden preload="none">
|
||||
<source src="https://a.doko.moe/spbyif.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
{{else if Theme == "tomorrow" }}
|
||||
<audio id="explosion" hidden preload="none">
|
||||
<source src="https://a.doko.moe/vrlrtw.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
{{ else if User.ID > 0}}
|
||||
<audio id="nyanpassu2" hidden preload="none">
|
||||
<source src="https://a.doko.moe/znadfr.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}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div class="pagination">
|
||||
{{ genNav(Navigation, URL, 15)|raw }}
|
||||
</div>
|
||||
<footer id="footer">
|
||||
<div class="container footer center">
|
||||
<div class="footer-opt">
|
||||
<p><a href="/settings">{{ T("change_settings") }}</a></p>
|
||||
</div>
|
||||
<span><i>Powered by <a href="#">Nyaa Pantsu</a> v{{ Config.Version }} - commit <a id="commit" href="https://github.com/NyaaPantsu/nyaa/commit/{{ Config.Build }}">{{ Config.Build }}</a></i></span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8">var Version = "{{ Config.Build }}";</script>
|
||||
<script type="text/javascript" charset="utf-8" src="/js/main.js?v={{ Config.Version }}{{ Config.Build }}" async></script>
|
||||
{{block footer_js()}}{{end}}
|
||||
</body>
|
||||
<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 titleBase()}}{{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="{{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu"/>
|
||||
<meta property="og:title" content="{{yield titleBase()}} - {{if Sukebei()}}Sukebei{{else}}Nyaa{{end}} Pantsu"/>
|
||||
<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()}}Latest torrents{{end}} RSS Feed" href="/feed/?{{ block rss_link() }}{{ getRawQuery(URL) }}{{end}}" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{ yield rsstitle()}} Torznab RSS Feed" href="/feed/torznab?{{ yield rss_link() }}&t=search" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Nyaa Pantsu - {{ yield rsstitle()}} EZTV RSS Feed" href="/feed/eztv??{{ yield rss_link() }}" />
|
||||
|
||||
<!-- do NOT move -->
|
||||
<link rel="stylesheet" href="/css/simplemde.min.css?v={{ Config.Version }}{{ Config.Build }}"/>
|
||||
<!-- Base theme -->
|
||||
<link rel="stylesheet" id="style" href="/css/main.css?v={{ Config.Version }}{{ Config.Build }}"/>
|
||||
<!-- nyaacon, custom icon set -->
|
||||
<link rel="stylesheet" href="/css/nyacon.css?v={{ Config.Version}}{{ Config.Build }}"/>
|
||||
<!-- User selected theme, if any, defaults to /g/ -->
|
||||
{{if Theme == ""}}
|
||||
<link rel="stylesheet" id="theme" href="/css/g.css?v={{ Config.Version }}{{ Config.Build }}"/>
|
||||
{{else}}
|
||||
<link rel="stylesheet" id="theme" href="/css/{{Theme}}.css?v={{ Config.Version }}{{ Config.Build }}"/>
|
||||
{{end}}
|
||||
<!-- Flags css -->
|
||||
<link rel="stylesheet" href="/css/flags/flags.min.css"/>
|
||||
<!-- Search Box for Google -->
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","url":"{{Config.WebAddress.Nyaa}}/","potentialAction":{"@type":"SearchAction","target":"{{Config.WebAddress.Nyaa}}/search?q={search_term_string}","query-input":"required name=search_term_string"} }</script>
|
||||
{{block additional_header()}}{{end}}
|
||||
</head>
|
||||
<body {{if Sukebei()}}class="sukebei"{{end}}>
|
||||
<nav id="header" class="header">
|
||||
{{block menu()}}{{end}}
|
||||
</nav>
|
||||
<div id="content" class="{{ block contclass() }}{{end}}">
|
||||
<div class="content container center">
|
||||
{{ yield infos()}}
|
||||
{{ yield errors()}}
|
||||
{{ block content_body_base() }}{{end}}
|
||||
</div>
|
||||
{{ block mascot() }}
|
||||
{{if Mascot != "hide"}}
|
||||
<div id="mascot" class="hide-xs{{if MascotURL != ""}} custom-mascot{{end}}" onclick="playVoice();" {{if MascotURL != ""}}style="background-image: url('{{MascotURL}}');"{{end}}></div>
|
||||
{* Only play the sounds with the default mascot *}
|
||||
{{ if MascotURL == "" }}
|
||||
{{ if Sukebei() }}
|
||||
<audio id="kawaii" hidden preload="none">
|
||||
<source src="https://a.doko.moe/spbyif.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
{{else if Theme == "tomorrow" }}
|
||||
<audio id="explosion" hidden preload="none">
|
||||
<source src="https://a.doko.moe/vrlrtw.mp3" type="audio/mpeg">
|
||||
</audio>
|
||||
{{ else if User.ID > 0}}
|
||||
<audio id="nyanpassu2" hidden preload="none">
|
||||
<source src="https://a.doko.moe/znadfr.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}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div class="pagination">
|
||||
{{ genNav(Navigation, URL, 15)|raw }}
|
||||
</div>
|
||||
<footer id="footer">
|
||||
<div class="container footer center">
|
||||
<div class="footer-opt">
|
||||
<p><a href="/settings">{{ T("change_settings") }}</a></p>
|
||||
</div>
|
||||
<span><i>Powered by <a href="#">Nyaa Pantsu</a> v{{ Config.Version }} - commit <a id="commit" href="https://github.com/NyaaPantsu/nyaa/commit/{{ Config.Build }}">{{ Config.Build }}</a></i></span>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
<script type="text/javascript" charset="utf-8">var Version = "{{ Config.Build }}";</script>
|
||||
<script type="text/javascript" charset="utf-8" src="/js/main.js?v={{ Config.Version }}{{ Config.Build }}" async></script>
|
||||
{{block footer_js()}}{{end}}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,22 +1,36 @@
|
|||
{{ import "csrf" }}
|
||||
{{block badge_user()}}
|
||||
<div class="h-user">
|
||||
{{if User.ID > 0 }}
|
||||
<button href="#" class="nav-btn">
|
||||
<div class="user-avatar small"><img src="https://www.gravatar.com/avatar/{{ User.MD5 }}?s=50"></div>
|
||||
<span class="user-info" title="{{ User.Username}}"><span class="hide-md">{{User.Username}}</span></span>
|
||||
</button>
|
||||
<div class="user-menu">
|
||||
<a class="nav-btn" href="/user/{{ User.ID }}/{{ User.Username }}">{{ T("profile")}}</a>
|
||||
<a class="nav-btn{{ User.GetUnreadNotifications() > 0 ? " notif" : "" }}" href="/notifications">{{ T("my_notifications")}} <span class="badge">({{ User.GetUnreadNotifications() }})</span></a>
|
||||
<a class="nav-btn" href="/user/{{ User.ID }}/{{ User.Username }}/edit">{{ T("settings")}}</a>
|
||||
{{if User.HasAdmin()}}<a class="nav-btn" href="/mod">{{ T("moderation")}}</a>{{end}}
|
||||
<form action="/logout" method="POST">{{ yield csrf_field() }}<input type="hidden" value="{{ URL.String() }}" name="redirectTo"><input class="nav-btn" type="submit" name="logout" value="{{ T("sign_out")}}"></form>
|
||||
</div>
|
||||
{{ else }}
|
||||
<a href="/login?redirectTo={{ URL.String() }}" class="nav-btn">
|
||||
{{ T("signin") }}<span class="caret"></span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{if User.ID > 0 }}
|
||||
<button href="#" class="nav-btn">
|
||||
<div class="user-avatar small">
|
||||
<img src="https://www.gravatar.com/avatar/{{ User.MD5 }}?s=50"/>
|
||||
</div>
|
||||
<span class="user-info" title="{{ User.Username}}">
|
||||
<span class="hide-md">{{User.Username}}</span>
|
||||
</span>
|
||||
</button>
|
||||
<div class="user-menu">
|
||||
<a class="nav-btn" href="/user/{{ User.ID }}/{{ User.Username }}">{{ T("profile")}}</a>
|
||||
<a class="nav-btn{{ User.GetUnreadNotifications() > 0 ? " notif " : " " }}" href="/notifications">
|
||||
{{ T("my_notifications")}}
|
||||
<span class="badge">({{ User.GetUnreadNotifications() }})</span>
|
||||
</a>
|
||||
<a class="nav-btn" href="/user/{{ User.ID }}/{{ User.Username }}/edit">
|
||||
{{ T("settings")}}
|
||||
</a>
|
||||
{{if User.HasAdmin()}}
|
||||
<a class="nav-btn" href="/mod">{{ T("moderation")}}</a>
|
||||
{{end}}
|
||||
<form action="/logout" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<input type="hidden" value="{{ URL.String() }}" name="redirectTo"/>
|
||||
<input class="nav-btn" type="submit" name="logout" value="{{ T(" sign_out ")}}"/>
|
||||
</form>
|
||||
</div>
|
||||
{{ else }}
|
||||
<a href="/login?redirectTo={{ URL.String() }}" class="nav-btn">
|
||||
{{ T("signin") }}<span class="caret"></span>
|
||||
</a> {{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
{{block captcha(captchaid="")}}
|
||||
{* unset if user doesn't need captcha *}
|
||||
{{if captchaid != ""}}
|
||||
<div class="form-group captcha-container" style="width: 240px;margin: auto;">
|
||||
<h3>{{ T("captcha")}}</h3>
|
||||
<input type="text" name="captchaID" value="{{captchaid}}" hidden>
|
||||
<img src="/captcha/{{captchaid}}.png"><br>
|
||||
<audio src="/captcha/{{captchaid}}.wav" controls style="width: 240px;">
|
||||
<a href="/captcha/{{captchaid}}.wav?lang={{ T("language_code") }}">{{ T("captcha_audio") }}</a>
|
||||
</audio>
|
||||
<input class="form-input up-input" type="text" name="solution" id="solution" class="form-control" style="display:block;" placeholder="{{ T("captcha")}}" autocomplete="off" required>
|
||||
</div>
|
||||
{{end}}
|
||||
{* unset if user doesn't need captcha *}
|
||||
{{if captchaid != ""}}
|
||||
<div class="form-group captcha-container" style="width: 240px;margin: auto;">
|
||||
<h3>{{ T("captcha")}}</h3>
|
||||
<input type="text" name="captchaID" value="{{captchaid}}" hidden/>
|
||||
<img src="/captcha/{{captchaid}}.png" alt="captcha">
|
||||
<br/>
|
||||
<audio src="/captcha/{{captchaid}}.wav" controls style="width: 240px;">
|
||||
<a href="/captcha/{{captchaid}}.wav?lang={{ T("language_code") }}">
|
||||
{{ T("captcha_audio") }}
|
||||
</a>
|
||||
</audio>
|
||||
<input class="form-input up-input" type="text" name="solution" id="solution" class="form-control" style="display:block;" placeholder="{{ T("captcha")}}" autocomplete="off" required />
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{{ block csrf_field()}}
|
||||
<input type="hidden" name="csrf_token" value="{{ CsrfToken }}">
|
||||
{{end}}
|
||||
<input type="hidden" name="csrf_token" value="{{ CsrfToken }}"/>
|
||||
{{end}}
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
{{ block flagList(languages=nil, selected="", inputname="languages", id="lang")}}
|
||||
{{ if isset(languages) }}
|
||||
{{ range _, language := languages }}<span class="input-group"><span name="{{id}}-languagename">{{LanguageName(language, T)}}</span><input type="checkbox" name="{{inputname}}" class="form-language-checkbox" id="{{id}}-{{ language.Code }}" value="{{language.Code}}"{{ range _, v := selected}}{{ if contains(v, language.Code) }} checked{{end}}{{end}}><label for="{{id}}-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label></span>{{ end }}
|
||||
{{ range _, language := languages }}
|
||||
<span class="input-group">
|
||||
<span name="{{id}}-languagename">{{LanguageName(language, T)}}</span>
|
||||
<input type="checkbox" name="{{inputname}}" class="form-language-checkbox" id="{{id}}-{{ language.Code }}" value="{{language.Code}}"
|
||||
{{ range _, v := selected}}
|
||||
{{ if contains(v, language.Code) }} checked{{end}}{{end}}>
|
||||
<label for="{{id}}-{{ language.Code }}" class="flag flag-{{ language.Flag(false) }}" title="{{LanguageName(language, T)}}"></label>
|
||||
</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{{ block ruleList(open=false)}}
|
||||
<details class="rules-drop" {{if open}}open{{end}}>
|
||||
<summary class="form-input">{{ T("rules")}}</summary>
|
||||
<div class="form-input">
|
||||
<ul>
|
||||
<li>{{ T("no_cp")}}</li>
|
||||
<li>{{ T("asia")}}</li>
|
||||
<li>{{ T("rules_spam")}}</li>
|
||||
<li>{{ T("rules_sukebei")}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<summary class="form-input">{{ T("rules")}}</summary>
|
||||
<div class="form-input">
|
||||
<ul>
|
||||
<li>{{ T("no_cp")}}</li>
|
||||
<li>{{ T("asia")}}</li>
|
||||
<li>{{ T("rules_spam")}}</li>
|
||||
<li>{{ T("rules_sukebei")}}</li>
|
||||
</ul>
|
||||
</div>
|
||||
</details>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,67 +1,71 @@
|
|||
{{ import "flags" }}
|
||||
{{block search_common()}}
|
||||
<select name="c" class="form-input hide-xs form-category">
|
||||
<option value="_">{{ T("all_categories")}}</option>
|
||||
{{ range _, cat := GetCategories(true, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Search.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<input type="hidden" name="userID" value="{{ Search.UserID }}">
|
||||
<select name="c" class="form-input hide-xs form-category">
|
||||
<option value="_">{{ T("all_categories")}}</option>
|
||||
{{ range _, cat := GetCategories(true, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Search.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<input type="hidden" name="userID" value="{{ Search.UserID }}"/>
|
||||
{{end}}
|
||||
{{block search_button() }}
|
||||
<input class="form-input search-box" name="q" placeholder="{{ T("search")}}" type="text" value="{{Search.NameLike}}">
|
||||
<button type="submit" class="form-input icon-search"></button>
|
||||
<button type="submit" class="form-input refine" name="refine" value="1">{{ T("refine")}}</button>
|
||||
<input class="form-input search-box" name="q" placeholder="{{ T("search")}}" type="text" value="{{Search.NameLike}}"/>
|
||||
<button type="submit" class="form-input icon-search"></button>
|
||||
<button type="submit" class="form-input refine" name="refine" value="1">{{ T("refine")}}</button>
|
||||
{{end}}
|
||||
{{block search_refine(url="") }}
|
||||
<div style="text-align:left;{{ if !Search.ShowRefine }}display:none;{{ end }}" class="box refine">
|
||||
<h3>{{ T("refine_search") }}</h3>
|
||||
<form style="display: grid;" method="GET" action="{{ url }}">
|
||||
<span class="form-refine"><span class="spacing">{{ T("search_for") }}:</span>
|
||||
<input type="text" class="form-input refine-searchbox" size="30" name="q" value="{{Search.NameLike}}"/><select name="c" class="form-input refine-category">
|
||||
<option value="_">{{ T("all_categories")}}</option>
|
||||
{{ range _, cat := GetCategories(true, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Search.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</span>
|
||||
<span class="form-refine"><span class="spacing">{{ T("show") }}:</span>
|
||||
<select name="s" class="form-input spacing" style="max-width: 21%;">
|
||||
<option value="0">{{ T("show_all")}}</option>
|
||||
<option value="2" {{if Search.Status == 2}}selected{{end}}>{{ T("filter_remakes")}}</option>
|
||||
<option value="3" {{if Search.Status == 3}}selected{{end}}>{{ T("trusted")}}</option>
|
||||
<option value="4" {{if Search.Status == 4}}selected{{end}}>A+</option>
|
||||
</select>
|
||||
Limit: <input type="number" name="limit" value="{{ Navigation.MaxItemPerPage }}" class="form-input spacing" min="1" max="300">
|
||||
From: <input type="number" name="userID" placeholder="UserID" value="{{ Search.UserID > 0 ? Search.UserID : ""}}" class="form-input refine-userid">
|
||||
</span>
|
||||
<span class="form-refine"><span class="spacing">{{ T("between")}}</span>
|
||||
<input class="form-input" size="7" name="minSize" type="text" value="{{Search.MinSize}}">
|
||||
{{ T("and")}}
|
||||
<input size="7" class="form-input" name="maxSize" type="text" value="{{Search.MaxSize}}">
|
||||
<select name="sizeType" class="form-input">
|
||||
<option value="b"{{if Search.SizeType == "b"}} selected{{end}}>B</option>
|
||||
<option value="k"{{if Search.SizeType == "k"}} selected{{end}}>KiB</option>
|
||||
<option value="m"{{if Search.SizeType == "m"}} selected{{end}}>MiB</option>
|
||||
<option value="g"{{if Search.SizeType == "g"}} selected{{end}}>GiB</option>
|
||||
</select>
|
||||
{{ T("large")}}
|
||||
</span>
|
||||
<span class="form-refine"><span class="spacing">{{ T("between")}}</span>
|
||||
<input class="form-input" size="7" name="fromDate" type="text" value="{{Search.FromDate}}">
|
||||
{{ T("and")}}
|
||||
<input class="form-input" size="7" name="toDate" type="text" value="{{Search.ToDate}}">
|
||||
<select name="dateType" class="form-input">
|
||||
<option value="d"{{if Search.DateType == "d"}} selected{{end}}>{{ T("days")}}</option>
|
||||
<option value="m"{{if Search.DateType == "m"}} selected{{end}}>{{ T("months")}}</option>
|
||||
<option value="y"{{if Search.DateType == "y"}} selected{{end}}>{{ T("years")}}</option>
|
||||
</select>
|
||||
{{ T("old")}}.
|
||||
</span>
|
||||
<div name="language" class="form-refine form-input language">
|
||||
{{ yield flagList(languages=GetTorrentLanguages(), selected=Search.Languages, inputname="lang", id="refine-search")}}
|
||||
</div>
|
||||
<button type="submit" class="form-input refine-btn" name="refine" value="1">{{ T("refine")}}</button>
|
||||
</form>
|
||||
<h3>{{ T("refine_search") }}</h3>
|
||||
<form style="display: grid;" method="GET" action="{{ url }}">
|
||||
<span class="form-refine">
|
||||
<span class="spacing">{{ T("search_for") }}:</span>
|
||||
<input type="text" class="form-input refine-searchbox" size="30" name="q" value="{{Search.NameLike}}"/><select name="c" class="form-input refine-category"/>
|
||||
<option value="_">{{ T("all_categories")}}</option>
|
||||
{{ range _, cat := GetCategories(true, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Search.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
</span>
|
||||
<span class="form-refine">
|
||||
<span class="spacing">{{ T("show") }}:</span>
|
||||
<select name="s" class="form-input spacing" style="max-width: 21%;">
|
||||
<option value="0">{{ T("show_all")}}</option>
|
||||
<option value="2" {{if Search.Status == 2}}selected{{end}}>{{ T("filter_remakes")}}</option>
|
||||
<option value="3" {{if Search.Status == 3}}selected{{end}}>{{ T("trusted")}}</option>
|
||||
<option value="4" {{if Search.Status == 4}}selected{{end}}>A+</option>
|
||||
</select>
|
||||
Limit: <input type="number" name="limit" value="{{ Navigation.MaxItemPerPage }}" class="form-input spacing" min="1" max="300"/>
|
||||
From: <input type="number" name="userID" placeholder="UserID" value="{{ Search.UserID > 0 ? Search.UserID : ""}}" class="form-input refine-userid"/>
|
||||
</span>
|
||||
<span class="form-refine">
|
||||
<span class="spacing">{{ T("between")}}</span>
|
||||
<input class="form-input" size="7" name="minSize" type="text" value="{{Search.MinSize}}"/>
|
||||
{{ T("and")}}
|
||||
<input size="7" class="form-input" name="maxSize" type="text" value="{{Search.MaxSize}}"/>
|
||||
<select name="sizeType" class="form-input">
|
||||
<option value="b"{{if Search.SizeType == "b"}} selected{{end}}>B</option>
|
||||
<option value="k"{{if Search.SizeType == "k"}} selected{{end}}>KiB</option>
|
||||
<option value="m"{{if Search.SizeType == "m"}} selected{{end}}>MiB</option>
|
||||
<option value="g"{{if Search.SizeType == "g"}} selected{{end}}>GiB</option>
|
||||
</select>
|
||||
{{ T("large")}}
|
||||
</span>
|
||||
<span class="form-refine">
|
||||
<span class="spacing">{{ T("between")}}</span>
|
||||
<input class="form-input" size="7" name="fromDate" type="text" value="{{Search.FromDate}}"/>
|
||||
{{ T("and")}}
|
||||
<input class="form-input" size="7" name="toDate" type="text" value="{{Search.ToDate}}"/>
|
||||
<select name="dateType" class="form-input">
|
||||
<option value="d"{{if Search.DateType == "d"}} selected{{end}}>{{ T("days")}}</option>
|
||||
<option value="m"{{if Search.DateType == "m"}} selected{{end}}>{{ T("months")}}</option>
|
||||
<option value="y"{{if Search.DateType == "y"}} selected{{end}}>{{ T("years")}}</option>
|
||||
</select>
|
||||
{{ T("old")}}.
|
||||
</span>
|
||||
<div name="language" class="form-refine form-input language">
|
||||
{{ yield flagList(languages=GetTorrentLanguages(), selected=Search.Languages, inputname="lang", id="refine-search")}}
|
||||
</div>
|
||||
<button type="submit" class="form-input refine-btn" name="refine" value="1">{{ T("refine")}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
{{ block make_treeview(treeviewData=nil) }}
|
||||
{{ if isset(treeviewData)}}
|
||||
{{ range index, folder := treeviewData.Folder.Folders }}
|
||||
{{ folderId := treeviewData.IdentifierChain+"_"+index }}
|
||||
<tr class="tr-filelist tr-folder" style="--nest-level: {{ treeviewData.NestLevel }}">
|
||||
<td><label for="contents_{{folderId}}">{{folder.FolderName}}</label></td>
|
||||
<td>{{ fileSize(folder.TotalSize(), T) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="contents_{{folderId}}" type="checkbox" class="filelist-checkbox">
|
||||
<table class="table-filelist">
|
||||
{{ yield make_treeview(treeviewData=makeTreeViewData(folder, treeviewData.NestLevel+1, folderId)) }}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{ folderId := treeviewData.IdentifierChain+"_"+index }}
|
||||
<tr class="tr-filelist tr-folder" style="--nest-level: {{ treeviewData.NestLevel }}">
|
||||
<td><label for="contents_{{folderId}}">{{folder.FolderName}}</label></td>
|
||||
<td>{{ fileSize(folder.TotalSize(), T) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input id="contents_{{folderId}}" type="checkbox" class="filelist-checkbox"/>
|
||||
<table class="table-filelist">
|
||||
{{ yield make_treeview(treeviewData=makeTreeViewData(folder, treeviewData.NestLevel+1, folderId)) }}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
|
||||
{{ range _, file := treeviewData.Folder.Files }}
|
||||
<tr class="tr-filelist tr-file" style="--nest-level: {{ treeviewData.NestLevel }}">
|
||||
<td>{{file.Filename()}}</td>
|
||||
<td>{{fileSize(file.Filesize, T)}}</td>
|
||||
</tr>
|
||||
<tr class="tr-filelist tr-file" style="--nest-level: {{ treeviewData.NestLevel }}">
|
||||
<td>{{file.Filename()}}</td>
|
||||
<td>{{fileSize(file.Filesize, T)}}</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
|
@ -1,28 +1,48 @@
|
|||
{{ import "layouts/partials/helpers/search" }}
|
||||
<div class="container">
|
||||
<div class="h-left">
|
||||
<div class="h-logo">
|
||||
<a href="{{URL.Parse("/mod/")}}"><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"><span class="hide-md">{{ T("nyaa_pantsu")}}</span></a>
|
||||
<a href="{{URL.Parse("/mod/torrents")}}" class="nav-btn"><div class="visible-md icon-magnet"></div><span class="hide-md">{{ T("torrents")}}</span></a>
|
||||
<a href="{{URL.Parse("/mod/users")}}" class="nav-btn"><div class="visible-md icon-users"></div><span class="hide-md">{{ T("users")}}</span></a>
|
||||
<a href="{{URL.Parse("/mod/comments")}}" class="nav-btn"><div class="visible-md icon-chat"></div><span class="hide-md">{{ T("comments")}}</span></a>
|
||||
<a href="{{URL.Parse("/mod/reports")}}" class="nav-btn"><div class="visible-md icon-attention"></div><span class="hide-md">{{ T("torrent_reports")}}</span></a>
|
||||
<a href="{{URL.Parse("/mod/reassign")}}" class="nav-btn"><div class="visible-md icon-user-plus"></div><span class="hide-md">{{ T("torrent_reassign")}}</span></a>
|
||||
</div>
|
||||
<div class="h-left">
|
||||
<div class="h-logo">
|
||||
<a href="{{URL.Parse("/mod/")}}">
|
||||
<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-right">
|
||||
<div class="h-user">
|
||||
{{ include "layouts/partials/helpers/badgemenu" }}
|
||||
</div>
|
||||
|
||||
<div class="h-search">
|
||||
<form role="search" action="{{URL.Parse("/mod/torrents")}}" method="get">
|
||||
{{ yield search_common() }}
|
||||
{{ yield search_button() }}
|
||||
</form>
|
||||
</div>
|
||||
<div class="h-nav">
|
||||
<a href="{{URL.Parse("/")}}" class="nav-btn">
|
||||
<span class="hide-md">{{ T("nyaa_pantsu")}}</span>
|
||||
</a>
|
||||
<a href="{{URL.Parse("/mod/torrents")}}" class="nav-btn">
|
||||
<div class="visible-md icon-magnet"></div>
|
||||
<span class="hide-md">{{ T("torrents")}}</span>
|
||||
</a>
|
||||
<a href="{{URL.Parse("/mod/users")}}" class="nav-btn">
|
||||
<div class="visible-md icon-users"></div>
|
||||
<span class="hide-md">{{ T("users")}}</span>
|
||||
</a>
|
||||
<a href="{{URL.Parse("/mod/comments")}}" class="nav-btn">
|
||||
<div class="visible-md icon-chat"></div>
|
||||
<span class="hide-md">{{ T("comments")}}</span>
|
||||
</a>
|
||||
<a href="{{URL.Parse("/mod/reports")}}" class="nav-btn">
|
||||
<div class="visible-md icon-attention"></div>
|
||||
<span class="hide-md">{{ T("torrent_reports")}}</span>
|
||||
</a>
|
||||
<a href="{{URL.Parse("/mod/reassign")}}" class="nav-btn">
|
||||
<div class="visible-md icon-user-plus"></div>
|
||||
<span class="hide-md">{{ T("torrent_reassign")}}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-right">
|
||||
<div class="h-user">
|
||||
{{ include "layouts/partials/helpers/badgemenu" }}
|
||||
</div>
|
||||
|
||||
<div class="h-search">
|
||||
<form role="search" action="{{URL.Parse("/mod/torrents")}}" method="get">
|
||||
{{ yield search_common() }}
|
||||
{{ yield search_button() }}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,52 +1,64 @@
|
|||
{{ block profile_menu(route="profile") }}
|
||||
<div class="profile-sidebar">
|
||||
<!-- SIDEBAR USERPIC -->
|
||||
<div class="profile-userpic">
|
||||
<img src="{{ getAvatar(UserProfile.MD5, 130) }}" alt="{{ UserProfile.Username }}">
|
||||
</div>
|
||||
<!-- END SIDEBAR USERPIC -->
|
||||
<!-- SIDEBAR USER TITLE -->
|
||||
<div class="profile-usertitle">
|
||||
<p class="profile-usertitle-name">
|
||||
{{ UserProfile.Username}}
|
||||
</p>
|
||||
<p class="profile-usertitle-job">
|
||||
{{UserProfile.GetRole()}}
|
||||
</p>
|
||||
<p class="profile-usertitle-uploadcount">{{ T("torrents_uploaded") }}:<span>{{ NbTorrents }}</span></p>
|
||||
</div>
|
||||
<!-- END SIDEBAR USER TITLE -->
|
||||
<!-- SIDEBAR BUTTONS -->
|
||||
<div class="profile-userbuttons">
|
||||
{{if User.ID > 0 }}
|
||||
{{if !User.CurrentUserIdentical(UserProfile.ID) }}
|
||||
{{if !User.IsFollower(UserProfile)}}
|
||||
<a class="form-input" href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}/follow" class="form-input btn-green">{{ T("follow")}}</a><br>
|
||||
{{else}}
|
||||
<a class="form-input" href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}/follow" class="form-input btn-orange">{{ T("unfollow")}}</a><br>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<!-- <button type="button" class="btn btn-danger btn-sm">Message</button> -->
|
||||
</div>
|
||||
<br>
|
||||
<!-- END SIDEBAR BUTTONS -->
|
||||
<!-- SIDEBAR MENU -->
|
||||
<div class="profile-usermenu">
|
||||
{{ if User.ID > 0 && (User.CurrentUserIdentical(UserProfile.ID) || User.CurrentOrAdmin(UserProfile.ID)) }}
|
||||
<a class="form-input btn-green" href="/user/{{ UserProfile.ID }}/{{ UserProfile.Username }}"><div class="icon-floppy"></div>{{ T("torrents")}}</a> <br>
|
||||
{{ else }}
|
||||
<a class="form-input btn-green" href="/search?userID={{ UserProfile.ID }}"><div class="icon-floppy"></div>{{ T("torrents")}}</a> <br>
|
||||
{{ end }}
|
||||
{{if User.ID > 0 }}
|
||||
{{ if User.CurrentUserIdentical(UserProfile.ID) }}
|
||||
<a class="form-input" href="/notifications">{{ T("my_notifications")}}</a> <br>
|
||||
{{end}}
|
||||
{{if User.CurrentOrAdmin(UserProfile.ID) }}
|
||||
<a class="form-input" href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}/edit">{{ T("settings")}}</a> <br>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<!-- END MENU -->
|
||||
<!-- SIDEBAR USERPIC -->
|
||||
<div class="profile-userpic">
|
||||
<img src="{{ getAvatar(UserProfile.MD5, 130) }}" alt="{{ UserProfile.Username }}"/>
|
||||
</div>
|
||||
<!-- END SIDEBAR USERPIC -->
|
||||
<!-- SIDEBAR USER TITLE -->
|
||||
<div class="profile-usertitle">
|
||||
<p class="profile-usertitle-name">
|
||||
{{ UserProfile.Username}}
|
||||
</p>
|
||||
<p class="profile-usertitle-job">
|
||||
{{UserProfile.GetRole()}}
|
||||
</p>
|
||||
<p class="profile-usertitle-uploadcount">{{ T("torrents_uploaded") }}:<span>{{ NbTorrents }}</span></p>
|
||||
</div>
|
||||
<!-- END SIDEBAR USER TITLE -->
|
||||
<!-- SIDEBAR BUTTONS -->
|
||||
<div class="profile-userbuttons">
|
||||
{{if User.ID > 0 }}
|
||||
{{if !User.CurrentUserIdentical(UserProfile.ID) }}
|
||||
{{if !User.IsFollower(UserProfile)}}
|
||||
<a class="form-input" href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}/follow" class="form-input btn-green">{{ T("follow")}}</a>
|
||||
<br />
|
||||
{{else}}
|
||||
<a class="form-input" href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}/follow" class="form-input btn-orange">{{ T("unfollow")}}</a>
|
||||
<br/>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<!-- <button type="button" class="btn btn-danger btn-sm">Message</button> -->
|
||||
</div>
|
||||
<br/>
|
||||
<!-- END SIDEBAR BUTTONS -->
|
||||
<!-- SIDEBAR MENU -->
|
||||
<div class="profile-usermenu">
|
||||
{{ if User.ID > 0 && (User.CurrentUserIdentical(UserProfile.ID) || User.CurrentOrAdmin(UserProfile.ID)) }}
|
||||
<a class="form-input btn-green" href="/user/{{ UserProfile.ID }}/{{ UserProfile.Username }}">
|
||||
<div class="icon-floppy"></div>{{ T("torrents")}}
|
||||
</a>
|
||||
<br/>
|
||||
{{ else }}
|
||||
<a class="form-input btn-green" href="/search?userID={{ UserProfile.ID }}">
|
||||
<div class="icon-floppy"></div>{{ T("torrents")}}
|
||||
</a>
|
||||
<br/>
|
||||
{{ end }}
|
||||
{{if User.ID > 0 }}
|
||||
{{ if User.CurrentUserIdentical(UserProfile.ID) }}
|
||||
<a class="form-input" href="/notifications">{{ T("my_notifications")}}</a>
|
||||
<br/>
|
||||
{{end}}
|
||||
{{if User.CurrentOrAdmin(UserProfile.ID) }}
|
||||
<a class="form-input" href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}/edit">
|
||||
{{ T("settings")}}
|
||||
</a>
|
||||
<br/>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
<!-- END MENU -->
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
{{block rss_link()}}/user/{{UserProfile.ID}}/{{UserProfile.Username}}/feed{{end}}
|
||||
{{block rsstitle() }}{{ UserProfile.Username }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="profile-main">
|
||||
<div class="box profile-panel">
|
||||
{{ block profile_navigation() }}{{end}}
|
||||
</div>
|
||||
<div class="profile-content box">
|
||||
{{ block profile_content() }}{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-main">
|
||||
<div class="box profile-panel">
|
||||
{{ block profile_navigation() }}{{end}}
|
||||
</div>
|
||||
<div class="profile-content box">
|
||||
{{ block profile_content() }}{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -2,39 +2,39 @@
|
|||
{{block title()}}{{ T("home")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="results box">
|
||||
<a href="{{ GPGLink }}">Gpg key</a>
|
||||
<a href="{{ GPGLink }}">Gpg key</a>
|
||||
|
||||
<div class="table-responsive">
|
||||
{{ if len(ListDumps) > 0 }}
|
||||
<table>
|
||||
<thead class="torrent-info">
|
||||
<tr>
|
||||
<th class="tr-name">{{ T("name")}}</th>
|
||||
<th class="tr-date">{{ T("date")}}</th>
|
||||
<th class="tr-size">{{ T("size")}}</th>
|
||||
<th class="tr-actions">{{ T("links")}}</th>
|
||||
</tr>
|
||||
{{ range ListDumps}}
|
||||
<tr class="torrent-info">
|
||||
<!-- forced width because the <td> gets bigger randomly otherwise -->
|
||||
<td class="tr-name home-td">
|
||||
{{.Name}}
|
||||
</td>
|
||||
<td class="tr-date home-td">{{.Date}}</td>
|
||||
<td class="tr-size home-td">{{.Filesize}}</td>
|
||||
<td class="tr-actions home-td">
|
||||
{{if .TorrentLink != ""}}
|
||||
<a href="{{.TorrentLink}}" title="{{ T("torrent_file") }}">
|
||||
<div class="icon-floppy"></div>
|
||||
</a>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{else}}
|
||||
<h1>{{ T("no_database_dumps_available")}}</h1>
|
||||
<div class="table-responsive">
|
||||
{{ if len(ListDumps) > 0 }}
|
||||
<table>
|
||||
<thead class="torrent-info">
|
||||
<tr>
|
||||
<th class="tr-name">{{ T("name")}}</th>
|
||||
<th class="tr-date">{{ T("date")}}</th>
|
||||
<th class="tr-size">{{ T("size")}}</th>
|
||||
<th class="tr-actions">{{ T("links")}}</th>
|
||||
</tr>
|
||||
{{ range ListDumps}}
|
||||
<tr class="torrent-info">
|
||||
<!-- forced width because the <td> gets bigger randomly otherwise -->
|
||||
<td class="tr-name home-td">
|
||||
{{.Name}}
|
||||
</td>
|
||||
<td class="tr-date home-td">{{.Date}}</td>
|
||||
<td class="tr-size home-td">{{.Filesize}}</td>
|
||||
<td class="tr-actions home-td">
|
||||
{{if .TorrentLink != ""}}
|
||||
<a href="{{.TorrentLink}}" title="{{ T("torrent_file") }}">
|
||||
<div class="icon-floppy"></div>
|
||||
</a>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{else}}
|
||||
<h1>{{ T("no_database_dumps_available")}}</h1>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
{{block title()}}{{ T("delete_account") }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="box">
|
||||
<div class="row" style="margin-top:20px">
|
||||
<h2>{{ T("delete_success")}}</h2>
|
||||
</div>
|
||||
<div class="row" style="margin-top:20px">
|
||||
<h2>{{ T("delete_success")}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
{{block title()}}{{ T("register_success_title") }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="box">
|
||||
<div class="row" style="margin-top:20px">
|
||||
<h2>{{ T("sign_up_success")}}</h2>
|
||||
<hr class="colorgraph">
|
||||
{{if User.Email != ""}}
|
||||
<p>{{ T("signup_verification_email") }}</p>
|
||||
{{else}}
|
||||
<p>{{ T("signup_verification_noemail") }}</p>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="row" style="margin-top:20px">
|
||||
<h2>{{ T("sign_up_success")}}</h2>
|
||||
<hr class="colorgraph"/>
|
||||
{{if User.Email != ""}}
|
||||
<p>{{ T("signup_verification_email") }}</p>
|
||||
{{else}}
|
||||
<p>{{ T("signup_verification_noemail") }}</p>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
{{block title()}}{{ T("register_success_title") }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="box">
|
||||
<div class="row" style="margin-top:20px">
|
||||
<h2>{{ T("verify_success")}}</h2>
|
||||
</div>
|
||||
<div class="row" style="margin-top:20px">
|
||||
<h2>{{ T("verify_success")}}</h2>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -2,21 +2,25 @@
|
|||
{{block title()}}{{ T("activity_list") }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="results box">
|
||||
<table>
|
||||
<thead class="torrent-info">
|
||||
<tr>
|
||||
<th class="tr-name">{{ T("activities") }}</th>
|
||||
<th class="tr-size">{{ T("filter") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range Models}}
|
||||
<tr>
|
||||
<td class="tr-name home-td"><a>{{ genActivityContent(., T) }}</a></td>
|
||||
<td class="tr-actions home-td"><a href="/activities?filter={{.Filter}}" class="form-input">{{ T(.Filter) }}</a></td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
<table>
|
||||
<thead class="torrent-info">
|
||||
<tr>
|
||||
<th class="tr-name">{{ T("activities") }}</th>
|
||||
<th class="tr-size">{{ T("filter") }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{ range Models}}
|
||||
<tr>
|
||||
<td class="tr-name home-td">
|
||||
<a>{{ genActivityContent(., T) }}</a>
|
||||
</td>
|
||||
<td class="tr-actions home-td">
|
||||
<a href="/activities?filter={{.Filter}}" class="form-input">{{ T(.Filter) }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -4,57 +4,57 @@
|
|||
{{ import "layouts/partials/helpers/flags" }}
|
||||
{{block title()}}{{T("torrent_edit_panel")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="box results">
|
||||
<div class="box results">
|
||||
<h3 id="torrents">{{ T("torrent_edit_panel") }}</h3>
|
||||
<form style="text-align:left;padding-left:10px;padding-right:10px;" enctype="multipart/form-data" role="upload" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<div class="form-group">
|
||||
{{ yield csrf_field() }}
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="name">{{ T("name")}}</label>
|
||||
<input type="text" name="name" class="form-input up-input" placeholder="{{ T("file_name")}}" value="{{Form.Name}}" required>
|
||||
{{ yield errors(name="name")}}
|
||||
<input type="text" name="name" class="form-input up-input" placeholder="{{ T("file_name")}}" value="{{Form.Name}}" required/>
|
||||
{{ yield errors(name="name")}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="c">{{ T("category")}}</label>
|
||||
<select name="c" class="form-input up-input">
|
||||
<option value="">{{ T("select_a_torrent_category")}}</option>
|
||||
{{ range _, cat := GetCategories(false, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Form.Category == cat.ID }}selected{{end}}>{{T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
{{ yield errors(name="c")}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="language">{{ T("torrent_language") }}</label>
|
||||
<div name="language" class="form-input language">
|
||||
{{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages) }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="c">{{ T("category")}}</label>
|
||||
<select name="c" class="form-input up-input">
|
||||
<option value="">{{ T("select_a_torrent_category")}}</option>
|
||||
{{ range _, cat := GetCategories(false, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Form.Category == cat.ID }}selected{{end}}>{{T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
{{ yield errors(name="c")}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="language">{{ T("torrent_language") }}</label>
|
||||
<div name="language" class="form-input language">
|
||||
{{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages) }}
|
||||
</div>
|
||||
{{ yield errors(name="language")}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="checkbox" value="true" name="remake" id="remake" {{ if Form.Remake }}checked{{end}}>
|
||||
<label for="remake">{{ T("mark_as_remake")}}</label>
|
||||
{{ yield errors(name="remake")}}
|
||||
</div>
|
||||
{{ if User.ID > 0 }}
|
||||
<p>
|
||||
<input type="checkbox" name="hidden" id="hidden" value="true" {{ if Form.Hidden }}checked{{end}}>
|
||||
<label for="hidden">{{ T("upload_as_anon")}}</label>
|
||||
{{ yield errors(name="hidden")}}
|
||||
</p>
|
||||
{{ end }}
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="website_link">{{ T("website_link")}}</label>
|
||||
<input name="website_link" id="website_link" class="form-input up-input" type="text" value="{{Form.WebsiteLink}}">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="desc">{{ T("torrent_description")}}</label>
|
||||
{{ yield errors(name="desc")}}
|
||||
<p class="help-block">{{ T("description_markdown_notice")}}</p>
|
||||
<textarea style="height: 10rem;" id="desc" name="desc" class="form-input up-input" rows="10">{{Form.Description}}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="form-input up-input">{{ T("save_changes")}}</button>
|
||||
<br>
|
||||
<br>
|
||||
{{ yield errors(name="language")}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="checkbox" value="true" name="remake" id="remake" {{ if Form.Remake }}checked{{end}}/>
|
||||
<label for="remake">{{ T("mark_as_remake")}}</label>
|
||||
{{ yield errors(name="remake")}}
|
||||
</div>
|
||||
{{ if User.ID > 0 }}
|
||||
<p>
|
||||
<input type="checkbox" name="hidden" id="hidden" value="true" {{ if Form.Hidden }}checked{{end}}/>
|
||||
<label for="hidden">{{ T("upload_as_anon")}}</label>
|
||||
{{ yield errors(name="hidden")}}
|
||||
</p>
|
||||
{{ end }}
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="website_link">{{ T("website_link")}}</label>
|
||||
<input name="website_link" id="website_link" class="form-input up-input" type="text" value="{{Form.WebsiteLink}}"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="input-label" for="desc">{{ T("torrent_description")}}</label>
|
||||
{{ yield errors(name="desc")}}
|
||||
<p class="help-block">{{ T("description_markdown_notice")}}</p>
|
||||
<textarea style="height: 10rem;" id="desc" name="desc" class="form-input up-input" rows="10">{{Form.Description}}</textarea>
|
||||
</div>
|
||||
<button type="submit" class="form-input up-input">{{ T("save_changes")}}</button>
|
||||
<br/>
|
||||
<br/>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
|
@ -62,4 +62,3 @@
|
|||
<script type="text/javascript" src="/js/simplemde.min.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript">new SimpleMDE({ element: document.getElementById("desc"), spellChecker: false, showIcons: [ "strikethrough", "code", "table", "horizontal-rule" ] });</script>
|
||||
{{end}}
|
||||
|
||||
|
|
|
@ -3,151 +3,173 @@
|
|||
{{block title()}}{{ T("home")}}{{end}}
|
||||
{{block contclass()}}{{if User.HasAdmin() }}content-admin{{end}}{{end}}
|
||||
{{block content_body()}}
|
||||
<!-- Contain the table within a grid, as for better sizing -->
|
||||
<div class="results box">
|
||||
<table>
|
||||
<thead class="torrent-info">
|
||||
<tr>
|
||||
{{ if User.HasAdmin() }}
|
||||
<th class="tr-cb hide"><input type="checkbox" name="select_all" onchange="TorrentsMod.selectAll(this.checked)"></th>
|
||||
{{end}}
|
||||
<th class="tr-cat">{{ T("category")}}</th>
|
||||
<th class="tr-name">
|
||||
<a href="{{ genSearchWithOrdering(URL, "1") }}">{{ T("name")}}<span class="sort-arrows">{{ genSortArrows(URL, "1")|raw }}</span></a>
|
||||
</th>
|
||||
<th class="tr-cs"></th>
|
||||
<th class="tr-links"></th>
|
||||
<th class="tr-size hide-xs"><a href="{{ genSearchWithOrdering(URL, "4") }}">{{ T("size")}}<span class="sort-arrows">{{ genSortArrows(URL, "4")|raw }}</span></a></th>
|
||||
<!-- Contain the table within a grid, as for better sizing -->
|
||||
<div class="results box">
|
||||
<table>
|
||||
<thead class="torrent-info">
|
||||
<tr>
|
||||
{{ if User.HasAdmin() }}
|
||||
<th class="tr-cb hide">
|
||||
<input type="checkbox" name="select_all" onchange="TorrentsMod.selectAll(this.checked)"/>
|
||||
</th>
|
||||
{{end}}
|
||||
<th class="tr-cat">{{ T("category")}}</th>
|
||||
<th class="tr-name">
|
||||
<a href="{{ genSearchWithOrdering(URL, "1") }}">
|
||||
{{ T("name")}}
|
||||
<span class="sort-arrows">{{ genSortArrows(URL, "1")|raw }}</span>
|
||||
</a>
|
||||
</th>
|
||||
<th class="tr-cs"></th>
|
||||
<th class="tr-links"></th>
|
||||
<th class="tr-size hide-xs"><a href="{{ genSearchWithOrdering(URL, "4") }}">{{ T("size")}}<span class="sort-arrows">{{ genSortArrows(URL, "4")|raw }}</span></a></th>
|
||||
|
||||
<th class="tr-se hide-smol">
|
||||
<a href="{{ genSearchWithOrdering(URL, "5") }}">{{ T("S")}}<span class="sort-arrows">{{ genSortArrows(URL, "5")|raw }}</span></a>
|
||||
</th>
|
||||
<th class="tr-le hide-smol">
|
||||
<a href="{{ genSearchWithOrdering(URL, "6") }}">{{ T("L")}}<span class="sort-arrows">{{ genSortArrows(URL, "6")|raw }}</span></a>
|
||||
</th>
|
||||
<th class="tr-dl hide-xs">
|
||||
<a href="{{ genSearchWithOrdering(URL, "7") }}">{{ T("D")}}<span class="sort-arrows">{{ genSortArrows(URL, "7")|raw }}</span></a>
|
||||
</th>
|
||||
<!-- <th><span class="glyphicon glyphicon-comment"></span></th> -->
|
||||
<th class="tr-date hide-xs"><a href="{{ genSearchWithOrdering(URL, "2") }}">{{ T("date")}}<span class="sort-arrows">{{ genSortArrows(URL, "2")|raw }}</span></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="torrentListResults">
|
||||
{{ range Models}}
|
||||
<tr id="torrent_{{ .ID }}" class="torrent-info {{if .Status == 2}}remake{{else if .Status == 3}}trusted{{else if .Status == 4}}aplus{{end}}" >
|
||||
{{ if User.HasAdmin() }}
|
||||
<td class="tr-cb hide">
|
||||
<input data-name="{{ .Name }}" type="checkbox" id="torrent_cb_{{ .ID }}" name="torrent_id" value="{{ .ID }}">
|
||||
</td>
|
||||
{{ end }}
|
||||
<td class="tr-cat home-td">
|
||||
{{ if Sukebei() }}
|
||||
<div class="nyaa-cat sukebei-cat-{{ .Category }}{{ .SubCategory }}">
|
||||
{{ else}}
|
||||
<div class="nyaa-cat nyaa-cat-{{ .SubCategory}}">
|
||||
{{end}}
|
||||
<a href="{{ URL.Parse("/search?c="+.Category+"_"+ .SubCategory) }}" title="{{ T(CategoryName(.Category, .SubCategory)) }}" class="category">
|
||||
<th class="tr-se hide-smol">
|
||||
<a href="{{ genSearchWithOrdering(URL, "5") }}">
|
||||
{{ T("S")}}
|
||||
<span class="sort-arrows">{{ genSortArrows(URL, "5")|raw }}</span>
|
||||
</a>
|
||||
</th>
|
||||
<th class="tr-le hide-smol">
|
||||
<a href="{{ genSearchWithOrdering(URL, "6") }}">
|
||||
{{ T("L")}}
|
||||
<span class="sort-arrows">{{ genSortArrows(URL, "6")|raw }}</span>
|
||||
</a>
|
||||
</th>
|
||||
<th class="tr-dl hide-xs">
|
||||
<a href="{{ genSearchWithOrdering(URL, "7") }}">
|
||||
{{ T("D")}}
|
||||
<span class="sort-arrows">{{ genSortArrows(URL, "7")|raw }}</span>
|
||||
</a>
|
||||
</th>
|
||||
<!-- <th><span class="glyphicon glyphicon-comment"></span></th> -->
|
||||
<th class="tr-date hide-xs"><a href="{{ genSearchWithOrdering(URL, "2") }}">
|
||||
{{ T("date")}}
|
||||
<span class="sort-arrows">{{ genSortArrows(URL, "2")|raw }}</span>
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="torrentListResults">
|
||||
{{ range Models}}
|
||||
<tr id="torrent_{{ .ID }}" class="torrent-info {{if .Status == 2}}remake{{else if .Status == 3}}trusted{{else if .Status == 4}}aplus{{end}}" >
|
||||
{{ if User.HasAdmin() }}
|
||||
<td class="tr-cb hide">
|
||||
<input data-name="{{ .Name }}" type="checkbox" id="torrent_cb_{{ .ID }}" name="torrent_id" value="{{ .ID }}"/>
|
||||
</td>
|
||||
{{ end }}
|
||||
<td class="tr-cat home-td">
|
||||
{{ if Sukebei() }}
|
||||
<div class="nyaa-cat sukebei-cat-{{ .Category }}{{ .SubCategory }}">
|
||||
{{ else}}
|
||||
<div class="nyaa-cat nyaa-cat-{{ .SubCategory}}">
|
||||
{{end}}
|
||||
<a href="{{ URL.Parse("/search?c="+.Category+"_"+ .SubCategory) }}" title="{{ T(CategoryName(.Category, .SubCategory)) }}" class="category">
|
||||
{{if .Languages[0] != "" }}
|
||||
<a href="{{ URL.Parse("/search?c="+.Category+"_"+ .SubCategory +"&lang=") }}{{ range key, language := .Languages }}{{ language }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}" class="flag flag-{{ (len(.Languages) == 1) ? FlagCode(.Languages[0]) : "multiple" }}" title="{{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
</a>
|
||||
{{end}}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tr-name home-td"{{ if len(.Comments) == 0 }}colspan="2"{{ end }}>
|
||||
<a href="/view/{{ .ID }}">
|
||||
{{.Name}}
|
||||
</a>
|
||||
</td>
|
||||
{{ if len(.Comments) > 0 }}
|
||||
<td class="tr-cs home-td">
|
||||
<span>{{len(.Comments)}}</span>
|
||||
</td>
|
||||
{{ end }}
|
||||
<td class="tr-links home-td">
|
||||
<a href="{{.Magnet}}" title="{{ T("magnet_link") }}">
|
||||
<div class="icon-magnet"></div>
|
||||
</a>
|
||||
{{if .TorrentLink != ""}}
|
||||
<a href="{{.TorrentLink}}" title="{{ T("torrent_file") }}">
|
||||
<div class="icon-floppy"></div>
|
||||
</a>
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="tr-size home-td hide-xs">
|
||||
{{ fileSize(.Filesize, T) }}
|
||||
</td>
|
||||
{{if .LastScrape.IsZero}}
|
||||
<td class="home-td hide-xs" colspan="3">{{ T("unknown")}}</td>
|
||||
{{else}}
|
||||
<td class="tr-se home-td hide-smol">{{.Seeders}}</td>
|
||||
<td class="tr-le home-td hide-smol">{{.Leechers}}</td>
|
||||
<td class="tr-dl home-td hide-xs">{{.Completed}}</td>
|
||||
<a href="{{ URL.Parse("/search?c="+.Category+"_"+ .SubCategory +"&lang=") }}{{ range key, language := .Languages }}{{ language }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}" class="flag flag-{{ (len(.Languages) == 1) ? FlagCode(.Languages[0]) : "multiple" }}" title="{{ range key, language := .Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(.Languages) > 1 && (key+1) < len(.Languages) }},{{ end }}{{ end }}"/>
|
||||
</a>
|
||||
{{end}}
|
||||
<td class="tr-date home-td date-short hide-xs">{{.Date}}</td>
|
||||
</tr>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tr-name home-td"{{ if len(.Comments) == 0 }}colspan="2"{{ end }}>
|
||||
<a href="/view/{{ .ID }}">
|
||||
{{.Name}}
|
||||
</a>
|
||||
</td>
|
||||
{{ if len(.Comments) > 0 }}
|
||||
<td class="tr-cs home-td">
|
||||
<span>{{len(.Comments)}}</span>
|
||||
</td>
|
||||
{{ end }}
|
||||
<td class="tr-links home-td">
|
||||
<a href="{{.Magnet}}" title="{{ T("magnet_link") }}">
|
||||
<div class="icon-magnet"></div>
|
||||
</a>
|
||||
{{if .TorrentLink != ""}}
|
||||
<a href="{{.TorrentLink}}" title="{{ T("torrent_file") }}">
|
||||
<div class="icon-floppy"></div>
|
||||
</a>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td class="tr-size home-td hide-xs">
|
||||
{{ fileSize(.Filesize, T) }}
|
||||
</td>
|
||||
{{if .LastScrape.IsZero}}
|
||||
<td class="home-td hide-xs" colspan="3">{{ T("unknown")}}</td>
|
||||
{{else}}
|
||||
<td class="tr-se home-td hide-smol">{{.Seeders}}</td>
|
||||
<td class="tr-le home-td hide-smol">{{.Leechers}}</td>
|
||||
<td class="tr-dl home-td hide-xs">{{.Completed}}</td>
|
||||
{{end}}
|
||||
<td class="tr-date home-td date-short hide-xs">{{.Date}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{{ if User.HasAdmin() }}
|
||||
<div class="modtools">
|
||||
<button id="show_actions" class="form-input" data-toggle-text="{{ T("hide_mod_tools")}}">{{ T("show_mod_tools")}}</button>
|
||||
<span class="actions">
|
||||
<span class="btn-group">
|
||||
<select class="cb_action" name="category_id" style="width: 14em;">
|
||||
<option value="">{{ T("category")}}</option>
|
||||
{{ range _, cat := GetCategories(true, true) }}
|
||||
<option value="{{ cat.ID }}">{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<input class="cb_action" type="number" name="owner_id" style="width: 10em;" placeholder="{{ T("owner_id_placeholder") }}"/>
|
||||
<select class="cb_action" name="status_id">
|
||||
<option value="">{{ T("torrent_status")}}</option>
|
||||
<option value="5">{{ T("torrent_status_blocked") }}</option>
|
||||
<option value="1">{{ T("torrent_status_normal")}}</option>
|
||||
<option value="2" >{{ T("torrent_status_remake")}}</option>
|
||||
<option value="3">{{ T("trusted")}}</option>
|
||||
<option value="4">A+</option>
|
||||
</select>
|
||||
<button class="cb_action form-input btn-orange" id="edit">{{ T("edit") }}</button>
|
||||
</span>
|
||||
<span class="btn-group">
|
||||
<button class="cb_action form-input btn-red" id="lock_delete">{{ T("lock_delete") }}</button>
|
||||
<button class="cb_action form-input btn-red" id="delete">{{ T("delete") }}</button>
|
||||
</span>
|
||||
<span class="btn-group">
|
||||
<button class="cb_submit form-input btn-green" id="modal_active">{{ T("save_changes") }}</button>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div id="modal_mod_tools" class="modal">
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<span class="close">×</span>
|
||||
<h2>{{ T("following_changes_applied") }}</h2>
|
||||
</div>
|
||||
{{ if User.HasAdmin() }}
|
||||
<div class="modtools">
|
||||
<button id="show_actions" class="form-input" data-toggle-text="{{ T("hide_mod_tools")}}">{{ T("show_mod_tools")}}</button>
|
||||
<span class="actions">
|
||||
<span class="btn-group">
|
||||
<select class="cb_action" name="category_id" style="width: 14em;">
|
||||
<option value="">{{ T("category")}}</option>
|
||||
{{ range _, cat := GetCategories(true, true) }}
|
||||
<option value="{{ cat.ID }}">{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<input class="cb_action" type="number" name="owner_id" style="width: 10em;" placeholder="{{ T("owner_id_placeholder") }}">
|
||||
<select class="cb_action" name="status_id">
|
||||
<option value="">{{ T("torrent_status")}}</option>
|
||||
<option value="5">{{ T("torrent_status_blocked") }}</option>
|
||||
<option value="1">{{ T("torrent_status_normal")}}</option>
|
||||
<option value="2" >{{ T("torrent_status_remake")}}</option>
|
||||
<option value="3">{{ T("trusted")}}</option>
|
||||
<option value="4">A+</option>
|
||||
</select>
|
||||
<button class="cb_action form-input btn-orange" id="edit">{{ T("edit") }}</button>
|
||||
</span>
|
||||
<span class="btn-group">
|
||||
<button class="cb_action form-input btn-red" id="lock_delete">{{ T("lock_delete") }}</button>
|
||||
<button class="cb_action form-input btn-red" id="delete">{{ T("delete") }}</button>
|
||||
</span>
|
||||
<span class="btn-group">
|
||||
<button class="cb_submit form-input btn-green" id="modal_active">{{ T("save_changes") }}</button>
|
||||
</span>
|
||||
</span>
|
||||
<div class="modal-body">
|
||||
<h3>{{ T("changes_in_following_order") }}</h3>
|
||||
<div class="progress-bar" id="progress_modtool" style="display: none;">
|
||||
<div class="progress-green"></div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="logs_mess" style="display: none;"></div>
|
||||
<h2>{{ T("edit_changes") }}</h2>
|
||||
<div class="edit_changes"></div>
|
||||
<h2>{{ T("delete_changes") }}</h2>
|
||||
<div class="delete_changes"></div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div id="modal_mod_tools" class="modal">
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<span class="close">×</span>
|
||||
<h2>{{ T("following_changes_applied") }}</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h3>{{ T("changes_in_following_order") }}</h3>
|
||||
<div class="progress-bar" id="progress_modtool" style="display: none;"><div class="progress-green"></div></div>
|
||||
<hr>
|
||||
<div class="logs_mess" style="display: none;"></div>
|
||||
<h2>{{ T("edit_changes") }}</h2>
|
||||
<div class="edit_changes"></div>
|
||||
<h2>{{ T("delete_changes") }}</h2>
|
||||
<div class="delete_changes"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span><button id="confirm_changes" onclick="TorrentsMod.ApplyChanges();">{{ T("yes")}}</button>
|
||||
<button class="close" onclick="Modal.CloseActive();">{{ T("no")}}</button></span>
|
||||
<h3>{{ T("are_you_sure") }} </h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span>
|
||||
<button id="confirm_changes" onclick="TorrentsMod.ApplyChanges();">{{ T("yes")}}</button>
|
||||
<button class="close" onclick="Modal.CloseActive();">{{ T("no")}}</button>
|
||||
</span>
|
||||
<h3>{{ T("are_you_sure") }} </h3>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{ block footer_js()}}
|
||||
<script type="text/javascript" src="{{ URL.Parse("/js/template.js") }}"></script>
|
||||
|
@ -157,72 +179,72 @@
|
|||
<script type="text/javascript" src="{{ URL.Parse("/js/translation.js") }}"></script>
|
||||
{{ if User.HasAdmin() }}
|
||||
<script type="text/javascript" src="{{ URL.Parse("/js/torrentsMod.js") }}"></script>
|
||||
<script type="text/javascript">
|
||||
// We add translations string
|
||||
T.Add({
|
||||
try_new_attempt: "{{ T("try_new_attempt") }}",
|
||||
query_is_broken: "{{ T("query_is_broken") }}",
|
||||
query_executed_success: "{{ T("query_executed_success") }}",
|
||||
all_operations_done: "{{ T("all_operations_done") }}",
|
||||
refreshing_in: "{{ T("refreshing_in") }}",
|
||||
delete_reports_with_torrents: "{{ T("delete_reports_with_torrents") }}",
|
||||
with_st: "{{ T("with_st") }}",
|
||||
and_reports: "{{ T("and_reports") }}",
|
||||
reports: "{{ T("reports") }}",
|
||||
lock: "{{ T("lock") }}",
|
||||
status_js: "{{ T("status_js") }}",
|
||||
owner_id_js: "{{ T("owner_id_js") }}",
|
||||
category_js: "{{ T("category_js") }}",
|
||||
no_changes: "{{ T("no_changes") }}",
|
||||
query_nb: "{{ T("query_nb") }}"
|
||||
});
|
||||
// Modal initialization
|
||||
Modal.Init({elements: document.getElementsByClassName("modal"),
|
||||
button: "#modal_active",
|
||||
before: function() {
|
||||
TorrentsMod.generatingModal();
|
||||
},
|
||||
close: function() {
|
||||
TorrentsMod.resetModal();
|
||||
}
|
||||
});
|
||||
// Templates initialization
|
||||
Templates.Add("torrents.delete.item", function(torrent) {
|
||||
return '<div class="delete_item" id="list_item_'+torrent.id+'"><span>'+Templates.EncodeEntities(torrent.name)+'</span>'+
|
||||
'<a href="#" onclick="return TorrentsMod.RemoveItemFromQueue('+torrent.key+', '+torrent.id+')"><i class="icon-trash"></i></a></div>'
|
||||
});
|
||||
Templates.Add("torrents.delete.block", function(torrentQuery){
|
||||
return '<div class="delete_list" id="list_'+torrentQuery.unique_id+'"><div class="title">'+
|
||||
'<h3 style="display:inline-block;" onclick="TorrentsMod.toggleList(this);">'+T.r("query_nb", torrentQuery.unique_id)+
|
||||
'</h3>'+
|
||||
'<span class="infos">'+torrentQuery.infos+'<a href="#" class="icon" onclick="return TorrentsMod.RemoveFromQueue('+torrentQuery.key+')"><div class="icon-trash"></div></a>'+
|
||||
'</span></div>'+
|
||||
'<div class="list">'+torrentQuery.list+'</div></div>';
|
||||
});
|
||||
Templates.Add("torrents.edit.item", function(torrent) {
|
||||
return '<div class="edit_item" id="list_item_'+torrent.id+'"><span>'+Templates.EncodeEntities(torrent.name)+'</span>'+
|
||||
'<a href="#" onclick="return TorrentsMod.RemoveItemFromQueue('+torrent.key+', '+torrent.id+')"><i class="icon-trash"></i></a></div>'
|
||||
});
|
||||
Templates.Add("torrents.edit.block", function(torrentQuery){
|
||||
return '<div class="edit_list" id="list_'+torrentQuery.unique_id+'"><div class="title">'+
|
||||
'<h3 style="display:inline-block;" onclick="TorrentsMod.toggleList(this);">'+T.r("query_nb", torrentQuery.unique_id)+
|
||||
'</h3>'+
|
||||
'<span class="infos">'+torrentQuery.infos+'<a href="#" class="icon" onclick="return TorrentsMod.RemoveFromQueue('+torrentQuery.key+')"><div class="icon-trash"></div></a>'+
|
||||
'</span></div>'+
|
||||
'<div class="list">'+torrentQuery.list+'</div></div>';
|
||||
});
|
||||
Templates.Add("torrents.logs.error", function(msg) {
|
||||
return '<div class="error">'+msg+'</div>';
|
||||
});
|
||||
Templates.Add("torrents.logs.success", function(msg) {
|
||||
return '<div class="success">'+msg+'</div>';
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
<!-- JS Template for torrents ajax -->
|
||||
<script type="text/javascript">
|
||||
{{ include "layouts/partials/torrent_item" }}
|
||||
Torrents.LastID = {{ lastID(URL, Models) }};
|
||||
if (Torrents.LastID > 0) Torrents.CanRefresh = true;
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
// We add translations string
|
||||
T.Add({
|
||||
try_new_attempt: "{{ T("try_new_attempt") }}",
|
||||
query_is_broken: "{{ T("query_is_broken") }}",
|
||||
query_executed_success: "{{ T("query_executed_success") }}",
|
||||
all_operations_done: "{{ T("all_operations_done") }}",
|
||||
refreshing_in: "{{ T("refreshing_in") }}",
|
||||
delete_reports_with_torrents: "{{ T("delete_reports_with_torrents") }}",
|
||||
with_st: "{{ T("with_st") }}",
|
||||
and_reports: "{{ T("and_reports") }}",
|
||||
reports: "{{ T("reports") }}",
|
||||
lock: "{{ T("lock") }}",
|
||||
status_js: "{{ T("status_js") }}",
|
||||
owner_id_js: "{{ T("owner_id_js") }}",
|
||||
category_js: "{{ T("category_js") }}",
|
||||
no_changes: "{{ T("no_changes") }}",
|
||||
query_nb: "{{ T("query_nb") }}"
|
||||
});
|
||||
// Modal initialization
|
||||
Modal.Init({elements: document.getElementsByClassName("modal"),
|
||||
button: "#modal_active",
|
||||
before: function() {
|
||||
TorrentsMod.generatingModal();
|
||||
},
|
||||
close: function() {
|
||||
TorrentsMod.resetModal();
|
||||
}
|
||||
});
|
||||
// Templates initialization
|
||||
Templates.Add("torrents.delete.item", function(torrent) {
|
||||
return '<div class="delete_item" id="list_item_'+torrent.id+'"><span>'+Templates.EncodeEntities(torrent.name)+'</span>'+
|
||||
'<a href="#" onclick="return TorrentsMod.RemoveItemFromQueue('+torrent.key+', '+torrent.id+')"><i class="icon-trash"></i></a></div>'
|
||||
});
|
||||
Templates.Add("torrents.delete.block", function(torrentQuery){
|
||||
return '<div class="delete_list" id="list_'+torrentQuery.unique_id+'"><div class="title">'+
|
||||
'<h3 style="display:inline-block;" onclick="TorrentsMod.toggleList(this);">'+T.r("query_nb", torrentQuery.unique_id)+
|
||||
'</h3>'+
|
||||
'<span class="infos">'+torrentQuery.infos+'<a href="#" class="icon" onclick="return TorrentsMod.RemoveFromQueue('+torrentQuery.key+')"><div class="icon-trash"></div></a>'+
|
||||
'</span></div>'+
|
||||
'<div class="list">'+torrentQuery.list+'</div></div>';
|
||||
});
|
||||
Templates.Add("torrents.edit.item", function(torrent) {
|
||||
return '<div class="edit_item" id="list_item_'+torrent.id+'"><span>'+Templates.EncodeEntities(torrent.name)+'</span>'+
|
||||
'<a href="#" onclick="return TorrentsMod.RemoveItemFromQueue('+torrent.key+', '+torrent.id+')"><i class="icon-trash"></i></a></div>'
|
||||
});
|
||||
Templates.Add("torrents.edit.block", function(torrentQuery){
|
||||
return '<div class="edit_list" id="list_'+torrentQuery.unique_id+'"><div class="title">'+
|
||||
'<h3 style="display:inline-block;" onclick="TorrentsMod.toggleList(this);">'+T.r("query_nb", torrentQuery.unique_id)+
|
||||
'</h3>'+
|
||||
'<span class="infos">'+torrentQuery.infos+'<a href="#" class="icon" onclick="return TorrentsMod.RemoveFromQueue('+torrentQuery.key+')"><div class="icon-trash"></div></a>'+
|
||||
'</span></div>'+
|
||||
'<div class="list">'+torrentQuery.list+'</div></div>';
|
||||
});
|
||||
Templates.Add("torrents.logs.error", function(msg) {
|
||||
return '<div class="error">'+msg+'</div>';
|
||||
});
|
||||
Templates.Add("torrents.logs.success", function(msg) {
|
||||
return '<div class="success">'+msg+'</div>';
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
<!-- JS Template for torrents ajax -->
|
||||
<script type="text/javascript">
|
||||
{{ include "layouts/partials/torrent_item" }}
|
||||
Torrents.LastID = {{ lastID(URL, Models) }};
|
||||
if (Torrents.LastID > 0) Torrents.CanRefresh = true;
|
||||
</script>
|
||||
{{end}}
|
||||
|
|
|
@ -4,22 +4,30 @@
|
|||
{{block title()}}{{ T("report_torrent_number", Form.ID) }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="box">
|
||||
<div class="user-form">
|
||||
<h1>{{ T("report_torrent_number", Form.ID) }}</h1>
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<div style="text-align:left">
|
||||
<h3>{{ T("report_type") }}</h3>
|
||||
<input type="radio" name="report_type" value="illegal_content" id="illegal" required> <label for="illegal">{{ T("illegal_content") }}</label><br />
|
||||
<input type="radio" name="report_type" value="spam_garbage" id="spam" required> <label for="spam">{{ T("spam_garbage") }}</label><br />
|
||||
<input type="radio" name="report_type" value="wrong_category" id="wrongcat" required> <label for="wrongcat">{{ T("wrong_category") }}</label><br />
|
||||
<input type="radio" name="report_type" value="duplicate_deprecated" id="dup" required> <label for="dup">{{ T("duplicate_deprecated") }}</label><br />
|
||||
</div>
|
||||
<div class="comment-captcha">
|
||||
{{yield captcha(captchaid=Form.CaptchaID)}}
|
||||
</div>
|
||||
<input id="confirm_changes" class="form-input up-input btn-green" name="submit_report" type="submit" value="{{ T("yes")}}">
|
||||
</form>
|
||||
</div>
|
||||
<div class="user-form">
|
||||
<h1>{{ T("report_torrent_number", Form.ID) }}</h1>
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<div style="text-align:left">
|
||||
<h3>{{ T("report_type") }}</h3>
|
||||
<input type="radio" name="report_type" value="illegal_content" id="illegal" required/>
|
||||
<label for="illegal">{{ T("illegal_content") }}</label>
|
||||
<br />
|
||||
<input type="radio" name="report_type" value="spam_garbage" id="spam" required/>
|
||||
<label for="spam">{{ T("spam_garbage") }}</label>
|
||||
<br />
|
||||
<input type="radio" name="report_type" value="wrong_category" id="wrongcat" required/>
|
||||
<label for="wrongcat">{{ T("wrong_category") }}</label>
|
||||
<br />
|
||||
<input type="radio" name="report_type" value="duplicate_deprecated" id="dup" required/>
|
||||
<label for="dup">{{ T("duplicate_deprecated") }}</label>
|
||||
<br />
|
||||
</div>
|
||||
<div class="comment-captcha">
|
||||
{{yield captcha(captchaid=Form.CaptchaID)}}
|
||||
</div>
|
||||
<input id="confirm_changes" class="form-input up-input btn-green" name="submit_report" type="submit" value="{{ T("yes")}}"/>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -6,141 +6,183 @@
|
|||
{{block title()}}{{ T("upload")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div style="text-align: left;" class="box">
|
||||
{{ yield ruleList() }}
|
||||
<form enctype="multipart/form-data" role="upload" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<h3>{{ T("name")}}</h3>
|
||||
<input type="text" name="name" id="name" class="form-input up-input form-torrent-name" placeholder="{{ T("file_name")}}" value="{{Form.Name}}" autofocus>
|
||||
{{ yield errors(name="name")}}
|
||||
|
||||
<div class="torrent-preview-table" style="display: none;"><center><h3 style="margin-bottom: 3px;">{{ T("torrent_preview")}}</h3></center>
|
||||
<table>
|
||||
<thead class="torrent-info table-torrent-thead">
|
||||
{{ yield ruleList() }}
|
||||
<form enctype="multipart/form-data" role="upload" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<h3>{{ T("name")}}</h3>
|
||||
<input type="text" name="name" id="name" class="form-input up-input form-torrent-name" placeholder="{{ T("file_name")}}" value="{{Form.Name}}" autofocus>
|
||||
{{ yield errors(name="name")}}
|
||||
|
||||
<div class="torrent-preview-table" style="display: none;"><center><h3 style="margin-bottom: 3px;">{{ T("torrent_preview")}}</h3></center>
|
||||
<table>
|
||||
<thead class="torrent-info table-torrent-thead">
|
||||
<tr>
|
||||
<th class="tr-cat">Category</th>
|
||||
<th class="tr-name">Name<span class="sort-arrows"><span class="sortarrowleft sortarrowdim">▼</span><span class="sortarrowdim">▲</span></span></th>
|
||||
<th class="tr-cs"></th>
|
||||
<th class="tr-links"></th>
|
||||
<th class="tr-size hide-xs">Size<span class="sort-arrows"><span class="sortarrowleft sortarrowdim">▼</span><span class="sortarrowdim">▲</span></span></th>
|
||||
<th class="tr-se hide-smol">S<span class="sort-arrows"><span class="sortarrowleft sortarrowdim">▼</span><span class="sortarrowdim">▲</span></span></th>
|
||||
<th class="tr-le hide-smol">L<span class="sort-arrows"><span class="sortarrowleft sortarrowdim">▼</span><span class="sortarrowdim">▲</span></span></th>
|
||||
<th class="tr-dl hide-xs">D<span class="sort-arrows"><span class="sortarrowleft sortarrowdim">▼</span><span class="sortarrowdim">▲</span></span></th>
|
||||
<th class="tr-date hide-xs">Date<span class="sort-arrows"><span class="sortarrowleft ">▼</span><span class="sortarrowdim">▲</span></span></th>
|
||||
<th class="tr-cat">Category</th>
|
||||
<th class="tr-name">
|
||||
Name
|
||||
<span class="sort-arrows">
|
||||
<span class="sortarrowleft sortarrowdim">▼</span>
|
||||
<span class="sortarrowdim">▲</span>
|
||||
</span>
|
||||
</th>
|
||||
<th class="tr-cs"></th>
|
||||
<th class="tr-links"></th>
|
||||
<th class="tr-size hide-xs">
|
||||
Size
|
||||
<span class="sort-arrows">
|
||||
<span class="sortarrowleft sortarrowdim">▼</span>
|
||||
<span class="sortarrowdim">▲</span>
|
||||
</span>
|
||||
</th>
|
||||
<th class="tr-se hide-smol">
|
||||
S
|
||||
<span class="sort-arrows">
|
||||
<span class="sortarrowleft sortarrowdim">▼</span>
|
||||
<span class="sortarrowdim">▲</span>
|
||||
</span>
|
||||
</th>
|
||||
<th class="tr-le hide-smol">
|
||||
L
|
||||
<span class="sort-arrows">
|
||||
<span class="sortarrowleft sortarrowdim">▼</span>
|
||||
<span class="sortarrowdim">▲</span>
|
||||
</span>
|
||||
</th>
|
||||
<th class="tr-dl hide-xs">
|
||||
D
|
||||
<span class="sort-arrows">
|
||||
<span class="sortarrowleft sortarrowdim">▼</span>
|
||||
<span class="sortarrowdim">▲</span>
|
||||
</span>
|
||||
</th>
|
||||
<th class="tr-date hide-xs">
|
||||
Date
|
||||
<span class="sort-arrows">
|
||||
<span class="sortarrowleft ">▼</span>
|
||||
<span class="sortarrowdim">▲</span>
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="torrentListResults">
|
||||
<tr class="torrent-info hidden">
|
||||
<td class="tr-cat home-td"></td>
|
||||
<td class="tr-name home-td" colspan="2"><a></a></td>
|
||||
<td class="tr-links home-td"></td>
|
||||
<td class="tr-size home-td hide-xs"></td>
|
||||
<td class="tr-se home-td hide-smol"></td>
|
||||
<td class="tr-le home-td hide-smol"></td>
|
||||
<td class="tr-dl home-td hide-xs"></td>
|
||||
<td class="hide-xs"></td>
|
||||
</tr>
|
||||
<tr name="torrent-info tr" class="torrent-info{{ if User.IsTrusted() }} trusted{{end}}">
|
||||
<td class="tr-cat home-td">
|
||||
<div class="nyaa-cat table-torrent-category">
|
||||
<a class="category"></a>
|
||||
<a><img src="/img/blank.gif" class="flag flag-other table-torrent-flag"></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tr-name home-td" colspan="2"><a class="table-torrent-name">{{Form.Name}}</a></td>
|
||||
|
||||
<td class="tr-links home-td">
|
||||
<a title="Magnet Link"><div class="icon-magnet"></div></a>
|
||||
<a title="Torrent file"><div class="icon-floppy"></div></a>
|
||||
</td>
|
||||
<td class="tr-size home-td hide-xs">570.4 MiB</td>
|
||||
<td class="tr-se home-td hide-smol">0</td>
|
||||
<td class="tr-le home-td hide-smol">0</td>
|
||||
<td class="tr-dl home-td hide-xs">0</td>
|
||||
<td class="tr-date home-td date-short hide-xs table-torrent-date" title="2017-07-12T16:58:29Z">Jul 12, 2017</td>
|
||||
</tr>
|
||||
<tr class="torrent-info hidden">
|
||||
<td class="tr-cat home-td"></td>
|
||||
<td class="tr-name home-td" colspan="2"><a></a></td>
|
||||
<td class="tr-links home-td"></td>
|
||||
<td class="tr-size home-td hide-xs"></td>
|
||||
<td class="tr-se home-td hide-smol"></td>
|
||||
<td class="tr-le home-td hide-smol"></td>
|
||||
<td class="tr-dl home-td hide-xs"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
</thead>
|
||||
<tbody id="torrentListResults">
|
||||
<tr class="torrent-info hidden">
|
||||
<td class="tr-cat home-td"></td>
|
||||
<td class="tr-name home-td" colspan="2"><a></a></td>
|
||||
<td class="tr-links home-td"></td>
|
||||
<td class="tr-size home-td hide-xs"></td>
|
||||
<td class="tr-se home-td hide-smol"></td>
|
||||
<td class="tr-le home-td hide-smol"></td>
|
||||
<td class="tr-dl home-td hide-xs"></td>
|
||||
<td class="hide-xs"></td>
|
||||
</tr>
|
||||
<tr name="torrent-info tr" class="torrent-info{{ if User.IsTrusted() }} trusted{{end}}">
|
||||
<td class="tr-cat home-td">
|
||||
<div class="nyaa-cat table-torrent-category">
|
||||
<a class="category"></a>
|
||||
<a><img src="/img/blank.gif" class="flag flag-other table-torrent-flag" alt="blank"></a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tr-name home-td" colspan="2">
|
||||
<a class="table-torrent-name">{{Form.Name}}</a>
|
||||
</td>
|
||||
|
||||
<h3>{{ T("torrent_file")}}</h3>
|
||||
<input type="file" name="torrent" id="torrent" class="up-input" accept=".torrent">
|
||||
<p>{{ T("uploading_file_prefills_fields")}}</p>
|
||||
{{ yield errors(name="torrent")}}
|
||||
<td class="tr-links home-td">
|
||||
<a title="Magnet Link">
|
||||
<div class="icon-magnet"></div>
|
||||
</a>
|
||||
<a title="Torrent file">
|
||||
<div class="icon-floppy"></div>
|
||||
</a>
|
||||
</td>
|
||||
<td class="tr-size home-td hide-xs">570.4 MiB</td>
|
||||
<td class="tr-se home-td hide-smol">0</td>
|
||||
<td class="tr-le home-td hide-smol">0</td>
|
||||
<td class="tr-dl home-td hide-xs">0</td>
|
||||
<td class="tr-date home-td date-short hide-xs table-torrent-date" title="2017-07-12T16:58:29Z">Jul 12, 2017</td>
|
||||
</tr>
|
||||
<tr class="torrent-info hidden">
|
||||
<td class="tr-cat home-td"></td>
|
||||
<td class="tr-name home-td" colspan="2"><a></a></td>
|
||||
<td class="tr-links home-td"></td>
|
||||
<td class="tr-size home-td hide-xs"></td>
|
||||
<td class="tr-se home-td hide-smol"></td>
|
||||
<td class="tr-le home-td hide-smol"></td>
|
||||
<td class="tr-dl home-td hide-xs"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table></div>
|
||||
|
||||
<h3>{{ T("magnet_link")}}</h3>
|
||||
<input type="text" name="magnet" id="magnet" class="form-input up-input" placeholder="{{ T("magnet_link")}}" value="{{Form.Magnet}}">
|
||||
<p>{{ T("please_include_our_tracker") }}</p>
|
||||
{{ yield errors(name="magnet")}}
|
||||
<h3>{{ T("torrent_file")}}</h3>
|
||||
<input type="file" name="torrent" id="torrent" class="up-input" accept=".torrent"/>
|
||||
<p>{{ T("uploading_file_prefills_fields")}}</p>
|
||||
{{ yield errors(name="torrent")}}
|
||||
|
||||
<h3>{{ T("category")}}</h3>
|
||||
<select name="c" id="c" class="form-input up-input form-torrent-category" required>
|
||||
<option value="">{{ T("select_a_torrent_category")}}</option>
|
||||
{{ range _, cat := GetCategories(false, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Form.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
{{ yield errors(name="c")}}
|
||||
<h3>{{ T("magnet_link")}}</h3>
|
||||
<input type="text" name="magnet" id="magnet" class="form-input up-input" placeholder="{{ T("magnet_link")}}" value="{{Form.Magnet}}"/>
|
||||
<p>{{ T("please_include_our_tracker") }}</p>
|
||||
{{ yield errors(name="magnet")}}
|
||||
|
||||
<h3>{{ T("torrent_language") }}</h3>
|
||||
<div name="language" class="form-input language">
|
||||
{{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages, inputname="languages", id="upload-lang")}}
|
||||
</div>
|
||||
<p class="not-important">{{ T("language_not_mandatory") }}</p>
|
||||
{{ yield errors(name="language")}}
|
||||
<h3>{{ T("category")}}</h3>
|
||||
<select name="c" id="c" class="form-input up-input form-torrent-category" required>
|
||||
<option value="">{{ T("select_a_torrent_category")}}</option>
|
||||
{{ range _, cat := GetCategories(false, true) }}
|
||||
<option value="{{ cat.ID }}" {{if Form.Category == cat.ID }}selected{{end}}>{{ T(cat.Name) }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
{{ yield errors(name="c")}}
|
||||
|
||||
<p>
|
||||
<input type="checkbox" value="true" name="remake" id="remake" class="form-torrent-remake">
|
||||
<label for="remake">{{ T("mark_as_remake")}}</label>
|
||||
</p>
|
||||
{{ yield errors(name="remake")}}
|
||||
<h3>{{ T("torrent_language") }}</h3>
|
||||
<div name="language" class="form-input language">
|
||||
{{ yield flagList(languages=GetTorrentLanguages(), selected=Form.Languages, inputname="languages", id="upload-lang")}}
|
||||
</div>
|
||||
<p class="not-important">{{ T("language_not_mandatory") }}</p>
|
||||
{{ yield errors(name="language")}}
|
||||
|
||||
{{ if User.ID > 0 }}
|
||||
<p>
|
||||
<input type="checkbox" value="true" name="hidden" id="hidden" class="form-torrent-hidden">
|
||||
<label for="hidden">{{ T("upload_as_anon")}}</label>
|
||||
</p>
|
||||
{{ yield errors(name="hidden")}}
|
||||
{{ end }}
|
||||
<h3>{{ T("website_link")}}</h3>
|
||||
<input name="website_link" id="website_link" class="form-input up-input" type="text" value="{{Form.WebsiteLink}}">
|
||||
{{ yield errors(name="website_link")}}
|
||||
<p>
|
||||
<input type="checkbox" value="true" name="remake" id="remake" class="form-torrent-remake"/>
|
||||
<label for="remake">{{ T("mark_as_remake")}}</label>
|
||||
</p>
|
||||
{{ yield errors(name="remake")}}
|
||||
|
||||
<h3>{{ T("torrent_description")}}</h3>
|
||||
<p>{{ T("description_markdown_notice")}}</p>
|
||||
<textarea name="desc" id="desc" class="form-input up-input" style="height: 10rem;">{{Form.Description}}</textarea>
|
||||
{{ yield errors(name="desc")}}
|
||||
<div style="width: 240px">
|
||||
{{yield captcha(captchaid=Form.CaptchaID)}}
|
||||
</div>
|
||||
<input type="hidden" id="IsUploadingToSukebei" value="{{ if Sukebei}}yes{{end}}">
|
||||
{{ yield errors(name="captchaID")}}
|
||||
<button type="submit" class="form-input up-btn">{{ T("upload")}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ block footer_js()}}
|
||||
<script type="text/javascript" src="/js/query.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript" src="/js/translation.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript" src="/js/template.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript" src="/js/kilo.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript" src="/js/simplemde.min.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript">
|
||||
{{ include "layouts/partials/torrent_item_upload" }}
|
||||
var preview = new Kilo({
|
||||
userTrusted: {{User.IsTrusted()}},
|
||||
listContext: true,
|
||||
sukebei: {{ if Sukebei() }}true{{else}}0{{end}}
|
||||
{{ if User.ID > 0 }}, isMember: true{{end}} })
|
||||
preview.render()
|
||||
</script>
|
||||
<script type="text/javascript">new SimpleMDE({ element: document.getElementById("desc"), spellChecker: false, showIcons: [ "strikethrough", "code", "table", "horizontal-rule" ] });</script>
|
||||
{{end}}
|
||||
{{ if User.ID > 0 }}
|
||||
<p>
|
||||
<input type="checkbox" value="true" name="hidden" id="hidden" class="form-torrent-hidden"/>
|
||||
<label for="hidden">{{ T("upload_as_anon")}}</label>
|
||||
</p>
|
||||
{{ yield errors(name="hidden")}}
|
||||
{{ end }}
|
||||
<h3>{{ T("website_link")}}</h3>
|
||||
<input name="website_link" id="website_link" class="form-input up-input" type="text" value="{{Form.WebsiteLink}}"/>
|
||||
{{ yield errors(name="website_link")}}
|
||||
|
||||
<h3>{{ T("torrent_description")}}</h3>
|
||||
<p>{{ T("description_markdown_notice")}}</p>
|
||||
<textarea name="desc" id="desc" class="form-input up-input" style="height: 10rem;">{{Form.Description}}</textarea>
|
||||
{{ yield errors(name="desc")}}
|
||||
<div style="width: 240px">
|
||||
{{yield captcha(captchaid=Form.CaptchaID)}}
|
||||
</div>
|
||||
<input type="hidden" id="IsUploadingToSukebei" value="{{ if Sukebei}}yes{{end}}"/>
|
||||
{{ yield errors(name="captchaID")}}
|
||||
<button type="submit" class="form-input up-btn">{{ T("upload")}}</button>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ block footer_js()}}
|
||||
<script type="text/javascript" src="/js/query.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript" src="/js/translation.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript" src="/js/template.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript" src="/js/kilo.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript" src="/js/simplemde.min.js?v={{ Config.Version}}{{ Config.Build }}"></script>
|
||||
<script type="text/javascript">
|
||||
{{ include "layouts/partials/torrent_item_upload" }}
|
||||
var preview = new Kilo({
|
||||
userTrusted: {{User.IsTrusted()}},
|
||||
listContext: true,
|
||||
sukebei: {{ if Sukebei() }}true{{else}}0{{end}}
|
||||
{{ if User.ID > 0 }}, isMember: true{{end}} })
|
||||
preview.render()
|
||||
</script>
|
||||
<script type="text/javascript">new SimpleMDE({ element: document.getElementById("desc"), spellChecker: false, showIcons: [ "strikethrough", "code", "table", "horizontal-rule" ] });</script>
|
||||
{{end}}
|
||||
|
|
|
@ -5,51 +5,77 @@
|
|||
{{block title()}}{{Torrent.Name}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div style="text-align: left;" class="box">
|
||||
<div id="torrent-name" class="{{if Torrent.Status == 2}}remake{{else if Torrent.Status == 3}}trusted{{else if Torrent.Status == 4}}aplus{{end}}">
|
||||
<h1 style="text-align: center;" class="torrent-hr">{{Torrent.Name}}</h1>
|
||||
</div>
|
||||
<br>
|
||||
<div id="torrent-name" class="{{if Torrent.Status == 2}}remake{{else if Torrent.Status == 3}}trusted{{else if Torrent.Status == 4}}aplus{{end}}">
|
||||
<h1 style="text-align: center;" class="torrent-hr">{{Torrent.Name}}</h1>
|
||||
</div>
|
||||
<br/>
|
||||
<table>
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("category") }}:</td><td class="torrent-info-td torrent-info-data" style="padding:0"><a href="{{URL.Parse("/search?c="+Torrent.Category+"_"+Torrent.SubCategory) }}">{{ T(CategoryName(Torrent.Category, Torrent.SubCategory)) }}</a> <br></td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("date") }}:</td><td class="torrent-info-td date-full">{{Torrent.Date}}</td>
|
||||
</tr>
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("uploaded_by") }}:</td><td class="torrent-view-td torrent-info-data">{{ genUploaderLink(Torrent.UploaderID, Torrent.UploaderName, Torrent.Hidden)|raw }}</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("seeders")}}:</td><td class="tr-se torrent-info-td">{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Seeders}}{{end}}</td>
|
||||
</tr>
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("website_link") }}:</td><td class="torrent-view-td torrent-info-data">{{if Torrent.WebsiteLink != ""}}<a href="{{Torrent.WebsiteLink}}">{{Torrent.WebsiteLink}}</a>{{else}}N/A{{end}}</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("leechers")}}:</td><td class="tr-le torrent-info-td">{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Leechers}}{{end}}</td>
|
||||
</tr>
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("hash")}}:</td><td style="font-family: monospace;" class="torrent-view-td torrent-info-data">{{Torrent.Hash}}</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("completed")}}:</td><td class="torrent-info-td"><b>{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Completed}}{{end}}</b></td>
|
||||
</tr>
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("size")}}:</td><td class="torrent-view-td torrent-info-data">{{ fileSize(Torrent.Filesize, T) }}</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("last_scraped")}}</td><td class="torrent-info-td{{if !Torrent.LastScrape.IsZero}} date-full">{{formatDateRFC(Torrent.LastScrape)}}{{else}}">{{ T("unknown")}}{{end}}</td>
|
||||
</tr>
|
||||
{{ if len(Torrent.Languages) > 0 && Torrent.Languages[0] != "" }}
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("torrent_language")}}:</td>
|
||||
<td class="tr-flag torrent-view-td torrent-info-data">
|
||||
{{ range _, language := Torrent.Languages}}
|
||||
{{ if language != "" }}
|
||||
<span {{ if len(Torrent.Languages) > 5 }}class="big"{{ end }}><img src="/img/blank.gif" alt="{{ LanguageNameFromCode(language, T) }}" class="flag flag-{{ FlagCode(language) }}" title="{{ LanguageNameFromCode(language, T) }}"></img> {{ LanguageNameFromCode(language, T) }}</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("category") }}:</td>
|
||||
<td class="torrent-info-td torrent-info-data" style="padding:0">
|
||||
<a href="{{URL.Parse("/search?c="+Torrent.Category+"_"+Torrent.SubCategory) }}">{{ T(CategoryName(Torrent.Category, Torrent.SubCategory)) }}</a>
|
||||
<br/>
|
||||
</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("date") }}:</td>
|
||||
<td class="torrent-info-td date-full">{{Torrent.Date}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("uploaded_by") }}:</td>
|
||||
<td class="torrent-view-td torrent-info-data">{{ genUploaderLink(Torrent.UploaderID, Torrent.UploaderName, Torrent.Hidden)|raw }}</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("seeders")}}:</td>
|
||||
<td class="tr-se torrent-info-td">{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Seeders}}{{end}}</td>
|
||||
</tr>
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("website_link") }}:</td>
|
||||
<td class="torrent-view-td torrent-info-data">
|
||||
{{if Torrent.WebsiteLink != ""}}
|
||||
<a href="{{Torrent.WebsiteLink}}">{{Torrent.WebsiteLink}}</a>
|
||||
{{else}}N/A{{end}}
|
||||
</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("leechers")}}:</td>
|
||||
<td class="tr-le torrent-info-td">{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Leechers}}{{end}}</td>
|
||||
</tr>
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("hash")}}:</td>
|
||||
<td style="font-family: monospace;" class="torrent-view-td torrent-info-data">{{Torrent.Hash}}</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("completed")}}:</td>
|
||||
<td class="torrent-info-td">
|
||||
<b>{{if Torrent.LastScrape.IsZero}}{{ T("unknown")}}{{else}}{{Torrent.Completed}}{{end}}</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("size")}}:</td>
|
||||
<td class="torrent-view-td torrent-info-data">{{ fileSize(Torrent.Filesize, T) }}</td>
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("last_scraped")}}</td>
|
||||
<td class="torrent-info-td{{if !Torrent.LastScrape.IsZero}} date-full">{{formatDateRFC(Torrent.LastScrape)}}{{else}}">{{ T("unknown")}}{{end}}</td>
|
||||
</tr>
|
||||
{{ if len(Torrent.Languages) > 0 && Torrent.Languages[0] != "" }}
|
||||
<tr class="torrent-info-row">
|
||||
<td class="torrent-info-td torrent-info-label">{{ T("torrent_language")}}:</td>
|
||||
<td class="tr-flag torrent-view-td torrent-info-data">
|
||||
{{ range _, language := Torrent.Languages}}
|
||||
{{ if language != "" }}
|
||||
<span {{ if len(Torrent.Languages) > 5 }}class="big"{{ end }}>
|
||||
<img src="/img/blank.gif" alt="{{ LanguageNameFromCode(language, T) }}" class="flag flag-{{ FlagCode(language) }}" title="{{ LanguageNameFromCode(language, T) }}"></img>
|
||||
{{ LanguageNameFromCode(language, T) }}
|
||||
</span>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<div class="torrent-buttons">
|
||||
<a href="{{Torrent.Magnet}}" class="form-input btn-green download" style="float:left;height: auto;margin-right: 0.5em;"><div class="icon-magnet"></div> {{ T("magnet_link")}}</a>
|
||||
{{ if Torrent.TorrentLink != ""}}
|
||||
<a href="{{Torrent.TorrentLink}}" class="form-input download" style="float:left;height: auto;"><div class="icon-floppy"></div> {{ T("torrent_file")}}</a>
|
||||
{{end}}
|
||||
{{ if User.ID > 0}}
|
||||
<a id="reportPopup" href="#" class="form-input">{{ T("report_btn") }}</a>
|
||||
<div class="torrent-buttons">
|
||||
<a href="{{Torrent.Magnet}}" class="form-input btn-green download" style="float:left;height: auto;margin-right: 0.5em;">
|
||||
<div class="icon-magnet"></div> {{ T("magnet_link")}}
|
||||
</a>
|
||||
{{ if Torrent.TorrentLink != ""}}
|
||||
<a href="{{Torrent.TorrentLink}}" class="form-input download" style="float:left;height: auto;">
|
||||
<div class="icon-floppy"></div> {{ T("torrent_file")}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{ if User.ID > 0}}
|
||||
<a id="reportPopup" href="#" class="form-input">{{ T("report_btn") }}</a>
|
||||
{{ if User.HasAdmin()}}
|
||||
<a href="/mod/torrent/delete?id={{ Torrent.ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;">{{ T("delete") }}</a>
|
||||
<a href="/mod/torrent?id={{ Torrent.ID }}" class="form-input btn-orange">{{ T("edit") }}</a>
|
||||
|
@ -57,7 +83,7 @@
|
|||
<a href="/torrent/delete?id={{ Torrent.ID }}" class="form-input btn-red" onclick="if (!confirm('{{ T("are_you_sure") }}')) return false;">{{ T("delete") }}</a>
|
||||
<a href="/torrent?id={{ Torrent.ID }}" class="form-input btn-orange">{{ T("edit") }}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
<p class="torrent-hr">{{ T("description")}}</p>
|
||||
|
@ -66,8 +92,10 @@
|
|||
{{else}}
|
||||
<p>{{ T("no_description") }}</p>
|
||||
{{end}}
|
||||
<input type="checkbox" id="show-filelist" {{if len(Torrent.FileList) < 4 && len(Torrent.FileList) > 1}}checked{{end}}>
|
||||
<label class="torrent-hr filelist-control{{if len(Torrent.FileList) == 0}} hidden{{end}}" for="show-filelist">{{ T("files")}}</label>
|
||||
<input type="checkbox" id="show-filelist" {{if len(Torrent.FileList) < 4 && len(Torrent.FileList) > 1}}checked{{end}}/>
|
||||
<label class="torrent-hr filelist-control{{if len(Torrent.FileList) == 0}} hidden{{end}}" for="show-filelist">
|
||||
{{ T("files")}}
|
||||
</label>
|
||||
<div class="torrent-info-box{{if len(Torrent.FileList) == 0}} hidden{{end}}" id="filelist">
|
||||
{{ if len(Torrent.FileList) > 0 }}
|
||||
{* how do i concat lol *}
|
||||
|
@ -81,72 +109,81 @@
|
|||
</tbody>
|
||||
</table>
|
||||
{{ else }}
|
||||
<p>{{ T("no_files") }}</p>
|
||||
<p>{{ T("no_files") }}</p>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
||||
<p class="torrent-hr">{{ T("comments")}}</p>
|
||||
{{range index, element := Torrent.Comments}}
|
||||
<div class="torrent-info-box comment-box">
|
||||
<span class="comment-index"><a href="#comment_{{index}}">#{{index}}</a><small style="padding-left: 4px;" class="date-short">{{formatDateRFC(element.Date)}}</small></span>
|
||||
<p>{{element.Username}}</p>
|
||||
<p>{{element.Content|raw}}</p>
|
||||
<span class="comment-index">
|
||||
<a href="#comment_{{index}}">#{{index}}</a>
|
||||
<small style="padding-left: 4px;" class="date-short">{{formatDateRFC(element.Date)}}</small>
|
||||
</span>
|
||||
<p>{{element.Username}}</p>
|
||||
<p>{{element.Content|raw}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
<div style="margin-top: 10px" class="torrent-info-box">
|
||||
<form method="post">
|
||||
{{ yield csrf_field()}}
|
||||
<div class="comment-form">
|
||||
<div class="comment-text">
|
||||
<h3>{{ if User.ID > 0}} {{ T("submit_a_comment_as_username", User.Username) }} {{else}} {{ T("submit_a_comment_as_anonymous")|raw}} {{end}}</h3>
|
||||
<textarea style="height: 10rem;" placeholder="サンキュー" name="comment" class="form-input up-input"></textarea>
|
||||
</div>
|
||||
<div class="comment-captcha">
|
||||
{{ yield captcha(captchaid=CaptchaID)}}
|
||||
</div>
|
||||
<button type="submit" class="form-input up-btn">{{ T("submit") }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{ if User.ID > 0 }}
|
||||
<!-- Modal -->
|
||||
<div id="modal_mod_tools" class="modal">
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content">
|
||||
<form method="post" action="/report/{{Torrent.ID}}">
|
||||
<div class="modal-header">
|
||||
<span class="close">×</span>
|
||||
<h2>{{ T("report_torrent_number", Torrent.ID) }}</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4>{{ T("report_type") }}</h4>
|
||||
{{ yield csrf_field() }}
|
||||
<input type="radio" name="report_type" value="illegal_content" id="illegal" required> <label for="illegal">{{ T("illegal_content") }}</label><br />
|
||||
<input type="radio" name="report_type" value="spam_garbage" id="spam" required> <label for="spam">{{ T("spam_garbage") }}</label><br />
|
||||
<input type="radio" name="report_type" value="wrong_category" id="wrongcat" required> <label for="wrongcat">{{ T("wrong_category") }}</label><br />
|
||||
<input type="radio" name="report_type" value="duplicate_deprecated" id="dup" required> <label for="dup">{{ T("duplicate_deprecated") }}</label><br />
|
||||
<div class="comment-captcha">
|
||||
{{yield captcha(captchaid=CaptchaID)}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span><button id="confirm_changes" type="submit">{{ T("yes")}}</button>
|
||||
<button class="close" onclick="Modal.CloseActive();">{{ T("no")}}</button></span>
|
||||
<h3>{{ T("are_you_sure") }} </h3>
|
||||
</div>
|
||||
</form>
|
||||
{{ yield csrf_field()}}
|
||||
<div class="comment-form">
|
||||
<div class="comment-text">
|
||||
<h3>{{ if User.ID > 0}} {{ T("submit_a_comment_as_username", User.Username) }} {{else}} {{ T("submit_a_comment_as_anonymous")|raw}} {{end}}</h3>
|
||||
<textarea style="height: 10rem;" placeholder="サンキュー" name="comment" class="form-input up-input"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="comment-captcha">
|
||||
{{ yield captcha(captchaid=CaptchaID)}}
|
||||
</div>
|
||||
<button type="submit" class="form-input up-btn">{{ T("submit") }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{ if User.ID > 0 }}
|
||||
<!-- Modal -->
|
||||
<div id="modal_mod_tools" class="modal">
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content">
|
||||
<form method="post" action="/report/{{Torrent.ID}}">
|
||||
<div class="modal-header">
|
||||
<span class="close">×</span>
|
||||
<h2>{{ T("report_torrent_number", Torrent.ID) }}</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h4>{{ T("report_type") }}</h4>
|
||||
{{ yield csrf_field() }}
|
||||
<input type="radio" name="report_type" value="illegal_content" id="illegal" required/>
|
||||
<label for="illegal">{{ T("illegal_content") }}</label><br />
|
||||
<input type="radio" name="report_type" value="spam_garbage" id="spam" required/>
|
||||
<label for="spam">{{ T("spam_garbage") }}</label><br />
|
||||
<input type="radio" name="report_type" value="wrong_category" id="wrongcat" required/>
|
||||
<label for="wrongcat">{{ T("wrong_category") }}</label><br />
|
||||
<input type="radio" name="report_type" value="duplicate_deprecated" id="dup" required/>
|
||||
<label for="dup">{{ T("duplicate_deprecated") }}</label><br />
|
||||
<div class="comment-captcha">
|
||||
{{yield captcha(captchaid=CaptchaID)}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<span>
|
||||
<button id="confirm_changes" type="submit">{{ T("yes")}}</button>
|
||||
<button class="close" onclick="Modal.CloseActive();">{{ T("no")}}</button>
|
||||
</span>
|
||||
<h3>{{ T("are_you_sure") }} </h3>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{ block footer_js()}}
|
||||
<script type="text/javascript" src="{{ URL.Parse("/js/modal.js") }}"></script>
|
||||
<script type="text/javascript">
|
||||
// Modal initialization
|
||||
Modal.Init({
|
||||
elements: document.getElementsByClassName("modal"),
|
||||
button: "#reportPopup"
|
||||
});
|
||||
// Modal initialization
|
||||
Modal.Init({
|
||||
elements: document.getElementsByClassName("modal"),
|
||||
button: "#reportPopup"
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
|
|
|
@ -4,153 +4,180 @@
|
|||
{{block title()}}{{ T("profile_edit_page", UserProfile.Username) }}{{end}}
|
||||
{{ block profile_navigation()}}{{ yield profile_menu(route="profile_edit") }}{{end}}
|
||||
{{block profile_content()}}
|
||||
<h3>{{ T("personal_info")}}</h3>
|
||||
<div class="user-edit">
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field()}}
|
||||
<label class="input-label">{{ T("api_token") }}:</label>
|
||||
<p style="font-family: monospace;">{{UserProfile.APIToken}}</p>
|
||||
<a class="form-input up-input" href="/user/{{ UserProfile.ID}}/{{UserProfile.Username }}/apireset">Reset API key</a><br><br>
|
||||
<a href="/apidoc">{{ T("api_documentation")}}</a>
|
||||
<br>
|
||||
<label class="input-label">{{ T("email_address") }}:</label> <br>
|
||||
<input class="form-input up-input" placeholder="{{ T("email_placeholder")}}" type="text" name="email" id="email" value="{{UserProfile.Email}}"> <br>
|
||||
{{ yield errors(name="Email")}}
|
||||
<label class="input-label">{{ T("language")}}:</label> <br>
|
||||
<select id="language" name="language" class="form-input up-input">
|
||||
{{ userLanguage := UserProfile.Language }}
|
||||
{{ range _, language := Languages }}
|
||||
<option value="{{ language.Tag }}" {{ if userLanguage == language.Tag || userLanguage == language.Code || ((userLanguage == "") && (language.Tag == getDefaultLanguage())) }}selected{{end}}>{{ language.Name }} {{if language.Tag == getDefaultLanguage()}}({{ T("default") }}){{end}}</option>
|
||||
{{ end }}
|
||||
</select> <br>
|
||||
{{ yield errors(name="Language")}}
|
||||
{{ if !User.HasAdmin()}}
|
||||
<label class="input-label">{{ T("current_password")}}:</label> <br>
|
||||
<input class="form-input up-input up-input" name="current_password" id="current_password" type="password"> <br>
|
||||
{{ yield errors(name="CurrentPassword")}}
|
||||
{{end}}
|
||||
<label class="input-label">{{ T("password")}}:</label> <br>
|
||||
<input class="form-input up-input up-input" name="password" id="password" type="password"> <br>
|
||||
{{ yield errors(name="Password")}}
|
||||
<label class="input-label">{{ T("confirm_password")}}:</label> <br>
|
||||
<input class="form-input up-input up-input" name="password_confirmation" id="password_confirmation" type="password"> <br>
|
||||
{{ yield errors(name="ConfirmPassword")}}
|
||||
<h3>{{ T("personal_info")}}</h3>
|
||||
<div class="user-edit">
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field()}}
|
||||
<label class="input-label">{{ T("api_token") }}:</label>
|
||||
<p style="font-family: monospace;">{{UserProfile.APIToken}}</p>
|
||||
<a class="form-input up-input" href="/user/{{ UserProfile.ID}}/{{UserProfile.Username }}/apireset">Reset API key</a>
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="/apidoc">{{ T("api_documentation")}}</a>
|
||||
<br/>
|
||||
<label class="input-label">{{ T("email_address") }}:</label>
|
||||
<br/>
|
||||
<input class="form-input up-input" placeholder="{{ T("email_placeholder")}}" type="text" name="email" id="email" value="{{UserProfile.Email}}"/>
|
||||
<br/>
|
||||
{{ yield errors(name="Email")}}
|
||||
<label class="input-label">{{ T("language")}}:</label>
|
||||
<br/>
|
||||
<select id="language" name="language" class="form-input up-input">
|
||||
{{ userLanguage := UserProfile.Language }}
|
||||
{{ range _, language := Languages }}
|
||||
<option value="{{ language.Tag }}" {{ if userLanguage == language.Tag || userLanguage == language.Code || ((userLanguage == "") && (language.Tag == getDefaultLanguage())) }}selected{{end}}>{{ language.Name }} {{if language.Tag == getDefaultLanguage()}}({{ T("default") }}){{end}}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="Language")}}
|
||||
{{ if !User.HasAdmin()}}
|
||||
<label class="input-label">{{ T("current_password")}}:</label>
|
||||
<br/>
|
||||
<input class="form-input up-input up-input" name="current_password" id="current_password" type="password"/>
|
||||
<br/>
|
||||
{{ yield errors(name="CurrentPassword")}}
|
||||
{{end}}
|
||||
<label class="input-label">{{ T("password")}}:</label>
|
||||
<br/>
|
||||
<input class="form-input up-input up-input" name="password" id="password" type="password"/>
|
||||
<br/>
|
||||
{{ yield errors(name="Password")}}
|
||||
<label class="input-label">{{ T("confirm_password")}}:</label>
|
||||
<br/>
|
||||
<input class="form-input up-input up-input" name="password_confirmation" id="password_confirmation" type="password"/>
|
||||
<br/>
|
||||
{{ yield errors(name="ConfirmPassword")}}
|
||||
|
||||
<h3>{{ T("preferences")}}</h3>
|
||||
<label class="input-label" for="theme">{{ T("theme")}}</label> <br>
|
||||
<select id="theme-selector" name="theme" class="form-input up-input" onchange="switchThemes()">
|
||||
<option value="">{{ T("theme_select")}}</option>
|
||||
<option value="g"{{ if Theme == "g" }} selected{{end}}>/g/</option>
|
||||
<option value="tomorrow"{{ if Theme == "tomorrow" }} selected{{end}}>Tomorrow</option>
|
||||
<option value=""{{ if Theme == "" }} selected{{end}}>{{ T("theme_none")}}</option>
|
||||
</select><br>
|
||||
{{ yield errors(name="Theme")}}
|
||||
{{ if DefaultUserSettings("new_torrent")}}
|
||||
<label class="input-label">{{ T("new_torrent_settings") }}:</label> <br>
|
||||
<select id="new_torrent" name="new_torrent" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_torrent") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_torrent") }}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewTorrent")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_torrent_email")}}
|
||||
<label class="input-label">{{ T("new_torrent_email_settings") }}:</label> <br>
|
||||
<select id="new_torrent_email" name="new_torrent_email" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_torrent_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_torrent_email")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewTorrentEmail")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_comment")}}
|
||||
<label class="input-label">{{ T("new_comment_settings") }}:</label> <br>
|
||||
<select id="new_comment" name="new_comment" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_comment") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_comment") }}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewComment")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_comment_email")}}
|
||||
<label class="input-label">{{ T("new_comment_email_settings") }}:</label> <br>
|
||||
<select id="new_comment_email" name="new_comment_email" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_comment_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_comment_email") }}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewCommentEmail")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_responses")}}
|
||||
<label class="input-label">{{ T("new_responses_settings") }}:</label> <br>
|
||||
<select id="new_responses" name="new_responses" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_responses") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_responses")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewResponses")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_responses_email")}}
|
||||
<label class="input-label">{{ T("new_responses_email_settings") }}:</label> <br>
|
||||
<select id="new_responses_email" name="new_responses_email" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("new_responses_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_responses_email")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewResponsesEmail")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_follower")}}
|
||||
<label class="input-label">{{ T("new_follower_settings") }}:</label> <br>
|
||||
<select id="new_follower" name="new_follower" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("new_follower") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_follower")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewFollower")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_follower_email")}}
|
||||
<label class="input-label">{{ T("new_follower_email_settings") }}:</label> <br>
|
||||
<select id="new_follower_email" name="new_follower_email" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("new_follower_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_follower_email")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewFollowerEmail")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("followed")}}
|
||||
<label class="input-label">{{ T("followed_settings") }}:</label> <br>
|
||||
<select id="followed" name="followed" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("followed") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("followed")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select><br>
|
||||
{{ yield errors(name="Followed")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("followed_email")}}
|
||||
<label class="input-label">{{ T("followed_email_settings") }}:</label> <br>
|
||||
<select id="followed_email" name="followed_email" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("followed_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("followed_email")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="FollowedEmail")}}
|
||||
{{end}}
|
||||
{{ if User.HasAdmin()}}
|
||||
<h3>{{ T("moderation")}}</h3>
|
||||
<label class="input-label">{{ T("username")}}:</label> <br>
|
||||
<input class="form-input up-input" name="username" id="username" type="text" value="{{UserProfile.Username}}">
|
||||
{{ yield errors(name="Username")}}
|
||||
<h3>{{ T("preferences")}}</h3>
|
||||
<label class="input-label" for="theme">{{ T("theme")}}</label>
|
||||
<br/>
|
||||
<select id="theme-selector" name="theme" class="form-input up-input" onchange="switchThemes()">
|
||||
<option value="">{{ T("theme_select")}}</option>
|
||||
<option value="g"{{ if Theme == "g" }} selected{{end}}>/g/</option>
|
||||
<option value="tomorrow"{{ if Theme == "tomorrow" }} selected{{end}}>Tomorrow</option>
|
||||
<option value=""{{ if Theme == "" }} selected{{end}}>{{ T("theme_none")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="Theme")}}
|
||||
{{ if DefaultUserSettings("new_torrent")}}
|
||||
<label class="input-label">{{ T("new_torrent_settings") }}:</label>
|
||||
<br/>
|
||||
<select id="new_torrent" name="new_torrent" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_torrent") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_torrent") }}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="NewTorrent")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_torrent_email")}}
|
||||
<label class="input-label">{{ T("new_torrent_email_settings") }}:</label>
|
||||
<br/>
|
||||
<select id="new_torrent_email" name="new_torrent_email" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_torrent_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_torrent_email")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewTorrentEmail")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_comment")}}
|
||||
<label class="input-label">{{ T("new_comment_settings") }}:</label> <br>
|
||||
<select id="new_comment" name="new_comment" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_comment") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_comment") }}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select> <br>
|
||||
{{ yield errors(name="NewComment")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_comment_email")}}
|
||||
<label class="input-label">{{ T("new_comment_email_settings") }}:</label>
|
||||
<br/>
|
||||
<select id="new_comment_email" name="new_comment_email" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_comment_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_comment_email") }}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="NewCommentEmail")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_responses")}}
|
||||
<label class="input-label">{{ T("new_responses_settings") }}:</label>
|
||||
<br/>
|
||||
<select id="new_responses" name="new_responses" class="form-input up-input">
|
||||
<option value="0" {{ if !UserProfile.Settings.Get("new_responses") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_responses")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="NewResponses")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_responses_email")}}
|
||||
<label class="input-label">{{ T("new_responses_email_settings") }}:</label> <br>
|
||||
<select id="new_responses_email" name="new_responses_email" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("new_responses_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_responses_email")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="NewResponsesEmail")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_follower")}}
|
||||
<label class="input-label">{{ T("new_follower_settings") }}:</label> <br>
|
||||
<select id="new_follower" name="new_follower" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("new_follower") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_follower")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="NewFollower")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("new_follower_email")}}
|
||||
<label class="input-label">{{ T("new_follower_email_settings") }}:</label> <br>
|
||||
<select id="new_follower_email" name="new_follower_email" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("new_follower_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("new_follower_email")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="NewFollowerEmail")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("followed")}}
|
||||
<label class="input-label">{{ T("followed_settings") }}:</label> <br>
|
||||
<select id="followed" name="followed" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("followed") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("followed")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="Followed")}}
|
||||
{{end}}
|
||||
{{ if DefaultUserSettings("followed_email")}}
|
||||
<label class="input-label">{{ T("followed_email_settings") }}:</label>
|
||||
<br/>
|
||||
<select id="followed_email" name="followed_email" class="form-input up-input">
|
||||
<option value="0" {{ if UserProfile.Settings.Get("followed_email") }}selected{{end}}>{{ T("no")}}</option>
|
||||
<option value="1" {{ if UserProfile.Settings.Get("followed_email")}}selected{{end}}>{{ T("yes")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
{{ yield errors(name="FollowedEmail")}}
|
||||
{{end}}
|
||||
{{ if User.HasAdmin()}}
|
||||
<h3>{{ T("moderation")}}</h3>
|
||||
<label class="input-label">{{ T("username")}}:</label> <br>
|
||||
<input class="form-input up-input" name="username" id="username" type="text" value="{{UserProfile.Username}}">
|
||||
{{ yield errors(name="Username")}}
|
||||
|
||||
<label class="input-label">{{ T("role") }}:</label>
|
||||
<select id="status" name="status" class="form-input up-input">
|
||||
<option value="-1" {{ if UserProfile.Status == -1 }}selected{{end}}>{{ T("banned")}}</option>
|
||||
<option value="0" {{ if UserProfile.Status == 0 }}selected{{end}}>{{ T("member")}} ({{ T("default") }})</option>
|
||||
<option value="1" {{ if UserProfile.Status == 1 }}selected{{end}}>{{ T("trusted_member")}}</option>
|
||||
{{ if UserProfile.Status == 2 }} <!-- just so that it shows correctly -->
|
||||
<option value="2" selected>{{ T("moderator")}}</option>
|
||||
{{end}}
|
||||
<option value="3" {{ if UserProfile.Status == 3 }}selected{{end}}>{{ T("scraped_user")}}</option>
|
||||
</select>
|
||||
{{ yield errors(name="Status")}}
|
||||
{{end}}
|
||||
<label class="input-label"></label>
|
||||
<input type="submit" class="form-input btn-green" name="save" value="{{ T("save_changes")}}">
|
||||
<span></span>
|
||||
<input type="reset" class="form-input" value="{{ T("cancel")}}">
|
||||
</form>
|
||||
</div>
|
||||
{{ if User.CurrentOrAdmin(UserProfile.ID) }}
|
||||
<hr>
|
||||
<a href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}?delete" onclick="if (!confirm('{{ T("delete_account_confirm") }}')) return false;" class="form-input btn-red">{{ T("delete_account")}}</a>
|
||||
{{end}}
|
||||
<label class="input-label">{{ T("role") }}:</label>
|
||||
<select id="status" name="status" class="form-input up-input">
|
||||
<option value="-1" {{ if UserProfile.Status == -1 }}selected{{end}}>{{ T("banned")}}</option>
|
||||
<option value="0" {{ if UserProfile.Status == 0 }}selected{{end}}>{{ T("member")}} ({{ T("default") }})</option>
|
||||
<option value="1" {{ if UserProfile.Status == 1 }}selected{{end}}>{{ T("trusted_member")}}</option>
|
||||
{{ if UserProfile.Status == 2 }} <!-- just so that it shows correctly -->
|
||||
<option value="2" selected>{{ T("moderator")}}</option>
|
||||
{{end}}
|
||||
<option value="3" {{ if UserProfile.Status == 3 }}selected{{end}}>{{ T("scraped_user")}}</option>
|
||||
</select>
|
||||
{{ yield errors(name="Status")}}
|
||||
{{end}}
|
||||
<label class="input-label"></label>
|
||||
<input type="submit" class="form-input btn-green" name="save" value="{{ T("save_changes")}}">
|
||||
<span></span>
|
||||
<input type="reset" class="form-input" value="{{ T("cancel")}}">
|
||||
</form>
|
||||
</div>
|
||||
{{ if User.CurrentOrAdmin(UserProfile.ID) }}
|
||||
<hr/>
|
||||
<a href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}?delete" onclick="if (!confirm('{{ T("delete_account_confirm") }}')) return false;" class="form-input btn-red">{{ T("delete_account")}}</a>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -3,26 +3,28 @@
|
|||
{{ import "layouts/partials/helpers/errors" }}
|
||||
{{block title()}}{{ T("sign_in_title") }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="box">
|
||||
<div class="user-form">
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field()}}
|
||||
<h2>{{ T("sign_in_box_title")}}</h2>
|
||||
<input type="text" name="username" id="username" class="form-input up-input" autofocus placeholder="{{ T("email_address_or_username")}}"><br>
|
||||
{{ yield errors(name="Username")}}
|
||||
<input type="password" name="password" id="password" class="form-input up-input" placeholder="{{ T("password")}}"><br>
|
||||
<input type="hidden" name="redirectTo" value="{{ Form.RedirectTo }}">
|
||||
{{ yield errors(name="Password")}}
|
||||
<!-- <span class="button-checkbox">
|
||||
<button type="button" class="btn hidden" data-color="info">{{ T("remember_me")}}</button>
|
||||
<input type="checkbox" name="remember_me" id="remember_me" checked="checked">
|
||||
<a href="" class="btn btn-link pull-right">{{ T("forgot_password")}}</a>
|
||||
</span> -->
|
||||
<input type="submit" class="form-input" value="{{ T("signin")}}">
|
||||
<a href="/register" class="btn btn-lg btn-primary btn-block">{{ T("register")}}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<div class="box">
|
||||
<div class="user-form">
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field()}}
|
||||
<h2>{{ T("sign_in_box_title")}}</h2>
|
||||
<input type="text" name="username" id="username" class="form-input up-input" autofocus placeholder="{{ T("email_address_or_username")}}"/>
|
||||
<br/>
|
||||
{{ yield errors(name="Username")}}
|
||||
<input type="password" name="password" id="password" class="form-input up-input" placeholder="{{ T("password")}}"/>
|
||||
<br/>
|
||||
<input type="hidden" name="redirectTo" value="{{ Form.RedirectTo }}"/>
|
||||
{{ yield errors(name="Password")}}
|
||||
<!-- <span class="button-checkbox">
|
||||
<button type="button" class="btn hidden" data-color="info">{{ T("remember_me")}}</button>
|
||||
<input type="checkbox" name="remember_me" id="remember_me" checked="checked">
|
||||
<a href="" class="btn btn-link pull-right">{{ T("forgot_password")}}</a>
|
||||
</span> -->
|
||||
<input type="submit" class="form-input" value="{{ T("signin")}}"/>
|
||||
<a href="/register" class="btn btn-lg btn-primary btn-block">{{ T("register")}}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
{{end}}
|
||||
|
|
|
@ -3,21 +3,25 @@
|
|||
{{block title()}}{{ T("profile_edit_page", User.Username) }}{{end}}
|
||||
{{ block profile_navigation()}}{{ yield profile_menu(route="profile") }}{{end}}
|
||||
{{block profile_content()}}
|
||||
{{ if len(User.Notifications) > 0}}
|
||||
<div>
|
||||
<a href="/notifications?clear" class="btn btn-red pull-right"> {{ T("clear_notifications") }}</a>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<table>
|
||||
{{ range User.Notifications }}
|
||||
<tr><td{{ if !.Read }} class="btn-orange"{{end}}>
|
||||
<div style="padding: 0 1rem 1rem;">
|
||||
<a href="{{ .URL }}?notif"><h3>{{ .Content }}</h3></a>
|
||||
</div>
|
||||
</td></tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{else}}
|
||||
<h2>{{ T("no_notifications") }}</h2>
|
||||
{{end}}
|
||||
{{ if len(User.Notifications) > 0}}
|
||||
<div>
|
||||
<a href="/notifications?clear" class="btn btn-red pull-right"> {{ T("clear_notifications") }}</a>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<table>
|
||||
{{ range User.Notifications }}
|
||||
<tr>
|
||||
<td{{ if !.Read }} class="btn-orange"{{end}}>
|
||||
<div style="padding: 0 1rem 1rem;">
|
||||
<a href="{{ .URL }}?notif">
|
||||
<h3>{{ .Content }}</h3>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
{{else}}
|
||||
<h2>{{ T("no_notifications") }}</h2>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -2,40 +2,38 @@
|
|||
{{ import "layouts/partials/helpers/csrf" }}
|
||||
{{block title()}}{{ T("change_settings")}}{{end}}
|
||||
{{block content_body()}}
|
||||
<div style="text-align: left;" class="box">
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<div class="form-group">
|
||||
<h3>{{ T("language")}}</h3>
|
||||
<select id="language" name="language" class="form-input">
|
||||
{{ range translatedName := Form.Languages }}
|
||||
<option value="{{ translatedName[2] }}" {{ if Form.Current == translatedName[2] }}selected{{end}}>{{ translatedName[0] }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<h3>{{ T("theme")}}</h3>
|
||||
<select id="theme-selector" name="theme" class="form-input" onchange="switchThemes()">
|
||||
<option value="g"{{ if Theme == "g" || Theme == "" }} selected{{end}}>/g/</option>
|
||||
<option value="tomorrow"{{ if Theme == "tomorrow" }} selected{{end}}>Tomorrow</option>
|
||||
<option value="classic"{{ if Theme == "classic" }} selected{{end}}>Classic</option>
|
||||
</select>
|
||||
</br>
|
||||
<h3>{{ T("mascot")}}</h3>
|
||||
<select id="mascot-selector" name="mascot" class="form-input">
|
||||
{{ T("mascot")}}
|
||||
<option value="show" {{ if Mascot == "show" }} selected{{end}}>{{ T("show")}}</option>
|
||||
<option value="hide" {{ if Mascot == "hide" }} selected{{end}}>{{ T("hide")}}</option>
|
||||
</select>
|
||||
</br>
|
||||
|
||||
<h3>{{ T("mascot_url")}}</h3>
|
||||
<input type="text" name="mascot_url" class="form-input" value="{{ MascotURL }}">
|
||||
</br>
|
||||
<div style="text-align: left;" class="box">
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<div class="form-group">
|
||||
<h3>{{ T("language")}}</h3>
|
||||
<select id="language" name="language" class="form-input">
|
||||
{{ range translatedName := Form.Languages }}
|
||||
<option value="{{ translatedName[2] }}" {{ if Form.Current == translatedName[2] }}selected{{end}}>{{ translatedName[0] }}</option>
|
||||
{{ end }}
|
||||
</select>
|
||||
<h3>{{ T("theme")}}</h3>
|
||||
<select id="theme-selector" name="theme" class="form-input" onchange="switchThemes()">
|
||||
<option value="g"{{ if Theme == "g" || Theme == "" }} selected{{end}}>/g/</option>
|
||||
<option value="tomorrow"{{ if Theme == "tomorrow" }} selected{{end}}>Tomorrow</option>
|
||||
<option value="classic"{{ if Theme == "classic" }} selected{{end}}>Classic</option>
|
||||
</select>
|
||||
</br>
|
||||
<h3>{{ T("mascot")}}</h3>
|
||||
<select id="mascot-selector" name="mascot" class="form-input">
|
||||
{{ T("mascot")}}
|
||||
<option value="show" {{ if Mascot == "show" }} selected{{end}}>{{ T("show")}}</option>
|
||||
<option value="hide" {{ if Mascot == "hide" }} selected{{end}}>{{ T("hide")}}</option>
|
||||
</select>
|
||||
<br/>
|
||||
|
||||
<p>{{ T("cookies")}}</p>
|
||||
<button type="submit" class="form-input btn">{{ T("save_changes")}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<h3>{{ T("mascot_url")}}</h3>
|
||||
<input type="text" name="mascot_url" class="form-input" value="{{ MascotURL }}"/>
|
||||
<br/>
|
||||
|
||||
<p>{{ T("cookies")}}</p>
|
||||
<button type="submit" class="form-input btn">{{ T("save_changes")}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
|
||||
|
|
|
@ -4,53 +4,59 @@
|
|||
{{ import "layouts/partials/helpers/errors" }}
|
||||
{{block title()}}{{ T("register_title") }}{{end}}
|
||||
{{block content_body()}}
|
||||
<div class="box">
|
||||
<div class="user-form">
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<h2>{{ T("signup_box_title") }}</h2>
|
||||
<input type="text" name="username" id="display_name" class="form-input up-input" placeholder="{{ T("username") }}" value="{{ Form.Username }}" autofocus> <br>
|
||||
{{ yield errors(name="username") }}
|
||||
<input type="email" name="email" id="email" class="form-input up-input" placeholder="{{ T("email_address") }} ({{ T("optional")}})" value="{{ Form.Email }}"> <br>
|
||||
{{ yield errors(name="email") }}
|
||||
<input type="password" name="password" id="password" class="form-input up-input" placeholder="{{ T("password") }}" value="{{ Form.Password }}"> <br>
|
||||
{{ yield errors(name="Password") }}
|
||||
<input type="password" name="password_confirmation" id="password_confirmation" class="form-input up-input" placeholder="{{ T("confirm_password") }}"> <br>
|
||||
{{ yield errors(name="ConfirmPassword") }}
|
||||
<p>
|
||||
<span class="button-checkbox"><input type="checkbox" name="t_and_c" id="t_and_c" value="1"></span>
|
||||
{{ T("terms_conditions_confirm")|raw }}
|
||||
</p>
|
||||
{{ yield errors(name="TermsAndConditions") }}
|
||||
<!-- -->
|
||||
{{ yield captcha(captchaid=Form.CaptchaID)}}
|
||||
<div class="box">
|
||||
<div class="user-form">
|
||||
<form role="form" method="POST">
|
||||
{{ yield csrf_field() }}
|
||||
<h2>{{ T("signup_box_title") }}</h2>
|
||||
<input type="text" name="username" id="display_name" class="form-input up-input" placeholder="{{ T("username") }}" value="{{ Form.Username }}" autofocus/>
|
||||
<br/>
|
||||
{{ yield errors(name="username") }}
|
||||
<input type="email" name="email" id="email" class="form-input up-input" placeholder="{{ T("email_address") }} ({{ T("optional")}})" value="{{ Form.Email }}"/>
|
||||
<br/>
|
||||
{{ yield errors(name="email") }}
|
||||
<input type="password" name="password" id="password" class="form-input up-input" placeholder="{{ T("password") }}" value="{{ Form.Password }}"/>
|
||||
<br/>
|
||||
{{ yield errors(name="Password") }}
|
||||
<input type="password" name="password_confirmation" id="password_confirmation" class="form-input up-input" placeholder="{{ T("confirm_password") }}"/>
|
||||
<br/>
|
||||
{{ yield errors(name="ConfirmPassword") }}
|
||||
<p>
|
||||
<span class="button-checkbox">
|
||||
<input type="checkbox" name="t_and_c" id="t_and_c" value="1"/>
|
||||
</span>
|
||||
{{ T("terms_conditions_confirm")|raw }}
|
||||
</p>
|
||||
{{ yield errors(name="TermsAndConditions") }}
|
||||
<!-- -->
|
||||
{{ yield captcha(captchaid=Form.CaptchaID)}}
|
||||
|
||||
<input type="submit" value="{{ T("register") }}" class="form-input"></input>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div id="modal_mod_tools" class="modal">
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<span class="close">×</span>
|
||||
<h2>{{ T("terms_conditions") }}</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{ T("terms_conditions_full")|raw }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" value="{{ T("register") }}" class="form-input"></input>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal -->
|
||||
<div id="modal_mod_tools" class="modal">
|
||||
<!-- Modal content -->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<span class="close">×</span>
|
||||
<h2>{{ T("terms_conditions") }}</h2>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{ T("terms_conditions_full")|raw }}</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{ block footer_js() }}
|
||||
<script type="text/javascript" src="{{URL.Parse("/js/modal.js") }}"></script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
// Modal initialization
|
||||
Modal.Init({elements: document.getElementsByClassName("modal"),
|
||||
button: "#modal_active"
|
||||
});
|
||||
// Modal initialization
|
||||
Modal.Init({elements: document.getElementsByClassName("modal"),
|
||||
button: "#modal_active"
|
||||
});
|
||||
</script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -3,62 +3,67 @@
|
|||
{{ block profile_navigation()}}{{ yield profile_menu(route="profile") }}{{end}}
|
||||
{{block profile_content()}}
|
||||
{{ if len(UserProfile.Torrents) > 0 }}
|
||||
<table>
|
||||
<tr class="torrent-info">
|
||||
<th class="tr-cat user-td">{{ T("category")}}</th>
|
||||
<th class="tr-name user-td">{{ T("name")}}</th>
|
||||
<th class="tr-dl user-td">{{ T("links")}}</th>
|
||||
<th class="tr-size user-td hide-xs">{{ T("size")}}</th>
|
||||
<th class="tr-date user-td hide-xs">{{ T("date")}}</th>
|
||||
</tr>
|
||||
{{ range i, t := UserProfile.Torrents }}
|
||||
{{ torrent := t.ToJSON() }}
|
||||
<tr class="torrent-info
|
||||
{{if torrent.Status == 2}}remake{{else if torrent.Status == 3}}trusted{{else if torrent.Status == 4}}aplus{{end}}
|
||||
{{if t.Hidden && User.CurrentOrAdmin(t.Uploader.ID) }} hidden{{end}}">
|
||||
<td class="tr-cat user-td">
|
||||
{{ if Sukebei() }}
|
||||
<div class="nyaa-cat sukebei-cat-{{ torrent.Category }}{{ torrent.SubCategory}}">
|
||||
{{ else }}
|
||||
<div class="nyaa-cat nyaa-cat-{{ torrent.SubCategory }}">
|
||||
{{ end }}
|
||||
<a href="{{URL.Parse ("/search?c="+ torrent.Category + "_" +torrent.SubCategory) }}" title="{{T(CategoryName(torrent.Category, torrent.SubCategory))}}" class="category">
|
||||
{{ if torrent.Languages[0] != "" }}
|
||||
<a href="{{ URL.Parse("/search?c="+torrent.Category+"_"+ torrent.SubCategory +"&lang=") }}{{ range key, language := torrent.Languages }}{{ language }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ LanguageNameFromCode(torrent.Languages[0], T) }}" class="flag flag-{{ (len(torrent.Languages) == 1) ? FlagCode(torrent.Languages[0]) : "multiple" }}" title=" {{ range key, language := torrent.Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
|
||||
</a>
|
||||
{{end}}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tr-name user-td">
|
||||
<a href="/view/{{torrent.ID}}">
|
||||
{{torrent.Name}}
|
||||
</a>
|
||||
</td>
|
||||
<td class="tr-links user-td">
|
||||
<a href="{{torrent.Magnet}}" title="{{ T("magnet_link") }}">
|
||||
<div class="icon-magnet"></div>
|
||||
</a>
|
||||
{{if torrent.TorrentLink != ""}}
|
||||
<a href="{{torrent.TorrentLink}}" title="{{ T("torrent_file") }}">
|
||||
<div class="icon-floppy"></div>
|
||||
</a>
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="tr-size user-td hide-xs">
|
||||
{{ fileSize(torrent.Filesize, T) }}
|
||||
</td>
|
||||
<td class="tr-date user-td date-short hide-xs">{{torrent.Date}}</td>
|
||||
</tr>
|
||||
<table>
|
||||
<tr class="torrent-info">
|
||||
<th class="tr-cat user-td">{{ T("category")}}</th>
|
||||
<th class="tr-name user-td">{{ T("name")}}</th>
|
||||
<th class="tr-dl user-td">{{ T("links")}}</th>
|
||||
<th class="tr-size user-td hide-xs">{{ T("size")}}</th>
|
||||
<th class="tr-date user-td hide-xs">{{ T("date")}}</th>
|
||||
</tr>
|
||||
{{ range i, t := UserProfile.Torrents }}
|
||||
{{ torrent := t.ToJSON() }}
|
||||
<tr class="torrent-info
|
||||
{{if torrent.Status == 2}}remake{{else if torrent.Status == 3}}trusted{{else if torrent.Status == 4}}aplus{{end}}
|
||||
{{if t.Hidden && User.CurrentOrAdmin(t.Uploader.ID) }} hidden{{end}}">
|
||||
<td class="tr-cat user-td">
|
||||
{{ if Sukebei() }}
|
||||
<div class="nyaa-cat sukebei-cat-{{ torrent.Category }}{{ torrent.SubCategory}}">
|
||||
{{ else }}
|
||||
<div class="nyaa-cat nyaa-cat-{{ torrent.SubCategory }}">
|
||||
{{ end }}
|
||||
<a href="{{URL.Parse ("/search?c="+ torrent.Category + "_" +torrent.SubCategory) }}" title="{{T(CategoryName(torrent.Category, torrent.SubCategory))}}" class="category">
|
||||
{{ if torrent.Languages[0] != "" }}
|
||||
<a href="{{ URL.Parse("/search?c="+torrent.Category+"_"+ torrent.SubCategory +"&lang=") }}{{ range key, language := torrent.Languages }}{{ language }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}">
|
||||
<img src="/img/blank.gif" alt="{{ LanguageNameFromCode(torrent.Languages[0], T) }}" class="flag flag-{{ (len(torrent.Languages) == 1) ? FlagCode(torrent.Languages[0]) : "multiple" }}" title=" {{ range key, language := torrent.Languages }}{{ LanguageNameFromCode(language, T) }}{{ if len(torrent.Languages) > 1 && (key+1) < len(torrent.Languages) }},{{ end }}{{ end }}"/>
|
||||
</a>
|
||||
{{end}}
|
||||
</table>
|
||||
<nav class="torrentNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<a href="/search?userID={{ UserProfile.ID }}" aria-label="Next"><li><span class="glyphicon glyphicon-add"></span> {{ T("see_more_torrents_from", UserProfile.Username) }}</li></a>
|
||||
</ul>
|
||||
</nav>
|
||||
{{else}}
|
||||
<h2 style="text-align: center;">{{ T("no_torrents_uploaded") }}</h2>
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tr-name user-td">
|
||||
<a href="/view/{{torrent.ID}}">
|
||||
{{torrent.Name}}
|
||||
</a>
|
||||
</td>
|
||||
<td class="tr-links user-td">
|
||||
<a href="{{torrent.Magnet}}" title="{{ T("magnet_link") }}">
|
||||
<div class="icon-magnet"></div>
|
||||
</a>
|
||||
{{if torrent.TorrentLink != ""}}
|
||||
<a href="{{torrent.TorrentLink}}" title="{{ T("torrent_file") }}">
|
||||
<div class="icon-floppy"></div>
|
||||
</a>
|
||||
{{end}}
|
||||
</td>
|
||||
<td class="tr-size user-td hide-xs">
|
||||
{{ fileSize(torrent.Filesize, T) }}
|
||||
</td>
|
||||
<td class="tr-date user-td date-short hide-xs">{{torrent.Date}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<nav class="torrentNav" aria-label="Page navigation">
|
||||
<ul class="pagination">
|
||||
<a href="/search?userID={{ UserProfile.ID }}" aria-label="Next">
|
||||
<li>
|
||||
<span class="glyphicon glyphicon-add"></span>
|
||||
{{ T("see_more_torrents_from", UserProfile.Username) }}
|
||||
</li>
|
||||
</a>
|
||||
</ul>
|
||||
</nav>
|
||||
{{else}}
|
||||
<h2 style="text-align: center;">{{ T("no_torrents_uploaded") }}</h2>
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
|
|
@ -54,7 +54,7 @@ func Commonvariables(c *gin.Context) jet.VarMap {
|
|||
variables.Set("T", publicSettings.GetTfuncFromRequest(c))
|
||||
variables.Set("Theme", publicSettings.GetThemeFromRequest(c))
|
||||
variables.Set("Mascot", publicSettings.GetMascotFromRequest(c))
|
||||
variables.Set("MascotURL", publicSettings.GetMascotUrlFromRequest(c))
|
||||
variables.Set("MascotURL", publicSettings.GetMascotURLFromRequest(c))
|
||||
variables.Set("User", user)
|
||||
variables.Set("URL", c.Request.URL)
|
||||
variables.Set("CsrfToken", token)
|
||||
|
|
|
@ -260,14 +260,14 @@ func (r *Rss) RssFeed() *RssFeed {
|
|||
}
|
||||
|
||||
// FeedXML : return an XML-Ready object for an Rss object
|
||||
func (r *Rss) FeedXML() interface{} {
|
||||
func (r *Rss) FeedXml() interface{} {
|
||||
// only generate version 2.0 feeds for now
|
||||
return r.RssFeed().FeedXML()
|
||||
return r.RssFeed().FeedXml()
|
||||
|
||||
}
|
||||
|
||||
// FeedXML : return an XML-ready object for an RssFeed object
|
||||
func (r *RssFeed) FeedXML() interface{} {
|
||||
func (r *RssFeed) FeedXml() interface{} {
|
||||
if r.Xmlns != "" {
|
||||
return &rssFeedXML{Version: "2.0", Encoding: "UTF-8", Channel: r, Xmlns: r.Xmlns}
|
||||
}
|
||||
|
@ -275,6 +275,6 @@ func (r *RssFeed) FeedXML() interface{} {
|
|||
}
|
||||
|
||||
// FeedXML : return an XML-ready object for an RssFeed object
|
||||
func (r *RssCaps) FeedXML() interface{} {
|
||||
func (r *RssCaps) FeedXml() interface{} {
|
||||
return r
|
||||
}
|
||||
|
|
|
@ -25,12 +25,14 @@ type UserRetriever interface {
|
|||
RetrieveCurrentUser(c *gin.Context) (*models.User, error)
|
||||
}
|
||||
|
||||
// Language localization language struct
|
||||
type Language struct {
|
||||
Name string
|
||||
Code string
|
||||
Tag string
|
||||
}
|
||||
|
||||
// Languages Array of Language
|
||||
type Languages []Language
|
||||
|
||||
// TemplateTfunc : T func used in template
|
||||
|
@ -192,9 +194,9 @@ func GetMascotFromRequest(c *gin.Context) string {
|
|||
return "show"
|
||||
}
|
||||
|
||||
// GetMascotUrlFromRequest : Get the user selected mascot url from the request.
|
||||
// GetMascotURLFromRequest : Get the user selected mascot url from the request.
|
||||
// Returns an empty string if not set.
|
||||
func GetMascotUrlFromRequest(c *gin.Context) string {
|
||||
func GetMascotURLFromRequest(c *gin.Context) string {
|
||||
user, _ := getCurrentUser(c)
|
||||
if user.ID > 0 {
|
||||
return user.MascotURL
|
||||
|
|
Référencer dans un nouveau ticket