From c8ead774bc6768239c7a3308ee805f8599462eaa Mon Sep 17 00:00:00 2001
From: James2Tulloch <146088090+James2Tulloch@users.noreply.github.com>
Date: Fri, 7 Mar 2025 13:54:08 +0000
Subject: [PATCH] Groups frontend

---
 .../myapp/templates/myapp/group_create.html   | 21 ++++++++++---------
 .../myapp/templates/myapp/group_list.html     |  6 +++++-
 docker-compose.yml                            |  6 +++---
 3 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/django_project/myapp/templates/myapp/group_create.html b/django_project/myapp/templates/myapp/group_create.html
index 3017595..c55d83f 100644
--- a/django_project/myapp/templates/myapp/group_create.html
+++ b/django_project/myapp/templates/myapp/group_create.html
@@ -1,14 +1,14 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>Create Group</title>
-</head>
-<body>
+{% extends 'myapp/base.html' %}
+
+{% block title %}Create Group{% endblock %}
+
+{% block content %}
     <h1>Create Group</h1>
+
     {% if error %}
       <p style="color: red;">{{ error }}</p>
     {% endif %}
+
     <form method="post">
         {% csrf_token %}
         <label for="id_name">Group Name:</label>
@@ -16,7 +16,8 @@
         <br><br>
         <button type="submit">Create Group</button>
     </form>
-    <p><a href="{% url 'group_list' %}">Back to Group List</a></p>
-</body> 
-</html>
+
+    <p><a href="{% url 'group_list' %}" style="color: #007bff; text-decoration: none;">← Back to Group List</a></p>
+{% endblock %}
+
 
diff --git a/django_project/myapp/templates/myapp/group_list.html b/django_project/myapp/templates/myapp/group_list.html
index 9c012dc..1e37207 100644
--- a/django_project/myapp/templates/myapp/group_list.html
+++ b/django_project/myapp/templates/myapp/group_list.html
@@ -20,5 +20,9 @@
           <li>No groups available.</li>
       {% endfor %}
   </ul>
-
+  <div style="margin-top: 20px;">
+    <a href="{% url 'group_create' %}" style="display: inline-block; padding: 10px 15px; background-color: #007bff; color: white; text-decoration: none; border-radius: 5px;">
+        + Create New Group
+    </a>
+</div>
 {% endblock %}
diff --git a/docker-compose.yml b/docker-compose.yml
index 2a246a7..8310a9a 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -24,7 +24,7 @@ services:
         condition: service_healthy
     volumes:
       - ./media:/app/media
-      - static_volume:/app/staticfiles  # ✅ Make sure this volume exists
+      - static_volume:/app/staticfiles  
     ports:
       - "8000:8000"
     environment:
@@ -34,5 +34,5 @@ services:
       CSRF_TRUSTED_ORIGINS: "http://localhost:8000, http://127.0.0.1:8000"
 
 volumes:
-  pgdata: {}  # ✅ Keeps PostgreSQL data persistent
-  static_volume: {}  # ✅ Defines the missing static volume
+  pgdata: {}  
+  static_volume: {} 
-- 
GitLab