2498b33a9c
Refactor: Centralize template loading and improve error handling
...
- Introduced helpers.LoadTemplateFiles() for consistent layout + topbar rendering
- Replaced repeated template.ParseFiles() calls across handlers
- Created generic RenderError(w, r, statusCode) helper
- Replaced old Render403 with flexible RenderError
- Updated AdminOnly middleware to render 403 errors with context
- Added 500.html template for graceful panic fallback
- Prepared structure for future error codes (404, 429, etc.)
2025-04-02 09:12:13 +01:00
03b1e095ce
Refactor: Centralize template context using unified TemplateData struct
...
- Introduced models.TemplateData for shared user/context state
- Moved context construction logic into handlers/template_context.go
- Simplified helpers.TemplateContext to accept structured data
- Restored and organized template helper functions
- Updated affected handlers (main.go, draw_handler.go, notifications.go)
- Improved scalability and separation of concerns in template rendering
2025-04-01 21:08:00 +01:00
0e20cc023c
more changes but unsure of state had to trash last set fof changes and try repair.
2025-04-01 15:50:15 +01:00
aaf90b55da
Lots of UI and admin changes, need to clean up the three audit log tables and a few other niggles.
2025-04-01 00:05:48 +01:00
0d33d65844
finalise ball colourings and display
2025-03-28 15:20:56 +00:00
75d8d1700e
updated so balls are coloured to their respective game. need to thing about set for life.
2025-03-28 14:52:50 +00:00
cabc283673
madness continues
2025-03-28 13:04:53 +00:00
23e0208317
Lots of changes around viewing tickets from css perspective logic changes nwe handlers and service triggers... just lots of stuff...
2025-03-28 10:05:54 +00:00
f7b54db7c1
Get ticket functionality.
2025-03-26 15:33:40 +00:00
9df4b173fb
remove println
2025-03-26 09:43:01 +00:00
e3f3d73fdd
Finally get login working.
2025-03-26 08:36:11 +00:00
b58a8bdb82
Circular dependancy issue when working on hardening
2025-03-25 16:43:16 +00:00
0b93fd75dd
add and refine thunderball results page
2025-03-25 14:47:41 +00:00