Move contacts templates in their own directory
This is what directories are for: namespacing; no need for cumbersome file name prefixes.
This commit is contained in:
parent
2799fdb8db
commit
f611162b0e
|
@ -25,7 +25,7 @@ func IndexContacts(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
|
||||||
page := &ContactsIndexPage{
|
page := &ContactsIndexPage{
|
||||||
Contacts: mustGetContactEntries(r.Context(), conn, company),
|
Contacts: mustGetContactEntries(r.Context(), conn, company),
|
||||||
}
|
}
|
||||||
mustRenderAppTemplate(w, r, "contacts-index.gohtml", page)
|
mustRenderAppTemplate(w, r, "contacts/index.gohtml", page)
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetContactForm(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
|
func GetContactForm(w http.ResponseWriter, r *http.Request, params httprouter.Params) {
|
||||||
|
@ -52,11 +52,11 @@ func GetContactForm(w http.ResponseWriter, r *http.Request, params httprouter.Pa
|
||||||
}
|
}
|
||||||
|
|
||||||
func mustRenderNewContactForm(w http.ResponseWriter, r *http.Request, form *contactForm) {
|
func mustRenderNewContactForm(w http.ResponseWriter, r *http.Request, form *contactForm) {
|
||||||
mustRenderAppTemplate(w, r, "contacts-new.gohtml", form)
|
mustRenderAppTemplate(w, r, "contacts/new.gohtml", form)
|
||||||
}
|
}
|
||||||
|
|
||||||
func mustRenderEditContactForm(w http.ResponseWriter, r *http.Request, form *contactForm) {
|
func mustRenderEditContactForm(w http.ResponseWriter, r *http.Request, form *contactForm) {
|
||||||
mustRenderAppTemplate(w, r, "contacts-edit.gohtml", form)
|
mustRenderAppTemplate(w, r, "contacts/edit.gohtml", form)
|
||||||
}
|
}
|
||||||
|
|
||||||
func HandleAddContact(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
func HandleAddContact(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
|
||||||
|
|
Loading…
Reference in New Issue