145 lines
3.6 KiB
HTML
145 lines
3.6 KiB
HTML
{% 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 %}
|