Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
indicateur
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lib
unicaen
indicateur
Commits
a17e0dad
Commit
a17e0dad
authored
2 years ago
by
Jean-Philippe Metivier
Browse files
Options
Downloads
Patches
Plain Diff
Debut affichage des indicateurs dans les tableaux
parent
dc35f6c4
No related branches found
Branches containing commit
Tags
0.0.4
Tags containing commit
No related merge requests found
Pipeline
#17324
passed
2 years ago
Stage: publish
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/UnicaenIndicateur/Controller/TableauDeBordController.php
+1
-0
1 addition, 0 deletions
src/UnicaenIndicateur/Controller/TableauDeBordController.php
view/unicaen-indicateur/tableau-de-bord/afficher.phtml
+42
-0
42 additions, 0 deletions
view/unicaen-indicateur/tableau-de-bord/afficher.phtml
with
43 additions
and
0 deletions
src/UnicaenIndicateur/Controller/TableauDeBordController.php
+
1
−
0
View file @
a17e0dad
...
...
@@ -31,6 +31,7 @@ class TableauDeBordController extends AbstractActionController
return
new
ViewModel
([
'tableau'
=>
$tableau
,
'indicateurService'
=>
$this
->
getIndicateurService
(),
]);
}
...
...
This diff is collapsed.
Click to expand it.
view/unicaen-indicateur/tableau-de-bord/afficher.phtml
+
42
−
0
View file @
a17e0dad
...
...
@@ -3,10 +3,12 @@
use
UnicaenIndicateur\Entity\Db\TableauDeBord
;
use
UnicaenIndicateur\Provider\Privilege\IndicateurPrivileges
;
use
UnicaenIndicateur\Provider\Privilege\TableaudebordPrivileges
;
use
UnicaenIndicateur\Service\Indicateur\IndicateurService
;
/**
* @see \UnicaenIndicateur\Controller\TableauDeBordController::afficherAction()
* @var TableauDeBord $tableau
* @var IndicateurService $indicateurService
*/
$this
->
headTitle
(
$tableau
?
$tableau
->
getTitre
()
:
"Tableau de bord supprimé"
);
...
...
@@ -95,6 +97,36 @@ $width = 12 / ((int) ($tableau?$tableau->getNbColumn():1));
</div>
<span
class=
"todo"
>
Faire le view helper des données des indicateurs
</span>
<?php
$exists
=
$indicateurService
->
verifierExistanceMaterializedView
(
$indicateur
->
getViewId
());
if
(
$exists
===
true
)
{
$result
=
$indicateurService
->
getIndicateurData
(
$indicateur
);
$header
=
$result
[
0
];
$data
=
$result
[
1
];
}
?>
<?php
if
(
$exists
)
:
?>
<table
id=
"indicateur_
<?php
echo
$indicateur
->
getId
();
?>
"
class=
"datatable"
>
<thead>
<tr>
<?php
foreach
(
$header
as
$key
)
:
?>
<th>
<?php
echo
$key
;
?>
</th>
<?php
endforeach
;
?>
</tr>
</thead>
<tbody>
<?php
foreach
(
$data
as
$item
)
:
?>
<tr>
<?php
foreach
(
$item
as
$i
)
:
?>
<td>
<?php
echo
$i
;
?>
</td>
<?php
endforeach
;
?>
</tr>
<?php
endforeach
;
?>
</tbody>
</table>
<?php
else
:
?>
Problème détecté sur l'indicateur.
<?php
endif
;
?>
</div>
<?php
endforeach
;
?>
</div>
...
...
@@ -107,4 +139,14 @@ $width = 12 / ((int) ($tableau?$tableau->getNbColumn():1));
window
.
location
.
reload
();
});
});
$
(
document
).
ready
(
function
()
{
$
(
'
.datatable
'
).
DataTable
(
{
//sorting:false,
//paging:false,
language
:
{
url
:
'
/localisation/fr_FR.json
'
}
}
);
}
);
</script>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment