<thead class="thead-dark">
	<tr>
		<th scope="col" width="">{{ 'Type' | trad }}</th>
		<th scope="col" width="">{{ 'Nom' | trad }}</th>
		<th scope="col" width="">{{ 'Société' | trad }}</th>
		<th scope="col" width="">{{ 'Fonction' | trad }}</th>
		<th scope="col" width="">
			{% if droits.HA_MQUESCM %}
				{{ hover_action('detailRefresh', 
                'ajouter_blanc_v2' , 
                'roueDenteActive(this);', 
                'float:right;', 'Ajouter évaluateur' | trad) }}
				<ul class="ss_parametres" style="display: none;">
					{% if droits.HA_MQUESCM %}
						<li>
							<a id="internal" onclick="addRaterToGroup(this.id);">{{ 'Ajouter évaluateur interne' | trad }}</a>
						</li>
						<li>
							<a id="external" onclick="addRaterToGroup(this.id);">{{ 'Ajouter évaluateur externe' | trad }}</a>
						</li>
					{% endif %}
				</ul>
			{% endif %}
		</th>
	</tr>
</thead>
{% if raters | length > 0 %}
	{% for rater in raters %}
		<tbody>
			<tr id="noteur_{{ loop.index }}">
				<td>{{ rater.ORIGIN | boolSql ? 'Externe' | trad : 'Interne' | trad }}</td>
				<td>{{ rater.NOM }}</td>
				<td>{{ rater.CODE_STE }}</td>
				<td>{{ rater.FONCTION }}</td>
				<td>
					{% if droits.HA_MQUESCM %}
						{{ hover_action(
                            'noteur_' ~ loop.index, 
                            'Supprimer_v2', 
                            "popupConfirmation(
                                '" ~ path('Ajax.Erreur.popupConfirmationSuppresion') ~ "',
                                '', 
                                '" ~ path('Evaluation.Rater.removeRaterFromGroup',{mode:mode, id: id, group: group, rater: rater.NOTEUR }) ~ "',
                                '" ~ rater.deleteMessage|e('js')|raw ~ " ?', 
                                'redirect', 
                                '', 
                                '', 
                                '', 
                                '', 
                                '', 
                                '', 
                                '', 
                                '', 
                                '', 
                                '" ~ ('Suppression évaluateur' | trad |e('js')|raw) ~ "'
                            )", 
                            'float: right;margin-right:5px;'
                        ) }}
					{% endif %}
				</td>
			</tr>
		</tbody>
	{% endfor %}
{% endif %}    
<script>
    function addRaterToGroup(id) {
        if (id == 'internal') {
            redirectJSWithPost('{{ path('Evaluation.Rater.ratersListForGroup', {mode: mode, id: id, group: group}) }}');
        } else {
            redirectJSWithPost('{{ path('Evaluation.Rater.newExternalRater', {mode: mode, id: id, group: group}) }}');
        }
    }
</script>

