From 8ee5fd7a881ee747ea694d37a28b9f2cbf67bcee Mon Sep 17 00:00:00 2001
From: Aaron <Aaron8.jones@live.uwe.ac.uk>
Date: Sun, 30 Mar 2025 20:51:09 +0100
Subject: [PATCH] AI Engineer bug when viewing / deleting records fixed. new
 container!!!

---
 .../templates/modelForms/deleteRecord.html    |   2 +-
 .../DjangoProject/templates/profile.html      | 244 ++++--------------
 2 files changed, 53 insertions(+), 193 deletions(-)

diff --git a/ActualProjectCode/DjangoProject/templates/modelForms/deleteRecord.html b/ActualProjectCode/DjangoProject/templates/modelForms/deleteRecord.html
index 63ef563..0f317c8 100644
--- a/ActualProjectCode/DjangoProject/templates/modelForms/deleteRecord.html
+++ b/ActualProjectCode/DjangoProject/templates/modelForms/deleteRecord.html
@@ -95,7 +95,7 @@
         <form method="post">
             {% csrf_token %}
             <button type="submit" class="btn btn-danger">Yes, Delete</button>
-            <a href="{% url 'back_to_dashboard' %}" class="btn btn-secondary">Cancel</a>
+            <a href="{% url 'profile' %}" class="btn btn-secondary">Cancel</a>
         </form>
     </div>
 </body>
diff --git a/ActualProjectCode/DjangoProject/templates/profile.html b/ActualProjectCode/DjangoProject/templates/profile.html
index 6dce5e3..044041a 100644
--- a/ActualProjectCode/DjangoProject/templates/profile.html
+++ b/ActualProjectCode/DjangoProject/templates/profile.html
@@ -1,198 +1,58 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>ShallowSink - Dashboard</title>
-    {% load static %}
-    <link rel="stylesheet" href="{% static 'styles.css' %}">
-    <style>
-        /* General Styles */
-        body {
-            font-family: Arial, sans-serif;
-            margin: 0;
-            padding: 0;
-            background-color: #f4f4f4;
-            color: #333;
-        }
-
-        header {
-            background-color: #004085;
-            color: #ffffff;
-            padding: 15px 0;
-            text-align: center;
-        }
-
-        header h1 {
-            margin: 0;
-        }
-
-        /* Main Layout */
-        .container {
-            display: flex;
-            max-width: 1200px;
-            margin: 20px auto;
-            background: #ffffff;
-            border-radius: 8px;
-            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
-        }
-
-        /* Sidebar */
-        .sidebar {
-            width: 25%;
-            background-color: #f8f9fa;
-            padding: 20px;
-            border-right: 1px solid #ddd;
-        }
-
-        .sidebar h3 {
-            color: #004085;
-            margin-bottom: 15px;
-        }
-
-        .sidebar .profile-section {
-            margin-bottom: 20px;
-            font-size: 14px;
-        }
-
-        .sidebar .profile-section .info-label {
-            font-weight: bold;
-            color: #333;
-        }
-
-        .sidebar .profile-section .info-value {
-            color: #555;
-        }
-
-        /* Content Area */
-        .content {
-            width: 75%;
-            padding: 30px 20px;
-        }
-
-        .content h1 {
-            font-size: 24px;
-            color: #004085;
-        }
-
-        .content h2 {
-            font-size: 20px;
-            color: #004085;
-            margin-top: 20px;
-            margin-bottom: 10px;
-        }
-
-        .content p {
-            font-size: 16px;
-            line-height: 1.5;
-            margin-bottom: 10px;
-        }
-
-        .content a,
-        .content h1 a {
-            color: #004085;
-            text-decoration: none;
-            font-weight: bold;
-            border: 2px solid #004085;
-            padding: 8px 12px;
-            border-radius: 5px;
-            display: inline-block;
-            margin-top: 10px;
-            transition: background-color 0.3s, color 0.3s;
-        }
-
-        .content a:hover,
-        .content h1 a:hover {
-            background-color: #004085;
-            color: #ffffff;
-        }
-
-        .content hr {
-            margin: 30px 0;
-            border: none;
-            border-top: 1px solid #ddd;
-        }
-        .actions .logout-btn {
-           text-decoration: none;
-           display: inline-block;
-           font-weight: bold;
-           padding: 10px 16px;
-           background-color: #dc3545; /* Red background for logout */
-           color: #ffffff;
-           border: 2px solid #dc3545;
-           border-radius: 4px;
-           transition: background-color 0.3s, color 0.3s;
-           margin-left: 10px;
-       }
-
-       .actions .logout-btn:hover {
-           background-color: #c82333;
-           color: #ffffff;
-       }
-    </style>
+    <title>Profile</title>
 </head>
 <body>
