Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
privilege
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
privilege
Commits
12cee8a6
Commit
12cee8a6
authored
2 years ago
by
Jean-Philippe Metivier
Browse files
Options
Downloads
Patches
Plain Diff
Ajustement mise en page plus compacte
parent
c511c5d4
No related branches found
No related tags found
No related merge requests found
Pipeline
#17849
passed
2 years ago
Stage: publish
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
view/unicaen-privilege/privilege/index.phtml
+86
-84
86 additions, 84 deletions
view/unicaen-privilege/privilege/index.phtml
with
86 additions
and
84 deletions
view/unicaen-privilege/privilege/index.phtml
+
86
−
84
View file @
12cee8a6
...
...
@@ -6,24 +6,26 @@ use UnicaenPrivilege\Form\Privilege\CategorieFiltreForm;
use
UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges
;
/**
* @var string $title
* @var RoleInterface[] $roles
* @var array $privilegesByCategorie
* @var CategorieFiltreForm $form
* @var ?string $gestion
*
* @see AdministrationController::privilegeAction()
* @see PrivilegeController::indexAction()
*/
?>
<?php
$this
->
headTitle
(
$this
->
translate
(
$title
))
?>
$this
->
headTitle
(
"Gestion des privilèges"
);
?>
<h1
class=
"page-header"
>
<?php
echo
$title
;
?>
Gestion des privilèges
</h1>
<?php
echo
$this
->
messenger
()
->
addMessagesFromFlashMessenger
();
?>
<?php
if
(
$gestion
===
null
or
$gestion
!==
'off'
)
:
?>
<div
class=
"row mb-3"
>
<div
class=
"col-md-12"
>
<?php
/** @see PrivilegeCategorieController::indexAction() */
?>
...
...
@@ -34,11 +36,15 @@ use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges;
</a>
</div>
</div>
<?php
endif
;
?>
<div
class=
"card
border-default mb-3
"
>
<?php
if
(
$form
!==
null
)
:
?>
<div
class=
"card "
>
<div
class=
"card-header bg-default"
>
<h2>
Filtrer les privilèges
</h2>
<h2>
<span
class=
"icon icon-filtrer"
></span>
Filtrer les privilèges
</h2>
</div>
<div
class=
"card-body"
>
<?php
echo
$this
->
form
()
->
openTag
(
$form
->
prepare
());
?>
...
...
@@ -57,26 +63,24 @@ use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges;
<?php
echo
$this
->
form
()
->
closeTag
();
?>
</div>
</div>
<?php
endif
;
?>
<div
class=
"card border-default mb-3"
>
<div
class=
"card-header bg-default"
>
<h2>
Priviléges attribués
</h2>
</div>
<div
class=
"card-body"
>
<table
id=
"privilege-liste"
class=
"table table-hover table-condensed table-header-rotated"
>
<thead>
<tr>
<th></th>
<?php
$first
=
true
;
foreach
(
$roles
as
$role
)
:
?>
<th
class=
"rotate-45"
title=
"
<?php
echo
$role
;
?>
"
><div
<?php
if
(
$first
)
echo
' class="first"'
;
?>
><span>
<?php
echo
$role
;
?>
</span></div></th>
<?php
$first
=
true
;
foreach
(
$roles
as
$role
)
:
?>
<th
class=
"rotate-45"
title=
"
<?php
echo
$role
;
?>
"
>
<div
<?php
if
(
$first
)
echo
' class="first"'
;
?>
><span>
<?php
echo
$role
;
?>
</span></div>
</th>
<?php
$first
=
false
;
endforeach
;
?>
<th></th>
</tr>
<tr>
<th>
Privilèges
<i
title=
"Afficher / Masquer tous les privilèges"
class=
"hide-privileges fas fa-caret-square-down"
></i></th>
<th>
Privilèges
<i
title=
"Afficher / Masquer tous les privilèges"
class=
"hide-privileges fas fa-caret-square-down"
></i></th>
<th
colspan=
"
<?php
echo
count
(
$roles
);
?>
"
>
Rôles
</th>
<th
style=
"min-width:166px"
></th>
</tr>
...
...
@@ -85,7 +89,8 @@ use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges;
<?php
foreach
(
$privilegesByCategorie
as
$libelleCategorie
=>
$privileges
)
:
?>
<tr>
<th
id=
"
<?php
echo
current
(
$privileges
)
->
getCategorie
()
->
getId
();
?>
"
class=
"categorie"
colspan=
"
<?php
echo
1
+
count
(
$roles
);
?>
"
>
<?php
echo
$libelleCategorie
;
?>
<i
class=
"fas fa-caret-square-down text-muted"
></i></th>
colspan=
"
<?php
echo
1
+
count
(
$roles
);
?>
"
>
<?php
echo
$libelleCategorie
;
?>
<i
class=
"fas fa-caret-square-down text-muted"
></i></th>
</tr>
<?php
/** @var PrivilegeInterface $privilege */
?>
<?php
foreach
(
$privileges
as
$privilege
)
:
?>
...
...
@@ -101,8 +106,6 @@ use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges;
<?php
endforeach
;
?>
</tbody>
</table>
</div>
</div>
<style>
.table-header-rotated
th
.rotate-45
{
...
...
@@ -111,6 +114,7 @@ use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges;
padding
:
0
;
white-space
:
nowrap
;
}
.table-header-rotated
th
.rotate-45
>
div
{
position
:
relative
;
top
:
0
;
...
...
@@ -121,9 +125,11 @@ use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges;
border-right
:
1px
solid
#ddd
;
z-index
:
99
;
}
.table-header-rotated
th
.rotate-45
>
div
.first
{
border-left
:
1px
solid
#ddd
;
}
.table-header-rotated
th
.rotate-45
span
{
transform
:
skew
(
40deg
,
0deg
)
rotate
(
310deg
);
position
:
absolute
;
...
...
@@ -171,15 +177,13 @@ use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges;
});
});
$
(
"i.hide-privileges"
)
.
click
(
function
()
{
$
(
"i.hide-privileges"
)
.
click
(
function
()
{
if
(
$
(
this
)
.
hasClass
(
'fa-caret-square-down'
))
{
$
(
"tr.privilege"
)
.
hide
();
$
(
this
)
.
removeClass
(
'fa-caret-square-down'
)
.
addClass
(
'fa-caret-square-up'
)
}
else
{
}
else
{
$
(
"tr.privilege"
)
.
show
();
$
(
this
)
.
removeClass
(
'fa-caret-square-up'
)
...
...
@@ -187,16 +191,14 @@ use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges;
}
});
$
(
"th.categorie > i"
)
.
click
(
function
()
{
$
(
"th.categorie > i"
)
.
click
(
function
()
{
let
categorieId
=
$
(
this
)
.
parent
()
.
attr
(
"id"
);
$
(
"tr.categorie-id-"
+
categorieId
)
.
toggle
();
if
(
$
(
this
)
.
hasClass
(
'fa-caret-square-down'
))
{
$
(
this
)
.
removeClass
(
'fa-caret-square-down'
)
.
addClass
(
'fa-caret-square-up'
)
}
else
{
}
else
{
$
(
this
)
.
removeClass
(
'fa-caret-square-up'
)
.
addClass
(
'fa-caret-square-down'
)
...
...
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