From b1b182ff32e4bc7d027f8777592251d871a13289 Mon Sep 17 00:00:00 2001 From: Rhys Nute <nuterd@cardiff.ac.uk> Date: Thu, 7 Dec 2023 10:38:47 +0000 Subject: [PATCH] added controllers --- .../Organisation/organisationControllers.java | 16 ++++++++++++++ src/main/resources/local-authorities.html | 21 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java create mode 100644 src/main/resources/local-authorities.html diff --git a/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java new file mode 100644 index 00000000..b9b1b8e3 --- /dev/null +++ b/src/main/java/Team5/SmartTowns/Organisation/organisationControllers.java @@ -0,0 +1,16 @@ +package Team5.SmartTowns.Organisation; + +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.ModelAndView; +import org.springframework.stereotype.Controller; +@Controller +public class organisationControllers { + @GetMapping("/localauthorities") + public ModelAndView getLocalAuthoritiesPage(){ + ModelAndView modelAndView = new ModelAndView("local-authorities"); + return modelAndView; + } +} diff --git a/src/main/resources/local-authorities.html b/src/main/resources/local-authorities.html new file mode 100644 index 00000000..896b9d4a --- /dev/null +++ b/src/main/resources/local-authorities.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>Local Authorities</title> + <link rel="stylesheet" href="static/css/templatingstyle.css"> +</head> +<header th:insert="~{/towns/Templating.html::header}"></header> +<body> +<h1>Local Authorities</h1> +<div id="councils"> + <p>Caerphilly County Borough Council,<br>Tredomen Park,<br> Ystrad Mynach,<br> Hengoed,<br> CF82 7PG</p> + <a href="https://www.caerphilly.gov.uk/main.aspx?lang=en-GB">Caerphilly County Borough Council Website</a> + <p>Risca Town Council,<br>Risca Palace Library,<br>Unit B,<br>75 Tredegar Street,<br>Risca,<br>NP11 6BW</p> + <a href="https://www.riscatowncouncil.org.uk/">Risca Town Council Website</a> + <p>Penarth Town Council West House,<br>Stanwell Road,<br>Penarth,<br> CF64 2YG</p> + <a href="https://www.penarthtowncouncil.gov.uk/your-council/">Penarth Town Council Website</a> +</div> +<footer th:insert="~{/towns/Templating.html::footer}"></footer> +</body> +</html> \ No newline at end of file -- GitLab