major update
This commit is contained in:
@@ -1,178 +1,168 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>
|
||||
Civixfix - {% block title %}Community Issue Reporting Platform{% endblock %}
|
||||
</title>
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link
|
||||
href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css"
|
||||
rel="stylesheet"
|
||||
/>
|
||||
<link rel="preload" as="image" href="https://a.tile.openstreetmap.org/13/4521/2632.png">
|
||||
<link rel="preload" as="image" href="https://b.tile.openstreetmap.org/13/4521/2632.png">
|
||||
|
||||
<link rel="preload" as="font" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2" type="font/woff2" crossorigin>
|
||||
<!-- Font Awesome -->
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
|
||||
/>
|
||||
<!-- Custom CSS -->
|
||||
<style>
|
||||
.hero-section {
|
||||
background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
|
||||
url("https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?ixlib=rb-4.0.3");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
color: white;
|
||||
padding: 100px 0;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.feature-icon {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #0d6efd;
|
||||
}
|
||||
.issue-card {
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
.issue-card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
</style>
|
||||
{% block extra_css %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{% url 'home' %}">
|
||||
<i class="fas fa-bullhorn me-2"></i>Civixfix
|
||||
</a>
|
||||
<button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#navbarNav"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="{% url 'home' %}">Home</a>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>
|
||||
Civixfix - {% block title %}Community Issue Reporting Platform{% endblock %}
|
||||
</title>
|
||||
<!-- Bootstrap 5 CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" />
|
||||
<link rel="preload" as="image" href="https://a.tile.openstreetmap.org/13/4521/2632.png">
|
||||
<link rel="preload" as="image" href="https://b.tile.openstreetmap.org/13/4521/2632.png">
|
||||
|
||||
<link rel="preload" as="font"
|
||||
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2" type="font/woff2"
|
||||
crossorigin>
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
|
||||
<!-- Custom CSS -->
|
||||
<style>
|
||||
.hero-section {
|
||||
background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
|
||||
url("https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?ixlib=rb-4.0.3");
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
color: white;
|
||||
padding: 100px 0;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.feature-icon {
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 1rem;
|
||||
color: #0d6efd;
|
||||
}
|
||||
|
||||
.issue-card {
|
||||
transition: transform 0.3s;
|
||||
}
|
||||
|
||||
.issue-card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
</style>
|
||||
{% block extra_css %}{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!-- Navigation -->
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="{% url 'home' %}">
|
||||
<i class="fas fa-bullhorn me-2"></i>Civixfix
|
||||
</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav me-auto">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="{% url 'home' %}">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#features">Features</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#how-it-works">How It Works</a>
|
||||
</li>
|
||||
{% if user.is_authenticated and user.is_citizen %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'citizen_dashboard' %}">Dashboard</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<!-- 🔥 ADD THE DROPDOWN CODE RIGHT HERE 🔥 -->
|
||||
<div class="d-flex">
|
||||
{% if user.is_authenticated %}
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-outline-light dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-user me-1"></i> {{ user.username }}
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{% url 'citizen_dashboard' %}">Dashboard</a>
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="#">Profile</a></li>
|
||||
{% if user.is_superuser %}
|
||||
<li>
|
||||
<a class="dropdown-item text-danger fw-bold" href="{% url 'superadmin_dashboard' %}">
|
||||
<i class="fas fa-crown me-1"></i> Super Admin
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<hr class="dropdown-divider" />
|
||||
</li>
|
||||
<li>
|
||||
<form method="post" action="{% url 'logout' %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="dropdown-item">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="{% url 'login' %}" class="btn btn-outline-light me-2">Login</a>
|
||||
<a href="{% url 'register' %}" class="btn btn-primary">Register</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main>{% block content %}{% endblock %}</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="text-black py-4 mt-5">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-3">
|
||||
<h5><i class="fas fa-bullhorn me-2"></i>Civixfix</h5>
|
||||
<p class="text-muted">
|
||||
Empowering communities through transparent issue reporting and
|
||||
resolution.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<h5>Quick Links</h5>
|
||||
<ul class="list-unstyled">
|
||||
<li>
|
||||
<a href="#features" class="text-decoration-none text-muted">Features</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#features">Features</a>
|
||||
<li>
|
||||
<a href="#how-it-works" class="text-decoration-none text-muted">How It Works</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#how-it-works">How It Works</a>
|
||||
<li>
|
||||
<a href="#" class="text-decoration-none text-muted">Privacy Policy</a>
|
||||
</li>
|
||||
{% if user.is_authenticated and user.is_citizen %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'citizen_dashboard' %}"
|
||||
>Dashboard</a
|
||||
>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<!-- 🔥 ADD THE DROPDOWN CODE RIGHT HERE 🔥 -->
|
||||
<div class="d-flex">
|
||||
{% if user.is_authenticated %}
|
||||
<div class="dropdown">
|
||||
<button
|
||||
class="btn btn-outline-light dropdown-toggle"
|
||||
type="button"
|
||||
data-bs-toggle="dropdown"
|
||||
>
|
||||
<i class="fas fa-user me-1"></i> {{ user.username }}
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end">
|
||||
<li>
|
||||
<a class="dropdown-item" href="{% url 'citizen_dashboard' %}"
|
||||
>Dashboard</a
|
||||
>
|
||||
</li>
|
||||
<li><a class="dropdown-item" href="#">Profile</a></li>
|
||||
<li><hr class="dropdown-divider" /></li>
|
||||
<li>
|
||||
<form method="post" action="{% url 'logout' %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit" class="dropdown-item">Logout</button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{% else %}
|
||||
<a href="{% url 'login' %}" class="btn btn-outline-light me-2"
|
||||
>Login</a
|
||||
>
|
||||
<a href="{% url 'register' %}" class="btn btn-primary">Register</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<h5>Contact</h5>
|
||||
<ul class="list-unstyled text-muted">
|
||||
<li>
|
||||
<i class="fas fa-envelope me-2"></i> gokuldevse2001@gmail.com
|
||||
</li>
|
||||
<li><i class="fas fa-phone me-2"></i> +91 8129329073</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Main Content -->
|
||||
<main>{% block content %}{% endblock %}</main>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer class="text-black py-4 mt-5">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-4 mb-3">
|
||||
<h5><i class="fas fa-bullhorn me-2"></i>Civixfix</h5>
|
||||
<p class="text-muted">
|
||||
Empowering communities through transparent issue reporting and
|
||||
resolution.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<h5>Quick Links</h5>
|
||||
<ul class="list-unstyled">
|
||||
<li>
|
||||
<a href="#features" class="text-decoration-none text-muted"
|
||||
>Features</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#how-it-works" class="text-decoration-none text-muted"
|
||||
>How It Works</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#" class="text-decoration-none text-muted"
|
||||
>Privacy Policy</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-4 mb-3">
|
||||
<h5>Contact</h5>
|
||||
<ul class="list-unstyled text-muted">
|
||||
<li>
|
||||
<i class="fas fa-envelope me-2"></i> gokuldevse2001@gmail.com
|
||||
</li>
|
||||
<li><i class="fas fa-phone me-2"></i> +91 8129329073</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<hr class="my-4 bg-secondary" />
|
||||
<div class="text-center text-muted">
|
||||
<small>© {% now "Y" %} Civixfix. All rights reserved.</small>
|
||||
</div>
|
||||
<hr class="my-4 bg-secondary" />
|
||||
<div class="text-center text-muted">
|
||||
<small>© {% now "Y" %} Civixfix. All rights reserved.</small>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<!-- Bootstrap 5 JS Bundle with Popper -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- jQuery -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
|
||||
<!-- Bootstrap 5 JS Bundle with Popper -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- jQuery -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,45 @@
|
||||
{% extends "core/base.html" %}
|
||||
{% block content %}
|
||||
<div class="container my-5">
|
||||
<div class="card shadow-lg">
|
||||
<div class="card-header bg-primary text-white d-flex justify-content-between align-items-center">
|
||||
<h3>{{ department.name }} Department</h3>
|
||||
<a href="{% url 'manage_departments' %}" class="btn btn-light btn-sm">⬅ Back</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
<h5>Department Users</h5>
|
||||
{% if users %}
|
||||
<ul class="list-group mb-3">
|
||||
{% for user in users %}
|
||||
<li class="list-group-item">
|
||||
{{ user.username }} — {{ user.email }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="text-muted">No users registered in this department yet.</p>
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
<h5>Register New User for {{ department.name }}</h5>
|
||||
<form method="post" class="row g-2">
|
||||
{% csrf_token %}
|
||||
<div class="col-md-3">
|
||||
<input type="text" name="username" class="form-control" placeholder="Username" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="email" name="email" class="form-control" placeholder="Email">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<input type="password" name="password" class="form-control" placeholder="Password" required>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<button type="submit" class="btn btn-primary w-100">Create User</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,48 @@
|
||||
<!-- core/templates/core/manage_departments.html -->
|
||||
{% extends "core/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container my-5">
|
||||
<div class="card shadow-lg">
|
||||
<div class="card-header bg-success text-white d-flex justify-content-between align-items-center">
|
||||
<h3>Manage Departments</h3>
|
||||
<a href="{% url 'superadmin_dashboard' %}" class="btn btn-light btn-sm">Back to Dashboard</a>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- List departments -->
|
||||
{% if departments %}
|
||||
<ul class="list-group mb-3">
|
||||
{% for dept in departments %}
|
||||
<a href="{% url 'department_detail' dept.pk %}"
|
||||
class="list-group-item list-group-item-action d-flex justify-content-between align-items-center">
|
||||
<span>
|
||||
<strong>{{ dept.name }}</strong><br>
|
||||
<small class="text-muted">{{ dept.description }}</small>
|
||||
</span>
|
||||
<span class="badge bg-primary rounded-pill">Manage</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% else %}
|
||||
<p class="text-muted">No departments added yet.</p>
|
||||
{% endif %}
|
||||
|
||||
<!-- Add new department form -->
|
||||
<form method="post" class="mt-3">
|
||||
{% csrf_token %}
|
||||
<div class="row g-2">
|
||||
<div class="col-md-4">
|
||||
<input type="text" name="name" class="form-control" placeholder="Department name" required>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="description" class="form-control" placeholder="Description (optional)">
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-success w-100">Add</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,35 @@
|
||||
<!-- core/templates/core/superadmin_dashboard.html -->
|
||||
{% extends "core/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container my-5">
|
||||
<div class="card shadow-lg">
|
||||
<div class="card-header bg-dark text-white">
|
||||
<h3>Super Admin Dashboard</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p>Welcome, {{ request.user.username }} 👑</p>
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">
|
||||
<i class="fas fa-users me-2 text-primary"></i>
|
||||
<a href="#">Manage Users</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<i class="fas fa-building me-2 text-success"></i>
|
||||
<a href="{% url 'manage_departments' %}">Manage Departments</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<a href="#">Manage Roles & Permissions</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<a href="#">View Analytics & Reports</a>
|
||||
</li>
|
||||
<li class="list-group-item">
|
||||
<a href="#">System Settings</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user