{# Template For PG Students In IIC Collage
 #}
<style>
     td, th { padding: 5px; }
    body{
        font-family: \"Times New Roman\", Times, serif; 
    }
    .no-border {
        border-style: none !important;
        border-top:2px solid #fff !important;
        border-bottom:2px solid #fff !important;
        border-left:2px solid #fff !important;
        border-right:2px solid #fff !important;
    } 
    .border {
        border-style: solid; 
        border-width: 2px;
        border-top:2px solid #000 !important;
        border-bottom:2px solid #000 !important;
        border-left:2px solid #000 !important;
        border-right:2px solid #000 !important;
    }
    .border-l-0 {
        border-left:none !important;
    }
    .border-r-0 {
        border-right:none !important;
    }
    .pages {
        width: 100%;
        padding: 1cm;
        background: no-repeat;
        -webkit-background-size: contain;
        -moz-background-size: contain;
        -o-background-size: contain;
        background-size: contain;
        page-break-after: always;
    }
    .subject-details tr{
        padding-top:5mm;
        padding-bottom:10mm;
    }
   
    .subject-details tr th{
        border-left: 1px solid #000;
        border-right: 1px solid #000;
        border-top: 1px solid #000;
        text-align:center;
        background: none !important;
        height: 5mm  !important;
        padding: 0 1mm !important;
        line-height:20px !important;
        font-size:12px;
    }
    .subject-details tr td{
        border-left: 1px solid #000;
        border-right: 1px solid #000;
        border-bottom: 1px solid #000;
        border-top: 1px solid #000;
        padding: 2mm;
        line-height:15px !important;
        height:6mm !important;
        text-align:center;
        vertical-align:middle !important;
        font-size:13px;
       
    }
    .student-details tr td{
        padding:2mm;
    
    }
    .secondary-table tr td{
        padding: 2mm;
        line-height:15px !important;
        height:6mm !important;
        border:none;
        text-align:center;
        vertical-align:middle !important;
    }
    
    
</style>
{% for student in data.studentData %}
    <div class="pages" style=" no-border">
        <div class="">
            {% if data.collegeData.isHeaderEnabled %}
                <div style="margin:0 0 0 0;width:100%; !important;" class="text-center">
                    <img src="{{data.collegeData.collegeHeader}}" style="width:100%; height:auto;" class="college-header">
                </div>
            {% endif %}
            <table style = 'width:100% !important; margin:0mm 0 0 0; page-break-inside:avoid;' cellpadding='0' cellspacing='0' border='0' class='b-0'>
                    <tr>
                        <td  class="no-border text-left" width="65%" colspan="2" style="font-size: 13pt;">
                            Name : <b>{{student.name}}</b>
                        </td>  
                        <td class="no-border text-left" width="35%" style="vertical-align: bottom !important;  font-size: 13pt;">
                                Date : {{ student.resultPublishDate }}
                        </td>
                    </tr>
                    <tr>
                        <td  class="no-border text-left" width="65%" colspan="2" style=" font-size: 13pt;">
                            Year of Admission : {{student.admissionYear}}
                        </td>
                        <td class="no-border text-left" width="35%" style=" font-size: 13pt;">
                            Reg. Number: <b>{{student.regNo}}</b>
                        </td>
                    </tr> 
            </table>
            <table style = 'width: 100%; margin-top: 3mm;' cellpadding='0' cellspacing='0' border='0'  class='student-details'>
                    <tr>
                        <td  class="no-border text-center" width="100%" style="text-align:center;" padding-top:0mm; padding-bottom:0mm;">
                            <div style="line-height:20px; font-size: 11pt; font-weight:bold;text-align:center;">
                                <span class="bold">{{student.programName|upper}}<br></span>
                                <i style="  font-size: 11pt; font-weight:bold;">Statement of Marks</i>
                            </div>
                        </td>
                    </tr> 
            </table>
            {% for academicTerm in student.academicTerms %}
            <table class='subject-details' cellspacing='0' style='width:100% !important; page-break-inside:avoid;border-collapse: collapse;'>
                <thead>
                    <tr>
                        <th colspan="5"><b style="text-align:left;font-size:12px;padding: 5px;">SEMESTER - {{academicTerm.romanNumber}}</b></th>
                    </tr>
                    <tr style='height: 7mm !important;'>
                        <th rowspan="2" width="20%">COURSE CODE</th>
                        <th rowspan="2" width="50%">COURSE NAME</th>
                        <th colspan="2" width="20%">TOTAL</th>
                        <th rowspan="2" width="10%">GRADE</th>
                    </tr>
                    <tr>
                        <th width="10%">Marks Obtained</th>
                        <th width="10%">Max. Marks</th>
                    </tr>
                </thead>
                <tbody>
                    {% set slno = 0 %}
                    {% for subject in academicTerm.subjects %}
                        <tr style='height: 7mm;line-height: 30px; font-size: 12pt !important; '>
                            <td class="align-middle " style="">{{subject.code}}</td>
                            <td class="align-left " style="text-align: left;">{{subject.name}}</td>
                            <td class="align-middle text-center ">{{subject.markDetails.markObtained}}</td>
                            <td class="align-middle text-center ">{{subject.markDetails.totalMarks}}</td>
                            <td class="align-middle text-center ">{{subject.failedStatus == 'FAILED' ? 'F' : subject.grade}}</td>
                        </tr>
                    {% endfor %}
                    {% endfor %}
                    <tr>
                        <td colspan="2" rowspan="3">
                            <table style="width:100% !important; page-break-inside:avoid;" class="secondary-table">
                                <tr>
                                    <th style="border:none !important">Grade Details </th>
                                    <th style="border:none !important">Percentage Mark </th>
                                </tr>
                                {% for grade in data.semesterGradeDetails %}
                                    <tr>
                                        <td style="border:none !important">{{grade.letterGrade}}</td>
                                        <td style="border:none !important">{{grade.name}}</td>
                                    </tr>
                                {% endfor %}
                            </table>
                        </td>
                        <td colspan="2" style="height:17mm !important;">Total Marks</td>
                        <td>{{student.markDetails.markObtained}}</td>
                    </tr>
                    <tr style='height: 5mm;line-height: 15px;'>
                        <td colspan="2" style="height:17mm !important;">Maximum Marks</td>
                        <td>{{student.markDetails.totalMaxMark}}</td>
                    </tr>
                     <tr class = ""style='height: 5mm;line-height: 15px;'>
                        <td colspan="2" style="height:17mm !important;">Overall Grade</td>
                        <td>{{student.failedStatus == 'FAILED' ? 'F' : student.grade}}</td>
                    </tr>
                </tbody>
            </table>
            <table style="width:100% !important; page-break-inside:avoid; margin: 15mm 0 0 0;" class="">
                <tr>
                    <td class="text-left bold" style="font-size:15px;"><div><b>Anju Mohan J </b></div><div style='padding-top:10px!important;'><b>Controller of Examination</b></div></td>
                    <td class="text-right bold" style="font-size:15px;"><div><b>Prof. (Dr.) B Sunil Kumar</b></div><div style='padding-top:10px!important;padding-right:30.5mm!important;'><b>Director</b></div></td>
                </tr>
            </table>
        </div>
    </div>
{% endfor %}
