diff --git a/htmlpage/public-reports/template/nuisance.html b/htmlpage/public-reports/template/nuisance.html
deleted file mode 100644
index 2a44adc0..00000000
--- a/htmlpage/public-reports/template/nuisance.html
+++ /dev/null
@@ -1,541 +0,0 @@
-{{template "base.html" .}}
-
-{{define "title"}}Dash{{end}}
-{{define "extraheader"}}
-
-
-{{end}}
-{{define "content"}}
-
-
-
-
-
-
[District Name]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Report Mosquito Nuisance
-
Help us identify mosquito activity in your area
-
-
-
-
-
-
-
-
About Mosquito Control
-
While we don't spray for adult mosquitoes based on individual requests, your reports help us identify and eliminate breeding sources. Adult mosquito control is based on trap counts and disease testing. Your detailed information helps us prioritize our work and locate potential breeding sites.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
© 2023 [District Name] Mosquito Management District
-
-
-
Contact: (555) 123-4567 | info@mosquitodistrict.gov
-
-
-
-
-{{end}}
diff --git a/public-report/endpoint.go b/public-report/endpoint.go
index 374cdd72..bb872b00 100644
--- a/public-report/endpoint.go
+++ b/public-report/endpoint.go
@@ -12,7 +12,6 @@ import (
"github.com/Gleipnir-Technology/nidus-sync/db/models"
"github.com/Gleipnir-Technology/nidus-sync/h3utils"
"github.com/Gleipnir-Technology/nidus-sync/htmlpage"
- "github.com/Gleipnir-Technology/nidus-sync/htmlpage/public-reports"
"github.com/Gleipnir-Technology/nidus-sync/userfile"
"github.com/aarondl/opt/omit"
"github.com/aarondl/opt/omitnull"
@@ -35,45 +34,45 @@ func Router() chi.Router {
r.Get("/register-notifications-complete", getRegisterNotificationsComplete)
r.Get("/status", getStatus)
localFS := http.Dir("./static")
- htmlpage.FileServer(r, "/static", localFS, publicreports.EmbeddedStaticFS, "static")
+ htmlpage.FileServer(r, "/static", localFS, EmbeddedStaticFS, "static")
return r
}
func getRoot(w http.ResponseWriter, r *http.Request) {
htmlpage.RenderOrError(
w,
- publicreports.Root,
- publicreports.ContextRoot{},
+ Root,
+ ContextRoot{},
)
}
func getNuisance(w http.ResponseWriter, r *http.Request) {
htmlpage.RenderOrError(
w,
- publicreports.Nuisance,
- publicreports.ContextNuisance{},
+ Nuisance,
+ ContextNuisance{},
)
}
func getPool(w http.ResponseWriter, r *http.Request) {
htmlpage.RenderOrError(
w,
- publicreports.Pool,
- publicreports.ContextPool{},
+ Pool,
+ ContextPool{},
)
}
func getQuick(w http.ResponseWriter, r *http.Request) {
htmlpage.RenderOrError(
w,
- publicreports.Quick,
- publicreports.ContextQuick{},
+ Quick,
+ ContextQuick{},
)
}
func getQuickSubmitComplete(w http.ResponseWriter, r *http.Request) {
report := r.URL.Query().Get("report")
htmlpage.RenderOrError(
w,
- publicreports.QuickSubmitComplete,
- publicreports.ContextQuickSubmitComplete{
+ QuickSubmitComplete,
+ ContextQuickSubmitComplete{
ReportID: report,
},
)
@@ -82,8 +81,8 @@ func getRegisterNotificationsComplete(w http.ResponseWriter, r *http.Request) {
report := r.URL.Query().Get("report")
htmlpage.RenderOrError(
w,
- publicreports.RegisterNotificationsComplete,
- publicreports.ContextRegisterNotificationsComplete{
+ RegisterNotificationsComplete,
+ ContextRegisterNotificationsComplete{
ReportID: report,
},
)
@@ -91,8 +90,8 @@ func getRegisterNotificationsComplete(w http.ResponseWriter, r *http.Request) {
func getStatus(w http.ResponseWriter, r *http.Request) {
htmlpage.RenderOrError(
w,
- publicreports.Status,
- publicreports.ContextStatus{},
+ Status,
+ ContextStatus{},
)
}
func postQuick(w http.ResponseWriter, r *http.Request) {
diff --git a/htmlpage/public-reports/page.go b/public-report/page.go
similarity index 89%
rename from htmlpage/public-reports/page.go
rename to public-report/page.go
index 9f4d2188..e44c7489 100644
--- a/htmlpage/public-reports/page.go
+++ b/public-report/page.go
@@ -1,4 +1,4 @@
-package publicreports
+package publicreport
import (
"embed"
@@ -38,7 +38,7 @@ var (
var components = [...]string{"footer"}
func buildTemplate(files ...string) *htmlpage.BuiltTemplate {
- subdir := "htmlpage/public-reports"
+ subdir := "public-report"
full_files := make([]string, 0)
for _, f := range files {
full_files = append(full_files, fmt.Sprintf("%s/template/%s.html", subdir, f))
@@ -46,5 +46,5 @@ func buildTemplate(files ...string) *htmlpage.BuiltTemplate {
for _, c := range components {
full_files = append(full_files, fmt.Sprintf("%s/template/component/%s.html", subdir, c))
}
- return htmlpage.NewBuiltTemplate(embeddedFiles, "htmlpage/public-reports/", full_files...)
+ return htmlpage.NewBuiltTemplate(embeddedFiles, "public-report/", full_files...)
}
diff --git a/htmlpage/public-reports/static/vendor/css/bootstrap.min.css b/public-report/static/vendor/css/bootstrap.min.css
similarity index 100%
rename from htmlpage/public-reports/static/vendor/css/bootstrap.min.css
rename to public-report/static/vendor/css/bootstrap.min.css
diff --git a/htmlpage/public-reports/static/vendor/js/bootstrap.bundle.min.js b/public-report/static/vendor/js/bootstrap.bundle.min.js
similarity index 100%
rename from htmlpage/public-reports/static/vendor/js/bootstrap.bundle.min.js
rename to public-report/static/vendor/js/bootstrap.bundle.min.js
diff --git a/htmlpage/public-reports/static/vendor/js/bootstrap.min.js b/public-report/static/vendor/js/bootstrap.min.js
similarity index 100%
rename from htmlpage/public-reports/static/vendor/js/bootstrap.min.js
rename to public-report/static/vendor/js/bootstrap.min.js
diff --git a/htmlpage/public-reports/template/base.html b/public-report/template/base.html
similarity index 100%
rename from htmlpage/public-reports/template/base.html
rename to public-report/template/base.html
diff --git a/htmlpage/public-reports/template/component/footer.html b/public-report/template/component/footer.html
similarity index 100%
rename from htmlpage/public-reports/template/component/footer.html
rename to public-report/template/component/footer.html
diff --git a/public-report/template/nuisance.html b/public-report/template/nuisance.html
new file mode 100644
index 00000000..9b8fafdc
--- /dev/null
+++ b/public-report/template/nuisance.html
@@ -0,0 +1,501 @@
+{{template "base.html" .}}
+
+{{define "title"}}Dash{{end}}
+{{define "extraheader"}}
+
+
+{{end}}
+{{define "content"}}
+
+
+
+
+
Report Mosquito Nuisance
+
Help us identify mosquito activity in your area
+
+
+
+
+
+
+
+
About Mosquito Control
+
While we don't spray for adult mosquitoes based on individual requests, your reports help us identify and eliminate breeding sources. Adult mosquito control is based on trap counts and disease testing. Your detailed information helps us prioritize our work and locate potential breeding sites.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Thank you for reporting this mosquito issue.
+
After submission, you'll receive a confirmation with a report ID and further information.
+
+
+
+ Submit Report
+
+
+
+
+
+
+{{end}}
diff --git a/htmlpage/public-reports/template/pool.html b/public-report/template/pool.html
similarity index 100%
rename from htmlpage/public-reports/template/pool.html
rename to public-report/template/pool.html
diff --git a/htmlpage/public-reports/template/quick-submit-complete.html b/public-report/template/quick-submit-complete.html
similarity index 100%
rename from htmlpage/public-reports/template/quick-submit-complete.html
rename to public-report/template/quick-submit-complete.html
diff --git a/htmlpage/public-reports/template/quick.html b/public-report/template/quick.html
similarity index 100%
rename from htmlpage/public-reports/template/quick.html
rename to public-report/template/quick.html
diff --git a/htmlpage/public-reports/template/register-notifications-complete.html b/public-report/template/register-notifications-complete.html
similarity index 100%
rename from htmlpage/public-reports/template/register-notifications-complete.html
rename to public-report/template/register-notifications-complete.html
diff --git a/htmlpage/public-reports/template/root.html b/public-report/template/root.html
similarity index 100%
rename from htmlpage/public-reports/template/root.html
rename to public-report/template/root.html
diff --git a/htmlpage/public-reports/template/status.html b/public-report/template/status.html
similarity index 100%
rename from htmlpage/public-reports/template/status.html
rename to public-report/template/status.html