Skip to content
Snippets Groups Projects
Commit c69fa049 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

datatable

parent f2c81de2
Branches
Tags 3.2.1
No related merge requests found
Showing
with 55 additions and 17 deletions
......@@ -275,7 +275,7 @@ class Agent implements
$prenom = $this->getPrenom();
$prenom = str_replace("É", "é", $prenom);
$prenom = str_replace("È", "è", $prenom);
return ucwords(strtolower($prenom), "- ") . ' ' . (($this->getNomUsuel())??'<em>'.$this->getNomFamille().'</em>');
return (($this->getNomUsuel())??'<em>'.$this->getNomFamille().'</em>') . ' ' . ucwords(strtolower($prenom), "- ");
}
......
......@@ -60,7 +60,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() )
<span class="badge"> <?php echo count($finalises); ?> </span>
</h2>
<?php echo $this->entretienProfessionnelArray($finalises); ?>
<?php echo $this->entretienProfessionnelArray($finalises, ['id' => 'complet']); ?>
<?php endif; ?>
......@@ -70,7 +70,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() )
<span class="badge"> <?php echo count($encours); ?> </span>
</h2>
<?php echo $this->entretienProfessionnelArray($encours); ?>
<?php echo $this->entretienProfessionnelArray($encours, ['id' => 'encours']); ?>
<?php endif; ?>
<?php if (!empty($obligatoires)) : ?>
......@@ -78,7 +78,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() )
Agents sans entretien professionnel pour la campagne
<span class="badge"> <?php echo count($sansObligatoires); ?> </span>
</h2>
<?php echo $this->convocationArray($sansObligatoires, $campagne); ?>
<?php echo $this->convocationArray($sansObligatoires, $campagne, ['id' => 'sansentretien']); ?>
<?php endif; ?>
<?php if (!empty($facultatifs)) : ?>
......@@ -97,7 +97,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() )
</div>
</div>
</div>
<?php echo $this->convocationArray($sansFacultatifs, $campagne); ?>
<?php echo $this->convocationArray($sansFacultatifs, $campagne, ['id' => 'sansobligation']); ?>
<?php endif; ?>
......@@ -19,7 +19,7 @@ $canAction = ($canAfficher OR $canConvoquer);
?>
<table class="table table-condensed table-hover">
<table class="table table-condensed table-hover" id="<?php echo $options['id']; ?>">
<thead>
<tr>
<th> Dénomination </th>
......@@ -92,3 +92,11 @@ $canAction = ($canAfficher OR $canConvoquer);
<?php endforeach; ?>
</tbody>
</table>
<script>
$(document).ready(function() {
$("table#<?php echo $options['id']; ?>").DataTable( {
'paging' : false,
});
});
</script>
......@@ -4,7 +4,7 @@ use EntretienProfessionnel\Entity\Db\EntretienProfessionnel;
use EntretienProfessionnel\Provider\Privilege\EntretienproPrivileges;
/**
* @see \Formation\View\Helper\EntretienProfessionnelArrayViewHelper
* @see \EntretienProfessionnel\View\Helper\EntretienProfessionnelArrayViewHelper
* @var EntretienProfessionnel[] $entretiens
* @var array $options
*/
......@@ -74,7 +74,7 @@ if ($options['affichages'] AND $options['affichages']['width']) $width = $option
?>
<table class="table table-condensed table-hover" style="margin:1rem 0;">
<table class="table table-condensed table-hover datatable" id="<?php echo $options['id']; ?>" style="margin:1rem 0;">
<thead>
<tr>
<?php if ($displayAnnee) : ?>
......@@ -253,6 +253,12 @@ if ($options['affichages'] AND $options['affichages']['width']) $width = $option
</style>
<script>
$(document).ready(function() {
$("table#<?php echo $options['id']; ?>").DataTable( {
'paging' : false,
});
});
function setActions(id) {
let url = '../../entretien-professionnel/action/' + id;
// console.log(url);
......
......@@ -62,7 +62,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() .
<span class="badge"> <?php echo count($finalises); ?> </span>
</h2>
<?php echo $this->entretienProfessionnelArray($finalises, ['affichages' => ['annee' => false]]); ?>
<?php echo $this->entretienProfessionnelArray($finalises, ['affichages' => ['annee' => false], 'id' => 'complet']); ?>
<?php endif; ?>
......@@ -72,7 +72,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() .
<span class="badge"> <?php echo count($encours); ?> </span>
</h2>
<?php echo $this->entretienProfessionnelArray($encours, ['affichages' => ['annee' => false]]); ?>
<?php echo $this->entretienProfessionnelArray($encours, ['affichages' => ['annee' => false], 'id' => 'encours']); ?>
<?php endif; ?>
<?php if (!empty($obligatoires)) : ?>
......@@ -80,7 +80,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() .
Agents sans entretien professionnel pour la campagne
<span class="badge"> <?php echo count($sansObligatoires); ?> </span>
</h2>
<?php echo $this->convocationArray($sansObligatoires, $campagne); ?>
<?php echo $this->convocationArray($sansObligatoires, $campagne, ['id' => 'sansentretien']); ?>
<?php endif; ?>
<?php if (!empty($facultatifs)) : ?>
......@@ -99,7 +99,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() .
</div>
</div>
</div>
<?php echo $this->convocationArray($sansFacultatifs, $campagne); ?>
<?php echo $this->convocationArray($sansFacultatifs, $campagne, ['id' => 'sansobligation']); ?>
<?php endif; ?>
......@@ -21,7 +21,8 @@ $canAfficherEntretien = true;
<?php echo $this->entretienProfessionnelArray($entretiens,
[
'affichages' => ['agent' => false, 'lieu' => false],
'droits' => ['modifier' => false, 'historiser' => false, 'supprimer' => false, 'sursis' => false]
'droits' => ['modifier' => false, 'historiser' => false, 'supprimer' => false, 'sursis' => false],
'id' => 'mes-entretiens'
]
); ?>
......
......@@ -36,7 +36,7 @@ $canAjouterAgent = $this->isAllowed($structure, StructurePrivileges::STRUCTURE_A
<span class="badge"><?php echo count($agents); ?></span>
</h2>
<?php echo $this->partial('partial/agents', ['structure' => $structure, 'agents' => $agents, 'superieurs' => $superieurs, 'autorites' => $autorites]); ?>
<?php echo $this->partial('partial/agents', ['options' => ['id' => 'agent'], 'structure' => $structure, 'agents' => $agents, 'superieurs' => $superieurs, 'autorites' => $autorites]); ?>
<h2>
Agents manuellement ajoutés
......@@ -52,4 +52,4 @@ $canAjouterAgent = $this->isAllowed($structure, StructurePrivileges::STRUCTURE_A
</a>
<?php endif; ?>
<?php echo $this->partial('partial/agents', ['structure' => $structure, 'agents' => $agentsForces, 'options' => ['force' => true]]); ?>
\ No newline at end of file
<?php echo $this->partial('partial/agents', [ 'structure' => $structure, 'agents' => $agentsForces, 'options' => ['force' => true, 'id' => 'force']]); ?>
\ No newline at end of file
......@@ -35,7 +35,7 @@ $date = new DateTime();
<?php echo $this->partial('partial/entete', ['structure' => $structure, 'campagnes' => $campagnes, 'current' => 'fiches-de-poste', 'selecteur' => $selecteur]); ?>
<table class="table table-condensed">
<table class="table table-condensed datatable">
<thead>
<tr>
<th> Agent & Affectation </th>
......@@ -260,3 +260,11 @@ $date = new DateTime();
color: lightgrey;
}
</style>
<script>
$(document).ready(function () {
$("table.datatable").DataTable({
'paging': false,
});
});
</script>
\ No newline at end of file
......@@ -117,3 +117,12 @@ $canDetruireAffectation = $this->isAllowed(MissionspecifiquePrivileges::getR
<?php endforeach; ?>
</tbody>
</table>
<script>
$(document).ready(function () {
$("table.datatable").DataTable({
'paging': false,
});
});
</script>
\ No newline at end of file
......@@ -32,7 +32,7 @@ $isForce = (isset($options['force']) AND $options['force'] === true);
Afficher non administratif
</span>
<table class="datatable table table-condensed" style="font-size: 14px;">
<table class="datatable table table-condensed" id="<?php echo $options['id']; ?>" style="font-size: 14px;">
<thead>
<tr>
<th> Dénomination</th>
......@@ -142,4 +142,10 @@ $isForce = (isset($options['force']) AND $options['force'] === true);
$("span#administatif_masquer").show();
$("span#administatif_afficher").hide();
});
$(document).ready(function() {
$("table#<?php echo $options['id']; ?>").DataTable( {
'paging' : false,
});
});
</script>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment