Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0
Ce dépôt a été archivé le 2022-05-07. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
nyaa-pantsu/router/templateVariables.go
akuma06 b4da1000b3 Added User Registration View
Moved public files in public folder
2017-05-07 00:10:40 +02:00

56 lignes
1,6 Kio
Go

package router
import (
"net/url"
"github.com/ewhal/nyaa/model"
"github.com/ewhal/nyaa/templates"
userForms "github.com/ewhal/nyaa/service/user/form"
"github.com/gorilla/mux"
)
/* Each Page should have an object to pass to their own template
* Therefore, we put them in a separate file for better maintenance
*
* MAIN Template Variables
*/
type FaqTemplateVariables struct {
Navigation templates.Navigation
Search templates.SearchForm
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
type ViewTemplateVariables struct {
Torrent model.TorrentsJson
Search templates.SearchForm
Navigation templates.Navigation
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
type UserRegisterTemplateVariables struct {
RegistrationForm userForms.RegistrationForm
Search templates.SearchForm
Navigation templates.Navigation
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
type HomeTemplateVariables struct {
ListTorrents []model.TorrentsJson
ListCategories []model.Categories
Search templates.SearchForm
Navigation templates.Navigation
URL *url.URL // For parsing Url in templates
Route *mux.Route // For getting current route in templates
}
type UploadTemplateVariables struct {
Upload UploadForm
Search templates.SearchForm
Navigation templates.Navigation
URL *url.URL
Route *mux.Route
}