From be083479fe7f47a92012234be08e4491e79e27b8 Mon Sep 17 00:00:00 2001
From: Ivan Procaccini <ivanprocaccini905@gmail.com>
Date: Tue, 23 Aug 2022 11:36:53 +0100
Subject: [PATCH] Feat: Add student page to view projects

---
 app/templates/pages/{ => staff}/projects.html |  0
 app/templates/pages/student/projects.html     | 25 +++++++++++++++++++
 app/views/staff.py                            |  2 +-
 3 files changed, 26 insertions(+), 1 deletion(-)
 rename app/templates/pages/{ => staff}/projects.html (100%)
 create mode 100644 app/templates/pages/student/projects.html

diff --git a/app/templates/pages/projects.html b/app/templates/pages/staff/projects.html
similarity index 100%
rename from app/templates/pages/projects.html
rename to app/templates/pages/staff/projects.html
diff --git a/app/templates/pages/student/projects.html b/app/templates/pages/student/projects.html
new file mode 100644
index 0000000..6136671
--- /dev/null
+++ b/app/templates/pages/student/projects.html
@@ -0,0 +1,25 @@
+{% extends "components/layout.html" %}
+
+{% block content %}
+
+    <div class="w3-content">
+        <div class="w3-container">
+            <h1 class="w3-center w3-text-blue">All project proposals</h1>
+            <section class="w3-section">
+                <ul class="w3-ul">
+                    {% for project in projects %}
+                        <li class="w3-display-container">
+                            {{ project.title }}
+                            <div class="w3-display-right">
+                                <a href="" class="w3-button w3-hover-blue">View</a>
+                                <a href=""
+                                   class="w3-button w3-hover-blue">Shortlist</a>
+                            </div>
+                        </li>
+                    {% endfor %}
+                </ul>
+            </section>
+        </div>
+    </div>
+
+{% endblock %}
\ No newline at end of file
diff --git a/app/views/staff.py b/app/views/staff.py
index 300fe05..e18bac2 100644
--- a/app/views/staff.py
+++ b/app/views/staff.py
@@ -17,7 +17,7 @@ def projects():
         .filter(Project.deleted.is_(None))
         .all()
     )
-    return render_template("pages/projects.html", projects=active_projects)
+    return render_template("pages/staff/projects.html", projects=active_projects)
 
 
 @bp.route("/projects/create", methods=["GET", "POST"])
-- 
GitLab