Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Merge branch 'dev'

Cette révision appartient à :
Eliot Whalan 2017-05-14 21:57:08 +10:00
révision 4c25077875
4 fichiers modifiés avec 29 ajouts et 8 suppressions

Voir le fichier

@ -98,6 +98,14 @@ func (f *ReassignForm) ExecuteAction() (int, error) {
return num, nil
}
// Helper that creates a search form without items/page field
// these need to be used when the templateVariables don't include `Navigation`
func NewPanelSearchForm() SearchForm {
form := NewSearchForm()
form.ShowItemsPerPage = false
return form
}
func IndexModPanel(w http.ResponseWriter, r *http.Request) {
currentUser := GetUser(r)
@ -110,9 +118,7 @@ func IndexModPanel(w http.ResponseWriter, r *http.Request) {
torrentReports, _, _ := reportService.GetAllTorrentReports(offset, 0)
languages.SetTranslationFromRequest(panelIndex, r, "en-us")
search := NewSearchForm()
search.ShowItemsPerPage = false
htv := PanelIndexVbs{torrents, model.TorrentReportsToJSON(torrentReports), users, comments, search, currentUser, r.URL}
htv := PanelIndexVbs{torrents, model.TorrentReportsToJSON(torrentReports), users, comments, NewPanelSearchForm(), currentUser, r.URL}
err := panelIndex.ExecuteTemplate(w, "admin_index.html", htv)
log.CheckError(err)
} else {
@ -258,7 +264,7 @@ func TorrentEditModPanel(w http.ResponseWriter, r *http.Request) {
uploadForm.Category = torrentJson.Category + "_" + torrentJson.SubCategory
uploadForm.Status = torrentJson.Status
uploadForm.Description = string(torrentJson.Description)
htv := PanelTorrentEdVbs{uploadForm, NewSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL}
htv := PanelTorrentEdVbs{uploadForm, NewPanelSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL}
err := panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv)
log.CheckError(err)
@ -297,7 +303,7 @@ func TorrentPostEditModPanel(w http.ResponseWriter, r *http.Request) {
}
}
languages.SetTranslationFromRequest(panelTorrentEd, r, "en-us")
htv := PanelTorrentEdVbs{uploadForm, NewSearchForm(), currentUser, err, infos, r.URL}
htv := PanelTorrentEdVbs{uploadForm, NewPanelSearchForm(), currentUser, err, infos, r.URL}
err_ := panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv)
log.CheckError(err_)
}
@ -360,7 +366,7 @@ func TorrentReassignModPanel(w http.ResponseWriter, r *http.Request) {
}
languages.SetTranslationFromRequest(panelTorrentReassign, r, "en-us")
htv := PanelTorrentReassignVbs{ReassignForm{}, NewSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL}
htv := PanelTorrentReassignVbs{ReassignForm{}, NewPanelSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL}
err := panelTorrentReassign.ExecuteTemplate(w, "admin_index.html", htv)
log.CheckError(err)
}
@ -387,7 +393,7 @@ func TorrentPostReassignModPanel(w http.ResponseWriter, r *http.Request) {
}
}
htv := PanelTorrentReassignVbs{rForm, NewSearchForm(), currentUser, err, infos, r.URL}
htv := PanelTorrentReassignVbs{rForm, NewPanelSearchForm(), currentUser, err, infos, r.URL}
err_ := panelTorrentReassign.ExecuteTemplate(w, "admin_index.html", htv)
log.CheckError(err_)
}

Voir le fichier

@ -37,6 +37,9 @@
<p>{{T "magnet_link_should_look_like"}} <span style="font-family:monospace">
magnet:?xt=urn:btih:[hash]&amp;dn=[name]&amp;tr=[tracker]&amp;tr=[...]</span></p>
<h2>{{T "how_do_i_link_my_old_account"}}</h2>
<p>{{T "answer_how_do_i_link_my_old_account"}}</p>
<h2 id="trackers">{{T "which_trackers_do_you_recommend"}}</h2>
<p>{{T "answer_which_trackers_do_you_recommend"}}</p>
<pre>udp://tracker.doko.moe:6969</pre>

Voir le fichier

@ -283,6 +283,14 @@
"id": "answer_how_are_we_recovering",
"translation": "The aforementioned databases are being hosted at nyaa.pantsu.cat and sukebei.pantsu.cat. There is a search function, and (almost) full nyaa functionality should be coming soon."
},
{
"id": "how_do_i_link_my_old_account",
"translation": "How do I link my old uploads back to my new account?"
},
{
"id": "answer_how_do_i_link_my_old_account",
"translation": "Join <a href=\"ircs://irc.rizon.net/nyaapantsu-help\">#nyaapantsu-help@Rizon</a> and ask a moderator to migrate your old torrents while mentioning your old and new usernames."
},
{
"id": "are_the_trackers_working",
"translation": "Are the torrents still working?"

Voir le fichier

@ -309,7 +309,11 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "トラッカーに Torrent のアップロードを拒否された場合は、この中のいくつかを追加する必要があります:"
"translation": "独自のトラッカーを用意していますので、アップロードする前にリストの一番上に追加してください:"
},
{
"id": "other_trackers",
"translation": "ただし、うまくいかない場合に備え、これらも追加しておく必要があります"
},
{
"id": "how_can_i_help",