{% load static %}
{% load custom_tag %}
<!DOCTYPE>
<html>
    <head>
        <title>Resultat_UE{{ ue.code }}</title>
        <style type="text/css">
            .usp-info img{
                width:1124px;
            }
            .table{
                border:1px solid #000000;
                text-align:left;
                padding:5px 1px 1px 5px;
                font-size:16px;
            }
            .table th{
                text-align:left;
                padding-right:3px;
            }
            .nce{
                width:148px;
            }
            .nom{
                width:160px;
            }
            .prenoms{

            }
            .cc{
                width:70px;
            }
            .examen,.moyenne{
                width:95px;
            }
            .title{
                font-size:24px;
            }
            @page {
                size: a4 landscape;
                margin: 10px;

                @frame header_frame { /* Static Frame */
                    -pdf-frame-content: header_content;
                    left: 50pt; width: 512pt; top: 50pt; height: 40pt;
                }

                @frame footer_frame { /* Another static Frame */
                    -pdf-frame-content: footer_content;
                    left: 50pt; width: 512pt; top: 772pt; height: 20pt;
                }
            }
        </style>
    </head>
    <body>
      <div class="pdf-content">
          <div class="usp-info">
                <img src="static/ac-img/usp-info.png">
          </div>
          <br/>
          <p class="title"><u>UFR:</u> {{ ue.ufr.libelle }}</p>
          <p class="title"><u>RESULTAT UE:</u> ({{ ue.code }}) {{ ue.libelle }}</p>
          <table class="table">
              <thead>
                    <th style="width:50px;float:left;"></th>
                    <th style="width:145px;">NCE</th>
                    <th style="width:120px;">Nom</th>
                    <th>Prénoms</th>
                    <th style="width:80px;">Moy. UE</th>
                    <th style="width:90px;">Délibér.</th>
                    <th style="width:100px;">Mention</th>
              </thead>
              <tbody>
              {% for item in zip_list %}
                    <tr>
                        <td>{{ forloop.counter }}</td>
                        <td>{{ item.0.nce }}</td>
                        <td>{{ item.0.nom }}</td>
                        <td>{{ item.0.prenoms }}</td>
                        <td>{{ item.1 |stringformat:".2f"}}</td>
                        <td style="width:90px;">{{ item.2 }}</td>
                        <td style="width:100px;">{{ item.3 }}</td>
                    </tr>
              {% endfor %}
              </tbody>
          </table>

      </div>
    <div id="footer_content">(c) - page <pdf:pagenumber>/<pdf:pagecount></div>
    </body>
</html>