update
This commit is contained in:
1 parent
0504b881fb
commit
36e08cc230
110 files changed
+18389
-870
No files matched your search
@@ -0,0 +1,86 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add Course Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_academicyear_add' %}" class="button">
|
||||
<button type="button" class="btn btn-primary">Add New Academic Year</button>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Course List Table -->
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Year</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for academic_year in academic_years %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ academic_year.year }}</td>
|
||||
<td>
|
||||
<a href="{% url 'admin:app_academicyear_change' academic_year.id %}"
|
||||
class="button btn-edit">
|
||||
<button type="button" class="btn btn-warning btn-sm">Edit</button>
|
||||
</a>
|
||||
<a href="{% url 'admin:app_academicyear_delete' academic_year.year %}"
|
||||
class="button btn-delete">
|
||||
<button type="button" class="btn btn-danger btn-sm">Delete</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">No academic years found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<style>
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 0 4px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-warning {
|
||||
background-color: #ffc107;
|
||||
color: black;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 1rem;
|
||||
background-color: white;
|
||||
}
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #f8f9fa;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,99 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add Course Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_course_add' %}" class="button">
|
||||
<button type="button" class="btn btn-primary">Add New Course</button>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Course List Table -->
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Course Name</th>
|
||||
<th>Level</th>
|
||||
<th>Course Type</th>
|
||||
<th>Duration</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for course in courses %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ course.name }}</td>
|
||||
<td>{{ course.get_level_display }}</td>
|
||||
<td>{{ course.get_course_type_display }}</td>
|
||||
<td>
|
||||
{{ course.duration }}
|
||||
{% if course.course_type == 'semester' %}
|
||||
Semesters
|
||||
{% else %}
|
||||
Years
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'admin:app_course_change' course.id %}"
|
||||
class="button btn-edit">
|
||||
<button type="button" class="btn btn-warning btn-sm">Edit</button>
|
||||
</a>
|
||||
<a href="{% url 'admin:app_course_delete' course.id %}"
|
||||
class="button btn-delete">
|
||||
<button type="button" class="btn btn-danger btn-sm">Delete</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">No courses found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<style>
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 0 4px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-warning {
|
||||
background-color: #ffc107;
|
||||
color: black;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 1rem;
|
||||
background-color: white;
|
||||
}
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #f8f9fa;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,87 @@
|
||||
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add Attendance Record Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_attendance_add' %}" class="btn btn-primary">Add Attendance Record</a>
|
||||
</div>
|
||||
|
||||
<!-- Attendance List Table -->
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Student</th>
|
||||
<th>Subject</th>
|
||||
<th>Date</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for record in attendance_records %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ record.student.name }}</td>
|
||||
<td>{{ record.subject.name }}</td>
|
||||
<td>{{ record.date|date:"Y-m-d" }}</td>
|
||||
<td>{{ record.get_status_display }}</td>
|
||||
<td>
|
||||
<!-- Edit and Delete Actions -->
|
||||
<a href="{% url 'admin:app_attendance_change' record.id %}" class="btn btn-warning btn-sm">Edit</a>
|
||||
<a href="{% url 'admin:app_attendance_delete' record.id %}" class="btn btn-danger btn-sm">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">No attendance records found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 0 4px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-warning {
|
||||
background-color: #ffc107;
|
||||
color: black;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 1rem;
|
||||
background-color: white;
|
||||
}
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #f8f9fa;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,92 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add Book Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_library_add' %}" class="btn btn-primary">Add New Book</a>
|
||||
</div>
|
||||
|
||||
<!-- Library Book List Table -->
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Category</th>
|
||||
<th>Book Name</th>
|
||||
<th>Description</th>
|
||||
<th>Publication</th>
|
||||
<th>Publication Year</th>
|
||||
<th>Quantity</th>
|
||||
<th>Available</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for book in books %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ book.category }}</td>
|
||||
<td>{{ book.book_name }}</td>
|
||||
<td>{{ book.description }}</td>
|
||||
<td>{{ book.publication }}</td>
|
||||
<td>{{ book.publication_year }}</td>
|
||||
<td>{{ book.quantity }}</td>
|
||||
<td>{{ book.get_available_display }}</td>
|
||||
<td>
|
||||
<!-- Edit and Delete Actions -->
|
||||
<a href="{% url 'admin:app_library_change' book.id %}" class="btn btn-warning btn-sm">Edit</a>
|
||||
<a href="{% url 'admin:app_library_delete' book.id %}" class="btn btn-danger btn-sm">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="10" class="text-center">No books found in the library.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 0 4px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-warning {
|
||||
background-color: #ffc107;
|
||||
color: black;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 1rem;
|
||||
background-color: white;
|
||||
}
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #f8f9fa;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,166 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add Marksheet Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_marksheet_add' %}" class="button">
|
||||
<button type="button" class="btn btn-primary">Add New Marksheet</button>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Marksheet List Table -->
|
||||
<table class="table table-striped">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Student Name</th>
|
||||
<th>Course</th>
|
||||
<th>Total Marks</th>
|
||||
<th>Obtained Marks</th>
|
||||
<th>Grade</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for marksheet in marksheets %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ marksheet.student.first_name }} {{ marksheet.student.last_name }}</td>
|
||||
<td>{{ marksheet.course.name }}</td>
|
||||
<td>{{ marksheet.total_marks }}</td>
|
||||
<td>{{ marksheet.obtained_marks }}</td>
|
||||
<td>
|
||||
<span class="grade-badge grade-{{ marksheet.grade|lower }}">{{ marksheet.grade }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{% url 'admin:app_marksheet_change' marksheet.id %}"
|
||||
class="button btn-edit">
|
||||
<button type="button" class="btn btn-warning btn-sm">Edit</button>
|
||||
</a>
|
||||
<a href="{% url 'admin:app_marksheet_delete' marksheet.id %}"
|
||||
class="button btn-delete">
|
||||
<button type="button" class="btn btn-danger btn-sm">Delete</button>
|
||||
</a>
|
||||
<a href="{% url 'app_marksheet_view' marksheet.id %}" class="button btn-view">
|
||||
<button type="button" class="btn btn-info btn-sm">View</button>
|
||||
</a>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">No marksheets found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="#" class="btn btn-success" onclick="window.print();"><i class="fas fa-print"></i> Print PDF</a>
|
||||
</div>
|
||||
<style>
|
||||
/* Custom Button Styles */
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 2px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-info {
|
||||
background-color: #17a2b8;
|
||||
color: white;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
td,th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* Table Styling */
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #343a40;
|
||||
color: white;
|
||||
}
|
||||
.table-striped tbody tr:nth-of-type(odd) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* Print Styles */
|
||||
@media print {
|
||||
.container {
|
||||
padding: 0;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 8px;
|
||||
}
|
||||
.btn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Container Padding */
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
.grade-badge {
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
.grade-a\+ {
|
||||
background-color: #28a745; /* Green for A+ */
|
||||
}
|
||||
.grade-a {
|
||||
background-color: #20c997; /* Teal for A */
|
||||
}
|
||||
.grade-b\+ {
|
||||
background-color: #17a2b8; /* Cyan for B+ */
|
||||
}
|
||||
.grade-b {
|
||||
background-color: #007bff; /* Blue for B */
|
||||
}
|
||||
.grade-c\+ {
|
||||
background-color: #6f42c1; /* Purple for C+ */
|
||||
}
|
||||
.grade-c {
|
||||
background-color: #fd7e14; /* Orange for C */
|
||||
}
|
||||
.grade-d {
|
||||
background-color: #ffc107; /* Yellow for D */
|
||||
}
|
||||
.grade-e {
|
||||
background-color: #dc3545; /* Red for E */
|
||||
}
|
||||
@media print {
|
||||
.container {
|
||||
padding: 0;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 8px;
|
||||
}
|
||||
.btn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,61 @@
|
||||
{%extends 'admin/base_site.html'%}
|
||||
{%block content%}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Marksheet PDF</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0;
|
||||
}
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
}
|
||||
th, td {
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Marksheet for {{ student.user.get_full_name }}</h1>
|
||||
<p><strong>Roll Number:</strong> {{ student.roll_number }}</p>
|
||||
<p><strong>Class:</strong> {{ student.class_name }}</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Subject</th>
|
||||
<th>Obtained Marks</th>
|
||||
<th>Total Marks</th>
|
||||
<th>Grade</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for mark in marks %}
|
||||
<tr>
|
||||
<td>{{ mark.subject.name }}</td>
|
||||
<td>{{ mark.obtained_marks }}</td>
|
||||
<td>{{ mark.total_marks }}</td>
|
||||
<td>{{ mark.grade }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p><strong>Total Marks Obtained:</strong> {{ total_marks_obtained }}</p>
|
||||
<p><strong>Total Marks:</strong> {{ total_marks }}</p>
|
||||
<p><strong>Overall Percentage:</strong> {{ percentage|floatformat:2 }}%</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,86 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add News/Event Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_newsevent_add' %}" class="btn btn-primary">Add New News/Event</a>
|
||||
</div>
|
||||
|
||||
<!-- News/Event List Table -->
|
||||
<table class="table table-striped text-center">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Title</th>
|
||||
<th>Summary</th>
|
||||
<th>Type</th>
|
||||
<th>Created At</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for item in news_events %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ item.title }}</td>
|
||||
<td>{{ item.summary|truncatewords:20 }}</td>
|
||||
<td>{{ item.get_type_display }}</td>
|
||||
<td>{{ item.created_at|date:"Y-m-d H:i" }}</td>
|
||||
<td>
|
||||
<!-- Edit and Delete Actions -->
|
||||
<a href="{% url 'admin:app_newsevent_change' item.id %}" class="btn btn-warning btn-sm">Edit</a>
|
||||
<a href="{% url 'admin:app_newsevent_delete' item.id %}" class="btn btn-danger btn-sm">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">No news or events found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 0 4px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-warning {
|
||||
background-color: #ffc107;
|
||||
color: black;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 1rem;
|
||||
background-color: white;
|
||||
}
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #f8f9fa;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,120 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add Staff Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_staff_add' %}" class="btn btn-primary">
|
||||
<i class="fas fa-user-plus"></i> Add New Staff
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Staff List Table -->
|
||||
<table class="table table-striped text-center">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Full Name</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th>Position</th>
|
||||
<th>Date of Joining</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for staff in staff_members %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ staff.first_name }} {{ staff.middle_name|default:'' }} {{ staff.last_name }}</td>
|
||||
<td>{{ staff.email }}</td>
|
||||
<td>{{ staff.phone }}</td>
|
||||
<td>{{ staff.position }}</td>
|
||||
<td>{{ staff.date_of_joining }}</td>
|
||||
<td>
|
||||
<!-- View Button -->
|
||||
<a href="{% url 'admin:app_staff_change' staff.id %}" class="btn btn-info btn-sm">
|
||||
<i class="fas fa-eye"></i> View
|
||||
</a>
|
||||
<!-- Delete Button -->
|
||||
<a href="{% url 'admin:app_staff_delete' staff.id %}" class="btn btn-danger btn-sm"
|
||||
onclick="return confirm('Are you sure you want to delete this staff member?');">
|
||||
<i class="fas fa-trash-alt"></i> Delete
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="7" class="text-center">No staff members found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Custom Styles -->
|
||||
<style>
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 2px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-info {
|
||||
background-color: #17a2b8;
|
||||
color: white;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* Table Styling */
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #343a40;
|
||||
color: white;
|
||||
}
|
||||
.table-striped tbody tr:nth-of-type(odd) {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
}
|
||||
td,th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* Print-Friendly Styles */
|
||||
@media print {
|
||||
.container {
|
||||
padding: 0;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 8px;
|
||||
}
|
||||
.btn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Container Padding */
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,127 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_student_add' %}" class="btn btn-primary">
|
||||
<i class="fas fa-user-plus"></i> Add New Student
|
||||
</a>
|
||||
</div>
|
||||
<table class="table table-striped text-center">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th>Course</th>
|
||||
<th>Academic Year</th>
|
||||
<th>Father Name</th>
|
||||
<th>Mother Name</th>
|
||||
<th>Guardian</th>
|
||||
<th>Guardian's Phone</th>
|
||||
<th>Relation</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for student in students %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ student.first_name }} {{ student.middle_name|default:'' }} {{ student.last_name }}</td>
|
||||
<td>{{ student.email }}</td>
|
||||
<td>{{ student.phone }}</td>
|
||||
<td>{{ student.course.name }}</td>
|
||||
<td>{{ student.academic_year.year }}</td>
|
||||
<td>{{ student.father_name }}</td>
|
||||
<td>{{ student.mother_name }}</td>
|
||||
<td>{{ student.guardian_name}}</td>
|
||||
<td>{{ student.guardian_phone_no }}</td>
|
||||
<td>{{ student.relationship_with_student }}</td>
|
||||
<td>
|
||||
<a href="{% url 'admin:app_student_change' student.id %}" class="btn btn-info btn-sm">
|
||||
<i class="fas fa-eye"></i> View
|
||||
</a>
|
||||
<a href="{% url 'admin:app_student_delete' student.id %}" class="btn btn-danger btn-sm"
|
||||
onclick="return confirm('Are you sure you want to delete this student?');">
|
||||
<i class="fas fa-trash-alt"></i> Delete
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="7" class="text-center">No students found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<a href="#" class="btn btn-success" onclick="window.print();"><i class="fas fa-print"></i> Print PDF</a>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
/* Custom Button Styles */
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 2px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-info {
|
||||
background-color: #17a2b8;
|
||||
color: white;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
td,th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* Table Styling */
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #343a40;
|
||||
color: white;
|
||||
}
|
||||
.table-striped tbody tr:nth-of-type(odd) {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* Print Styles */
|
||||
@media print {
|
||||
.container {
|
||||
padding: 0;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 8px;
|
||||
}
|
||||
.btn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Container Padding */
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,90 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add Subject Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_subject_add' %}" class="btn btn-primary">Add New Subject</a>
|
||||
</div>
|
||||
|
||||
<!-- Subject List Table -->
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Name</th>
|
||||
<th>Course</th>
|
||||
<th>Semester/Year</th>
|
||||
<th>Teacher</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for subject in subjects %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ subject.name }}</td>
|
||||
<td>{{ subject.course.name }}</td>
|
||||
<td>{{ subject.semester_or_year_number }}</td>
|
||||
<td>{% if subject.teacher %}
|
||||
{{ subject.teacher.name }}
|
||||
{% else %}
|
||||
N/A
|
||||
{% endif %}</td>
|
||||
<td>
|
||||
<!-- Edit and Delete Actions -->
|
||||
<a href="{% url 'admin:app_subject_change' subject.id %}" class="btn btn-warning btn-sm">Edit</a>
|
||||
<a href="{% url 'admin:app_subject_delete' subject.id %}" class="btn btn-danger btn-sm">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="6" class="text-center">No subjects found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 0 4px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-warning {
|
||||
background-color: #ffc107;
|
||||
color: black;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-bottom: 1rem;
|
||||
background-color: white;
|
||||
}
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #f8f9fa;
|
||||
border-bottom: 2px solid #dee2e6;
|
||||
}
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,124 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<!-- Add Teacher Button -->
|
||||
<div class="mb-4">
|
||||
<a href="{% url 'admin:app_teacher_add' %}" class="btn btn-primary">
|
||||
<i class="fas fa-user-plus"></i> Add New Teacher
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Teachers List Table -->
|
||||
<table class="table table-striped table-hover text-center">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Name</th>
|
||||
<th>Email</th>
|
||||
<th>Phone</th>
|
||||
<th>Gender</th>
|
||||
<th>Qualification</th>
|
||||
<th>Specialization</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for teacher in teachers %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ teacher.first_name }} {{ teacher.last_name }}</td>
|
||||
<td>{{ teacher.email }}</td>
|
||||
<td>{{ teacher.phone }}</td>
|
||||
<td>{{ teacher.get_gender_display }}</td>
|
||||
<td>{{ teacher.get_qualification_display }}</td>
|
||||
<td>{{ teacher.specialization }}</td>
|
||||
<td>
|
||||
<!-- Edit Button -->
|
||||
<a href="{% url 'admin:app_teacher_change' teacher.id %}" class="btn btn-warning btn-sm">
|
||||
<i class="fas fa-edit"></i> Edit
|
||||
</a>
|
||||
<!-- Delete Button -->
|
||||
<a href="{% url 'admin:app_teacher_delete' teacher.id %}" class="btn btn-danger btn-sm"
|
||||
onclick="return confirm('Are you sure you want to delete this teacher?');">
|
||||
<i class="fas fa-trash-alt"></i> Delete
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="8" class="text-center">No teachers found.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Custom Styles -->
|
||||
<style>
|
||||
.btn {
|
||||
padding: 6px 12px;
|
||||
margin: 0 4px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #007bff;
|
||||
color: white;
|
||||
}
|
||||
.btn-warning {
|
||||
background-color: #ffc107;
|
||||
color: black;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
color: white;
|
||||
}
|
||||
.btn:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
/* Table Styling */
|
||||
.table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 12px;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
.table thead th {
|
||||
background-color: #343a40;
|
||||
color: white;
|
||||
}
|
||||
.table-striped tbody tr:nth-of-type(odd) {
|
||||
background-color: #f8f9fa;
|
||||
}
|
||||
.table-hover tbody tr:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.table-responsive {
|
||||
overflow-x: auto;
|
||||
}
|
||||
td,th {
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* Print-Friendly Styles */
|
||||
@media print {
|
||||
.container {
|
||||
padding: 0;
|
||||
}
|
||||
.table th, .table td {
|
||||
padding: 8px;
|
||||
}
|
||||
.btn {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Container Padding */
|
||||
.container {
|
||||
padding: 20px;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,129 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<div class="container p-4">
|
||||
<a href="{% url 'admin:app_marksheet_changelist' %}" class="btn btn-primary">Back to Marksheet List</a>
|
||||
<div class="text-center mb-4">
|
||||
<h3>GOVERNMENT OF NEPAL</h3>
|
||||
<h4>MINISTRY OF EDUCATION</h4>
|
||||
<h5>OFFICE OF THE CONTROLLER OF EXAMINATIONS</h5>
|
||||
<h6>{{ exam_year }}</h6>
|
||||
<hr>
|
||||
<h4>MARK - SHEET</h4>
|
||||
</div>
|
||||
|
||||
<!-- Student Information -->
|
||||
<div class="card mb-4">
|
||||
<div class="card-body">
|
||||
<h4>THE MARKS SECURED BY : <u><b>{{ marksheet.student.first_name }} {{ marksheet.student.last_name }}</b> </u> </h4>
|
||||
<H4>DATE OF BIRTH :<u><b>{{ marksheet.student.date_of_birth }}</b> </u> </H4>
|
||||
|
||||
<H4>Course:<u><b>{{ marksheet.course.name }} </b> </u> </H4>
|
||||
<H4>Roll No: <u><b> 124 </b> </u> </H4>
|
||||
<H4> OF <u><b> {{ school_name }} </b> </u> </H4>
|
||||
<H4> IN THE ANNUAL EXAMINATION OF <u><b> 2081 </b> </u> ARE GIVEN BELOW </H4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Subject Marks Table -->
|
||||
<table class="table table-bordered">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Subject</th>
|
||||
<th>Theory (Out of {{ theory_max }})</th>
|
||||
<th>Practical (Out of {{ practical_max }})</th>
|
||||
<th>Total Marks</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for subject_mark in marksheet.subject_marks.all %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ subject_mark.subject.name }}</td>
|
||||
<td>{{ subject_mark.obtained_theory_marks }}</td>
|
||||
<td>{{ subject_mark.obtained_practical_marks }}</td>
|
||||
<td>{{ subject_mark.total_marks }}</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td colspan="5" class="text-center">No subjects found for this marksheet.</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Total, Percentage, and Grade -->
|
||||
<div class="mt-4">
|
||||
<h5><strong>Total Marks:</strong> {{ marksheet.total_marks }}</h5>
|
||||
<h5><strong>Obtained Marks:</strong> {{ marksheet.obtained_marks }}</h5>
|
||||
<h5><strong>Percentage:</strong> {{ percentage|floatformat:2 }}%</h5>
|
||||
<h5><strong>Overall Grade:</strong>
|
||||
<span class="grade-badge grade-{{ marksheet.grade|lower }}">{{ marksheet.grade }}</span>
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
<!-- Actions -->
|
||||
<div class="mt-4 text-center">
|
||||
|
||||
<a href="#" class="btn btn-success" onclick="window.print();"><i class="fas fa-print"></i> Print Marksheet</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Styling -->
|
||||
<style>
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: auto;
|
||||
background: #f9f9f9;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.text-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table {
|
||||
margin-top: 20px;
|
||||
width: 100%;
|
||||
border: 1px solid #dee2e6;
|
||||
}
|
||||
|
||||
.table th, .table td {
|
||||
padding: 8px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.thead-dark th {
|
||||
background-color: #343a40;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.grade-badge {
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
font-weight: bold;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.grade-a\+ { background-color: #28a745; }
|
||||
.grade-a { background-color: #20c997; }
|
||||
.grade-b\+ { background-color: #17a2b8; }
|
||||
.grade-b { background-color: #007bff; }
|
||||
.grade-c\+ { background-color: #6f42c1; }
|
||||
.grade-c { background-color: #fd7e14; }
|
||||
.grade-d { background-color: #ffc107; }
|
||||
.grade-e { background-color: #dc3545; }
|
||||
|
||||
@media print {
|
||||
.btn {
|
||||
display: none;
|
||||
}
|
||||
.container {
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -36,117 +36,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row col-12">
|
||||
<div class="col-12 col-md-6 col-lg-6">
|
||||
<table class="text-center table table-bordered">
|
||||
<thead class="table-dark">
|
||||
<th>S.N</th>
|
||||
<th>Name</th>
|
||||
<th>Course</th>
|
||||
<th>Academic Year</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<td>1</td>
|
||||
<td>hello</td>
|
||||
<td>DCOM</td>
|
||||
<td>2023</td>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-6">
|
||||
<table class="text-center table table-bordered">
|
||||
<thead class="table-dark">
|
||||
<th>S.N</th>
|
||||
<th>Name</th>
|
||||
<th>Address</th>
|
||||
<th>Phone No</th>
|
||||
<th>Gmail</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>hello</td>
|
||||
<td>kohalpur</td>
|
||||
<td>9801230123</td>
|
||||
<td>example@example.com</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Pie Chart -->
|
||||
<div class="row col-12 col-lg-6 chart-container">
|
||||
<canvas id="pieChart"></canvas>
|
||||
</div>
|
||||
<!-- Bar Chart -->
|
||||
<div class="row col-12 col-lg-6 chart-container">
|
||||
<canvas id="barChart"></canvas>
|
||||
</div>
|
||||
<!-- Line Chart -->
|
||||
<div class="row col-12 col-lg-6 chart-container">
|
||||
<canvas id="lineChart"></canvas>
|
||||
</div>
|
||||
<script>
|
||||
// Pie Chart
|
||||
const pieCtx = document.getElementById("pieChart").getContext("2d");
|
||||
new Chart(pieCtx, {
|
||||
type: "pie",
|
||||
data: {
|
||||
labels: ["Category A", "Category B", "Category C"],
|
||||
datasets: [
|
||||
{
|
||||
data: [30, 50, 20],
|
||||
backgroundColor: ["#FF6384", "#36A2EB", "#FFCE56"],
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
// Bar Chart
|
||||
const barCtx = document.getElementById("barChart").getContext("2d");
|
||||
new Chart(barCtx, {
|
||||
type: "bar",
|
||||
data: {
|
||||
labels: ["Category A", "Category B", "Category C"],
|
||||
datasets: [
|
||||
{
|
||||
label: "Values",
|
||||
data: [30, 50, 20],
|
||||
backgroundColor: ["#FF6384", "#36A2EB", "#FFCE56"],
|
||||
},
|
||||
],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Line Chart
|
||||
const lineCtx = document.getElementById("lineChart").getContext("2d");
|
||||
new Chart(lineCtx, {
|
||||
type: "line",
|
||||
data: {
|
||||
labels: ["January", "February", "March", "April"],
|
||||
datasets: [
|
||||
{
|
||||
label: "Values",
|
||||
data: [10, 30, 20, 40],
|
||||
borderColor: "#36A2EB",
|
||||
fill: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
+1377
File diff suppressed because it is too large.
Load diff
@@ -1,77 +0,0 @@
|
||||
<!-- templates/marksheet/marksheet_detail.html -->
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<div class="container mx-auto p-4">
|
||||
<div class="bg-white shadow-lg rounded-lg p-6">
|
||||
<!-- Student & Course Info -->
|
||||
<div class="mb-6 border-b pb-4">
|
||||
<h1 class="text-2xl font-bold mb-2">Student Marksheet</h1>
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<div>
|
||||
<p class="font-semibold">Student Name:</p>
|
||||
<p>{{ marksheet.student.first_name }} {{ marksheet.student.last_name }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="font-semibold">Course:</p>
|
||||
<p>{{ marksheet.course.name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Marks Table -->
|
||||
<div class="overflow-x-auto">
|
||||
<table class="w-full table-auto">
|
||||
<thead>
|
||||
<tr class="bg-gray-100">
|
||||
<th class="px-4 py-2 text-left">Subject</th>
|
||||
<th class="px-4 py-2 text-center">Theory Marks</th>
|
||||
<th class="px-4 py-2 text-center">Practical Marks</th>
|
||||
<th class="px-4 py-2 text-center">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for subject_mark in marksheet.subject_marks.all %}
|
||||
<tr class="border-b">
|
||||
<td class="px-4 py-2">{{ subject_mark.subject.name }}</td>
|
||||
<td class="px-4 py-2 text-center">
|
||||
{{ subject_mark.obtained_theory_marks }}/{{
|
||||
subject_mark.total_theory_marks }}
|
||||
</td>
|
||||
<td class="px-4 py-2 text-center">
|
||||
{{ subject_mark.obtained_practical_marks }}/{{
|
||||
subject_mark.total_practical_marks }}
|
||||
</td>
|
||||
<td class="px-4 py-2 text-center">
|
||||
{{ subject_mark.total_marks }}/{{
|
||||
subject_mark.total_practical_marks|add:subject_mark.total_theory_marks
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="bg-gray-50 font-bold">
|
||||
<td class="px-4 py-2">Total</td>
|
||||
<td class="px-4 py-2 text-center" colspan="2"></td>
|
||||
<td class="px-4 py-2 text-center">{{ marksheet.obtained_marks }}/{{ marksheet.total_marks }}</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<!-- Final Grade -->
|
||||
<div class="mt-6 text-center">
|
||||
<div class="inline-block bg-blue-100 rounded-lg px-6 py-3">
|
||||
<p class="text-lg font-semibold">
|
||||
Final Grade:
|
||||
<span class="text-2xl ml-2 {% if marksheet.grade == 'F' %}text-red-600{% else %}text-green-600{% endif %}">
|
||||
{{ marksheet.grade }}
|
||||
</span>
|
||||
</p>
|
||||
<!--<p class="text-sm text-gray-600">-->
|
||||
<!-- Percentage:-->
|
||||
<!--</p>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="btn-print" onclick="window.print();">Print PDF</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,26 +0,0 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<div class="container mx-auto p-4">
|
||||
<h1 class="text-2xl font-bold mb-6">Student Marksheets</h1>
|
||||
<div class="grid gap-4 md:grid-cols-2 lg:grid-cols-3">
|
||||
{% for marksheet in marksheets %}
|
||||
<div class="bg-white rounded-lg shadow-lg p-4">
|
||||
<h2 class="text-xl font-semibold mb-2">{{ marksheet.student.first_name }} {{ marksheet.student.last_name }}</h2>
|
||||
<p class="text-gray-600 mb-2">Course: {{ marksheet.course.name }}</p>
|
||||
<div class="flex justify-between items-center mt-4">
|
||||
<span class="text-sm">
|
||||
Grade:
|
||||
<span class="font-bold {% if marksheet.grade == 'F' %}text-red-600{% else %}text-green-600{% endif %}">
|
||||
{{ marksheet.grade }}
|
||||
</span>
|
||||
</span>
|
||||
<a href="{% url 'marksheetdetails' %}"
|
||||
class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">View Details</a>
|
||||
</div>
|
||||
</div>
|
||||
{% empty %}
|
||||
<div class="col-span-full text-center py-8 text-gray-500">No marksheets available.</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Whitespace-only changes.
Whitespace-only changes.
Reference in new issue
Block a user