{# Template For SJCC Collage
 #}
<link href='http://fonts.googleapis.com/css?family=Book+Antiqua' rel='stylesheet' type='text/css'>
<style>
     td, th { padding: 5px; }
    .no-border {
        border-style: none !important;
        border-top:1px solid #fff !important;
        border-bottom:1px solid #fff !important;
        border-left:1px solid #fff !important;
        border-right:1px solid #fff !important;
    }
    .slant
    {
        margin: 0px 0px;
        width: 65px;
        -webkit-transform: rotate(270deg);
        -moz-transform: rotate(270deg);
        -ms-transform: rotate(270deg);
        -o-transform: rotate(270deg);
        transform: rotate(270deg) translateX(-30%);
    } 
    .border-div {
        border-style: solid; 
        border-width: 1px;
        border-top:1px solid #000 !important;
        border-bottom:1px solid #000 !important;
        border-left:1px solid #000 !important;
        border-right:1px solid #000 !important;
    }
    .border-l-0 {
        border-left:none !important;
    }
    .border-r-0 {
        border-right:none !important;
    }
    .border-t{
        border-top:1px solid #000 !important;
    }
    .border-t-b{
        border-top:1px solid #000 !important;
        border-bottom:1px solid #000 !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;
    }  
    .single-page {
        position: relative;
        width: 100%;
        page-break-after: always;
        font-family: 'book antiqua', Times, serif;
        padding:15px;
    }
    .subject-details tr th{
        border-left: 1px solid #000;
        border-right: 1px solid #000;
        border-top: 1px solid #000;
        border-bottom: 1px solid #000;
        text-align:center;
        background: none !important;
        padding: 0px !important;
       
    }
    .subject-details tr td{
        border-left: 1px solid #000;
        border-right: 1px solid #000;
        text-align:center;
        
    }
    .subject-details tr:last-child {
        border-bottom: 1px solid #000;
    }
    .student-details tr td,tr th{
        border-left: 1px solid #000;
        border-right: 1px solid #000;
        border-bottom: 1px solid #000;
        border-top: 1px solid #000;
    
    }
    .collage-header tr{
        height:7mm !important;
    }
    .secondary-table tr td{
        padding: 2mm;
        line-height:15px !important;
        height:6mm !important;
        border:none;
        text-align:center;
        vertical-align:middle !important;
    }
    .college-name-header {
		font-size: 20px;
		font-weight: bold;
		vertical-align: top;
    	line-height: 20mm;
	}
    .thPadding{
		padding:4px;
	}
    
</style>
{% for student in data.studentData %}
    {% if student.isResultBlocked %}
        <div style='height:210mm!important;page-break-inside:avoid;display:flex;align-items:center;justify-content:center;' class='bg-image'>
            <div style='width:100%;text-align:center;' class='block-msg'>{{student.blockingMsg |raw}}</div>
        </div>
    {% else %}
        <div class="single-page" style=" no-border">
            <div class="subpage">
                {% set trcolSpan =  14 %}
                {% set subjectLen =  student.subjects|length %}
                <div style="height:60px;width:100%;clear:both;"></div>
                <table class='subject-details' cellspacing="0" style="font-size:12px;font-family: 'book antiqua', Times, serif;border:1px solid #000; width:100%">
                    <thead>
                        <tr style='height:30px;font-size:12px;' class=''>
                            <th rowspan='2' width="10%" style="text-align:center;padding: 10px;text-transform:uppercase;font-weight:bold;line-height:18px;font-size:12px;" class='syllabusCode1'><text>Course / Activity Code </text></th>
                            <th rowspan='2' width="50%" style="text-align:center;text-transform:uppercase;font-weight:bold;font-size:12px;"><text>Courses</text></th>
                            <th width="5%" colspan="3" style="text-align:center;text-transform:uppercase;font-weight:bold;line-height:18px;font-size:12px;"><text>Total Marks</text></th>
                        </tr>
                        
                        <tr style="font-size:12px;" class=''>
                            <th width="5%" style="font-size:12px;">
                                <div style = 'text-align: center;padding: 10px;font-weight:bold;font-size:12px;'>CIA <br />50</div>
                            </th>
                            <th width="5%" style="font-size:12px;">
                                <div style = 'text-align: center;padding: 10px;font-weight:bold;font-size:12px;'>ESE <br />50</div>
                            </th>
                            <th width="5%" style="font-size:12px;">
                                <div style = 'text-align: center;padding: 10px;font-weight:bold;font-size:12px;'>TOTAL <br />100</div>
                            </th>
                        </tr>
                    </thead>
                    <tbody>
                        {% set slno = 0 %}
                        {% for subjectCat in student.subjectCategories %}
                            <tr style="height:15px;" class=''>
                                <td class = 'removeTdBorder' style="text-align:center;vertical-align: top;padding:7px;"></td>
                                <td class = 'removeTdBorder' style="vertical-align: top;padding:7px;text-align:left;"><b>{{subjectCat.categoryName}}</b></td>	
                                <td class = 'removeTdBorder' style="text-align:center;vertical-align: top;padding:7px;"></td>
                                <td class = 'removeTdBorder' style="text-align:center;vertical-align: top;padding:7px;"></td>
                                <td class = 'removeTdBorder' style="text-align:center;vertical-align: top;padding:7px;"></td>
                            </tr>
                            {% for subject in subjectCat.subjects %}
                                <tr style="height:15px;" class=''>
                                    <td class="align-middle " style="">{{subject.code}}</td>
                                    <td class="align-middle " style = 'text-align:left;width: 35%;'>{{subject.name}}</td>
                                    {% if subject.isInternal %}
                                        {% if subject.showOnlyGradeAndCredit %}
                                            <td class="align-middle text-center "></td>
                                        {% elseif subject.isInternalFailed == 'ABSENT'%}
                                            <td class="align-middle text-center" style='color:red;'>AB</td>
                                        {% elseif subject.isInternalFailed == 'MAL_PRACTICE'%}
                                            <td class="align-middle text-center" style='color:red;'>MAL</td>
                                        {% elseif subject.isInternalFailed == 'EXEMPTED'%}
                                            <td class="align-middle text-center" style='color:red;'>EX</td>
                                        {% else %}
                                            <td class="align-middle text-center ">{{subject.internalMark}}</td>
                                        {% endif %}
                                    {% else %}
                                        <td class="align-middle text-center ">{{ subject.showOnlyGradeAndCredit ? '' : '-'}}</td>
                                    {% endif %}
                                    {% if subject.isExternal %}
                                        {% if subject.showOnlyGradeAndCredit %}
                                            <td class="align-middle text-center "></td>
                                        {% elseif subject.attendanceStatus == 'ABSENT'%}
                                            <td class="align-middle text-center "style='color:red;'>AB</td>
                                        {% elseif subject.attendanceStatus == 'MAL_PRACTICE'%}
                                            <td class="align-middle text-center " style='color:red;'>MAL</td>
                                        {% elseif subject.isInternalFailed == 'EXEMPTED'%}
                                            <td class="align-middle text-center" style='color:red;'>EX</td>
                                        {% else %}
                                            <td class="align-middle text-center ">{{subject.externalMark}}</td>
                                        {% endif %}
                                    {% else %}
                                        <td class="align-middle text-center ">{{ subject.showOnlyGradeAndCredit ? '' : '-'}}</td>
                                    {% endif %}
                                    <td class="align-middle text-center ">{{subject.showOnlyGradeAndCredit ? '' : subject.markObtained}}</td>
                                </tr>
                            {% endfor %}
                        {% endfor %}
                        <tr style="height:15px;" class='' >
                            <td class = ' 'style="" >&nbsp;</td>
                            <td class = ' '></td>
                            <td class = ' '></td>
                            <td class = ' '></td>
                            <td class = ' '></td>
                            
                        </tr>
                        <tr style="height:15px;" class=''>
                            <td class="border-t" colspan = '4' style = 'padding:7px;text-align:center;'></td>
                            <td class="border-t" colspan = '1' style = 'padding:7px;text-align:center;'><b>{{student.semesterMarkObtained}}</b></td>
                        </tr>
                        <tr style="height:15px;" class='' >
                            <td class="border-t-b" colspan = '5' style = 'padding:7px;text-align:left;'>Grand Total (in words) : <b> {{student.semesterMarkObtainedInWord}} Only </b></td>
                        </tr>
                        <tr style="height:15px;" class=''>  
                            <td colspan='5' style='padding:0;'>
                                <div style='width:100%;text-align:right;display:inline-block;padding:7px 0;'>SGPA : <b>{{  student.failedStatus == 'FAILED' ? '-' : student.semesterSgpa}}</b> &nbsp; &nbsp; &nbsp;</div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    {% endif %}
{% endfor %}