-    <header>
-        <h1>ShallowSink Dashboard</h1>
-    </header>
-
-    <div class="container">
-        <!-- Sidebar Section -->
-        <div class="sidebar">
-            <h3>Your Profile</h3>
-            <div class="profile-section">
-                <p><span class="info-label">Username:</span> <span class="info-value">{{ user.username }}</span></p>
-                <p><span class="info-label">Email:</span> <span class="info-value">{{ user.email }}</span></p>
-                <p><span class="info-label">Role:</span> <span class="info-value">{{ user.profile.role }}</span></p>
-                <p><span class="info-label">Joined:</span> <span class="info-value">{{ user.date_joined|date:"F j, Y" }}</span></p>
-            </div>
-            <div class="actions">
-                <a href="{% url 'logout' %}" class="logout-btn">Logout</a>
-            </div>
-        </div>
-
-        <!-- Content Section -->
-        <div class="content">
-            <!-- Display the dynamic dashboard content -->
-            <h1>Welcome, {{ user.username }}!</h1>
-
-            {% if user.profile.role == 'ai_engineer' %}
-                <!-- AI Engineer Dashboard -->
-                <h2>AI Engineer Dashboard</h2>
-                <p>Access AI-related tools and data.</p>
-                <hr>
-                <h1>Upload Dataset</h1>
-                <h2><a href="{% url 'userUpload' %}">Upload</a></h2>
-                <h1>Upload new ML Model</h1>
-                <h2><a href="{% url 'mlUpload' %}">Upload</a></h2>
-                <hr>
-                <h1>Access ML Interactions</h1>
-                <h2><a href="{% url 'interactionView' %}">All Interactions</a></h2>
-
-            {% elif user.profile.role == 'finance' %}
-                <!-- Finance Dashboard -->
-                <h2>Finance Dashboard</h2>
-                <p>View financial reports and tools.</p>
-                <hr>
-                <h1><a href="{% url 'genBillings' %}">Generate Billings</a></h1>
-
-            {% elif user.profile.role == 'admin' %} <!-- Admin Dashboard -->
-                <h2>Admin Page</h2>
-                <p>View all Activity</p>
-                <p><a href="{% url 'manageUsers' %}">Manage Users</a></p>
-
-                <p><a href=""> View all Activity </a></p>
-
-            {% else %}
-                <!-- User Dashboard -->
-                <h2>User Dashboard</h2>
-                <p>Manage your tasks and profile.</p>
-                <hr>
-                <h2>Upload Files to ML</h2>
-                <h1><a href="{% url 'userUpload' %}">Upload Thing</a></h1>
-
-            {% endif %}
-
-
-        </div>
-    </div>
+    <nav>
+        <ul>
+            <li><a href="{% url 'logout' %}">Logout</a></li>
+        </ul>
+    </nav>
+    <h1>Welcome, {{ user.username }}!</h1>
+    {% if user.profile.role == 'ai_engineer' %} <!-- AI Dashboard -->
+        <h2>AI Engineer Dashboard</h2>
+        <p>Access AI-related tools and data.</p>
+        <br>
+        <h1>Upload new ML Model</h1>
+        <h2><a href="{% url 'mlUpload' %}">Upload</a></h2>
+        <br>
+        <h1>Access ML Interactions</h1>
+        <h2><a href="{% url 'interactionView' %}">All Interactions</a></h2> <!-- TO DO -->
+
+
+
+
+    {% elif user.profile.role == 'finance' %} <!-- Finance Dashboard -->
+        <h2>Finance Dashboard</h2>
+        <p>View financial reports and tools.</p>
+        <br>
+        <h1><a href="{% url 'genBillings' %}">Generate Billings</a></h1>
+
+
+
+
+    {% elif user.profile.role == 'admin' %} <!-- Admin Dashboard -->
+        <h2>Admin Page</h2>
+        <p>View all Activity</p>
+        <p><a href="{% url 'manageUsers' %}">Manage Users<a></a></p>
+
+        <p><a href=""> View all Activity </a></p>
+
+
+
+
+    {% else %} <!-- User Dashboard -->
+        <h2>User Dashboard</h2>
+        <p>Manage your tasks and profile.</p>
+        <br>
+        <h2>Upload Files to ML</h2>
+
+        <h1><a href="{% url 'userUpload' %}"> Upload Thing </a></h1>
+
+
+
+
+    {% endif %}
 </body>
-</html>
\ No newline at end of file
+</html>
-- 
GitLab