lol
This commit is contained in:
1 parent
7c09b319aa
commit
edb0f45871
105 files changed
-19786
No files matched your search
@@ -1,86 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,99 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,87 +0,0 @@
|
||||
|
||||
{% 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 %}
|
||||
@@ -1,92 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,166 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,61 +0,0 @@
|
||||
{%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%}
|
||||
@@ -1,86 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,120 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,127 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,90 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,124 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,129 +0,0 @@
|
||||
{% 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 %}
|
||||
@@ -1,39 +0,0 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<h2 class="col-12">{{ title }}</h2>
|
||||
<p class="col-12">Welcome</p>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<!--cards-->
|
||||
<div class="row g-4 col-12">
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<div class="card text-center p-3">
|
||||
<h5>Total Students</h5>
|
||||
<p class="fs-2">{{ total_student }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<div class="card text-center p-3">
|
||||
<h5>Total Staff</h5>
|
||||
<p class="fs-2">{{ total_staff }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<div class="card text-center p-3">
|
||||
<h5>Total Teacher</h5>
|
||||
<p class="fs-2">{{ total_teacher }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<div class="card text-center p-3">
|
||||
<h5>Total Course</h5>
|
||||
<p class="fs-2">{{ total_course }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<div class="card text-center p-3">
|
||||
<h5>Total Subject</h5>
|
||||
<p class="fs-2">{{ total_subjects }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
-1377
File diff suppressed because it is too large.
Load diff
@@ -1,144 +0,0 @@
|
||||
{% extends 'admin/base_site.html' %}
|
||||
{% block content %}
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 90%;
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #000;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.header h1,
|
||||
.header h2,
|
||||
.header p {
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
.header img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.details {
|
||||
margin-top: 20px;
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
.details span {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
table,
|
||||
th,
|
||||
td {
|
||||
border: 1px solid #000;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
text-align: center;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
.remarks {
|
||||
margin-top: 20px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.btn-print {
|
||||
display: block;
|
||||
width: 100px;
|
||||
margin: 20px auto;
|
||||
padding: 10px;
|
||||
background-color: #4CAF50;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.btn-print {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h1>SHREE SECONDARY SCHOOL</h1>
|
||||
<p>Kohalpur-5, Banke</p>
|
||||
<p>Estd. 281 BS</p>
|
||||
<h2>GRADE - SHEET</h2>
|
||||
</div>
|
||||
<div class="details">
|
||||
<p>
|
||||
The grade(s) secured by: <span>{{ marksheet.student.first_name }} {{ marksheet.student.first_name }}</span>
|
||||
</p>
|
||||
<p>
|
||||
Date of Birth: <span>
|
||||
{{ marksheet.student.date_of_birth }}
|
||||
<p>
|
||||
In the Examination, {{ marksheet.student.course.name }} of {{ marksheet.student.academic_year }} are given below:
|
||||
</p>
|
||||
</div>
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>S.N.</th>
|
||||
<th>Subject</th>
|
||||
<th>Theory</th>
|
||||
<th>Practical</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for subject in marksheet.subject_marks.all %}
|
||||
<tr>
|
||||
<td>{{ forloop.counter }}</td>
|
||||
<td>{{ subject.subject.name }}</td>
|
||||
<td>{{ subject.obtained_theory_marks }}</td>
|
||||
<td>{{ subject.obtained_practical_marks }}</td>
|
||||
<td>{{ subject.total_marks }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
<tr>
|
||||
<td colspan="4" style="font-weight: bold; text-align: center;">Grand Total</td>
|
||||
<td>{{ marksheet.obtained_marks }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="remarks">
|
||||
<p>
|
||||
Total Grade Point Average (Grade): <span>{{ marksheet.grade }}</span>
|
||||
</p>
|
||||
<p class="text-sm text-gray-600">
|
||||
Percentage:
|
||||
{{ marksheet.obtained_marks|div:marksheet.total_marks|mul:100|floatformat:2 }}%
|
||||
</p>
|
||||
</div>
|
||||
<a href="#" class="btn-print" onclick="window.print();">Print PDF</a>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
@@ -1,83 +0,0 @@
|
||||
{% extends "admin/base_site.html" %}
|
||||
{% block content %}
|
||||
<h2 class="col-12">{{ title }}</h2>
|
||||
<p class="col-12">Welcome</p>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||||
<div class="row g-4 col-12">
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<div class="card text-center p-3">
|
||||
<h5>Course</h5>
|
||||
<p class="fs-2">{{ course_name }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<div class="card text-center p-3">
|
||||
<h5>Current Semester</h5>
|
||||
<p class="fs-2">5</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-6 col-lg-3">
|
||||
<div class="card text-center p-3">
|
||||
<h5>Total Subject</h5>
|
||||
<p class="fs-2">{{ total_subjects }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Subject Attendance Bar Chart -->
|
||||
<div class="row col-12 col-lg-6 chart-container">
|
||||
<canvas id="attendanceBarChart"></canvas>
|
||||
</div>
|
||||
<!-- Subject Results Bar Chart -->
|
||||
<div class="row col-12 col-lg-6 chart-container">
|
||||
<canvas id="resultBarChart"></canvas>
|
||||
</div>
|
||||
<script>
|
||||
// Bar Chart for Subject Attendance
|
||||
const attendanceCtx = document.getElementById("attendanceBarChart").getContext("2d");
|
||||
new Chart(attendanceCtx, {
|
||||
type: "bar",
|
||||
data: {
|
||||
labels: ["Math", "Science", "English", "History", "Geography"], // Example subject names
|
||||
datasets: [
|
||||
{
|
||||
label: "Attendance Percentage",
|
||||
data: [90, 80, 85, 75, 95], // Example attendance percentages for each subject
|
||||
backgroundColor: ["#FF6384", "#36A2EB", "#FFCE56", "#4CAF50", "#FF8C00"],
|
||||
},
|
||||
],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
max: 100, // Percentage scale
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Bar Chart for Subject Results (Example)
|
||||
const resultCtx = document.getElementById("resultBarChart").getContext("2d");
|
||||
new Chart(resultCtx, {
|
||||
type: "bar",
|
||||
data: {
|
||||
labels: ["Math", "Science", "English", "History", "Geography"], // Example subject names
|
||||
datasets: [
|
||||
{
|
||||
label: "Results (Percentage)",
|
||||
data: [88, 75, 80, 70, 92], // Example result percentages for each subject
|
||||
backgroundColor: ["#FF5733", "#33FF57", "#3357FF", "#FF5733", "#FF8C00"],
|
||||
},
|
||||
],
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true,
|
||||
max: 100, // Percentage scale
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user