{% extends "main/layout.html" %}
{% block content %}
<div class="breadcrumb-holder">
	<div class="container-fluid">
		<ul class="breadcrumb">
			<li class="breadcrumb-item"><a href="{% url 'train-de-plan-list' %}">LISTA PLANU</a></li>
			<li class="breadcrumb-item active">{{ legend|upper }}</li>
		</ul>
	</div>
</div>
<div class="container-fluid"><br/>
	<div class="row">
		<div class="col-sm-12">
			<div class="card shadow-lg border-info rounded">
				<div class="card-header border-primary">
                    <center>
                        <h2>{{ legend|upper }}</h2>
                    </center>

                </div>
				<div class="card-body">
                
                    <table class="table table-sm table-bordered">
                        <tr>
                            <th colspan="3">Divizaun</th> <th>Tinan</th><th>Anekso Pareser</th>
                        </tr>
                        <tr>
                            <td colspan="3">{{ tplan.unit }}</td>
                            <td>{{ tplan.year }}</td>
                            <td>
                                {% if tplan.file %}
                                  <a href="{{tplan.file.url}}" target="_blank" class="btn btn-sm btn-primary"> <i class="fa fa-file-pdf"></i> </a>
                                {% else %}
                                -
                                {% endif %}
                            </td>
                        </tr>
                        <tr>
                            <th colspan="3">Materia Treinamento</th>  <th>Place</th><th colspan="2">Duration</th>
                        </tr>
                        <tr>
                            <td colspan="3">{{ tplan.subject }}</td>
                            <td>{{ tplan.place }}</td>
                            <td colspan="2">{{ tplan.start_date }} - {{tplan.end_date}}</td>
                        </tr>
                    </table>
                        <hr class="border-primary" />
                        
                        <div class="row">
                            <div class="col-md-7">
                                <center>
                                    <h4>FUNSIONARIU SIRA NEBE TUIR TREINAMENTO
                                    </h4>
                                        
                                    </center>
                                <table class="table table-sm table-bordered">
                                    <tr>
                                        <th>Nu.</th>
                                        <th>Naran</th>
                                        <th>GAP Analysis</th>
                                    </tr>
                                        <tr>
                                            <td align="center" colspan="6">
                                                <strong>LISTA FUNSIONARIO GERAL</strong>
                                            </td>
                                        </tr>
                                        {% for temp in temps %}
                                        <tr>
                                            <td>{{ forloop.counter }}</td>
                                            <td><a href="{% url 'train-c-crit-list' tplan.hashed temp.id %}"></a>{{ temp.employee }}</td>
                                            <td>
                                                -
                                            </td>
                                        </tr>
                                        {% endfor %}
                                    <tr>
                                        <td colspan="4" align="center">
                                            <strong>LISTA FUNSIONARIO BASEIA BA TRANNING GAP ANALYSIS</strong>
                                        </td>
                                    </tr>
    
    
                                    {% for emp, gap_items in tgap_list %}
                                        <tr>
                                            <td>{{ forloop.counter }}</td>
                                            <td><a href="#"></a>{{ emp }} </td>
                                            <td>
                                                <ul>
                                                {% for gap, comments in gap_items %}
                                                    <li>{{ gap.comment }} 
    
                                                    </li>
                                                {% endfor %}
                                                </ul>
                                            </td>
                                        </tr>
                                    {% endfor %}
                                </table>
                            </div>
                            <div class="col-md-5">
                                <center>
                                    <h4>EKIPA SIRA NEBE TUIR TREINAMENTO </h4>
                                </center>
                                <table class="table table-sm table-bordered">
                                    <thead>
    
                                        <tr>
                                            <th width="10%">Nu.</th>
                                            <th>Naran Ekipa</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        {% for obj in  tdep %}
                                          <tr>
                                            <td width="10%">{{forloop.counter}}</td>
                                            <td>{{obj.department}}</td>
                                          </tr>
                                        {% endfor %}
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    
				</div> <!--end card-body-->
			</div> <!--end card-->
		</div> <!--end col-->
	</div> <!--end row-->
</div>
{% endblock %}
{% block scripts %}
{% endblock %}