Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
OSE
Commits
9bc35dd6
Commit
9bc35dd6
authored
Aug 28, 2018
by
Laurent Lécluse
Browse files
#16769
URL perso pour les guides vac et perm
parent
b99bf77b
Changes
6
Hide whitespace changes
Inline
Side-by-side
module/Application/src/Application/Controller/IndexController.php
View file @
9bc35dd6
...
...
@@ -5,6 +5,7 @@ namespace Application\Controller;
use
Application\Acl\Role
;
use
Application\Provider\Privilege\Privileges
;
use
Application\Service\Traits\IntervenantServiceAwareTrait
;
use
Application\Service\Traits\ParametresServiceAwareTrait
;
use
UnicaenAuth\Service\Traits\UserContextServiceAwareTrait
;
use
Zend\View\Model\ViewModel
;
...
...
@@ -17,6 +18,7 @@ class IndexController extends AbstractController
use
\
Application\Service\Traits\AnneeServiceAwareTrait
;
use
IntervenantServiceAwareTrait
;
use
UserContextServiceAwareTrait
;
use
ParametresServiceAwareTrait
;
...
...
@@ -28,9 +30,15 @@ class IndexController extends AbstractController
{
$role
=
$this
->
getServiceContext
()
->
getSelectedIdentityRole
();
$documentation
=
[
'vacataires'
=>
$this
->
getServiceParametres
()
->
get
(
'doc-intervenant-vacataires'
),
'permanents'
=>
$this
->
getServiceParametres
()
->
get
(
'doc-intervenant-permanents'
),
];
$view
=
new
ViewModel
([
'annee'
=>
$this
->
getServiceContext
()
->
getAnnee
(),
'context'
=>
$this
->
getServiceContext
(),
'annee'
=>
$this
->
getServiceContext
()
->
getAnnee
(),
'documentation'
=>
$documentation
,
'context'
=>
$this
->
getServiceContext
(),
]);
if
(
$role
&&
$this
->
isAllowed
(
Privileges
::
getResourceId
(
Privileges
::
INDICATEUR_VISUALISATION
)))
{
...
...
@@ -54,7 +62,7 @@ class IndexController extends AbstractController
$role
=
$this
->
getServiceContext
()
->
getSelectedIdentityRole
();
if
(
$role
instanceof
Role
&&
$role
->
getIntervenant
())
{
$intervenant
=
$this
->
getServiceIntervenant
()
->
getBySourceCode
(
$role
->
getIntervenant
()
->
getSourceCode
());
if
(
$intervenant
){
if
(
$intervenant
)
{
$this
->
getServiceUserContext
()
->
setNextSelectedIdentityRole
(
$intervenant
->
getStatut
()
->
getRoleId
());
}
}
...
...
module/Application/src/Application/Form/ParametresForm.php
View file @
9bc35dd6
...
...
@@ -166,6 +166,22 @@ class ParametresForm extends AbstractForm
],
]);
$this
->
add
([
'name'
=>
'doc-intervenant-vacataires'
,
'type'
=>
'Text'
,
'options'
=>
[
'label'
=>
'Vacataires'
,
],
]);
$this
->
add
([
'name'
=>
'doc-intervenant-permanents'
,
'type'
=>
'Text'
,
'options'
=>
[
'label'
=>
'Permanents'
,
],
]);
$this
->
add
([
'type'
=>
'Select'
,
'name'
=>
'oseuser'
,
...
...
module/Application/view/application/index/index.phtml
View file @
9bc35dd6
<?php
/* @var $this Application\View\Renderer\PhpRenderer */
/* @var $context ContextService */
/* @var $documentation string[] */
use
Application\Provider\Privilege\Privileges
;
use
Application\Service\ContextService
;
...
...
@@ -35,15 +35,17 @@ $onlyIntervenant = $intervenant && (null == $context->getSelectedIdentityRole()-
}
else
{
echo
$this
->
tag
(
'div'
)
->
html
(
$this
->
feuillederoute
(
$intervenant
)
->
renderCurrentBtn
());
/* Guide à télécharger... */
$guideType
=
$intervenant
->
getStatut
()
->
estVacataire
()
?
'guide_ose_vacataire'
:
'guide_ose_permanent'
;
$guideUrl
=
$this
->
basePath
()
.
'/doc/intervenant/'
.
$guideType
.
'.pdf'
;
echo
$this
->
tag
(
'div'
,
[
'class'
=>
'alert alert-info'
,
'style'
=>
'margin-top:1em'
,
'role'
=>
'alert'
])
->
html
(
'Un guide d\'utilisation de OSE vous est proposé. Vous pouvez le télécharger en suivant le lien ci-contre : '
.
$this
->
tag
(
'a'
,
[
'href'
=>
$guideUrl
])
->
html
(
$this
->
tag
(
'span'
,
[
'class'
=>
'glyphicon glyphicon-book'
])
->
openClose
()
.
' Guide d\'utilisation'
)
);
$guideType
=
$intervenant
->
getStatut
()
->
estVacataire
()
?
'vacataires'
:
'permanents'
;
if
(
!
empty
(
$documentation
[
$guideType
])){
echo
$this
->
tag
(
'div'
,
[
'class'
=>
'alert alert-info'
,
'style'
=>
'margin-top:1em'
,
'role'
=>
'alert'
])
->
html
(
'Un guide d\'utilisation de OSE vous est proposé. Vous pouvez le télécharger en suivant le lien ci-contre : '
.
$this
->
tag
(
'a'
,
[
'target'
=>
'__blank'
,
'href'
=>
$documentation
[
$guideType
]])
->
html
(
$this
->
tag
(
'span'
,
[
'class'
=>
'glyphicon glyphicon-book'
])
->
openClose
()
.
' Guide d\'utilisation'
)
);
}
}
}
elseif
(
$context
->
getStructure
())
{
...
...
module/Application/view/application/parametre/generaux.phtml
View file @
9bc35dd6
...
...
@@ -141,6 +141,22 @@
</div>
</div>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
Liens vers les documentations
</h3>
</div>
<div
class=
"panel-body"
>
<div
class=
"row"
>
<div
class=
"col-md-6"
>
<?=
$this
->
formControlGroup
(
$form
->
get
(
'doc-intervenant-vacataires'
));
?>
</div>
<div
class=
"col-md-6"
>
<?=
$this
->
formControlGroup
(
$form
->
get
(
'doc-intervenant-permanents'
));
?>
</div>
</div>
</div>
</div>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<h3
class=
"panel-title"
>
Etats de paiement et exports Winpaie
</h3>
...
...
public/doc/intervenant/guide_ose_permanent.pdf
deleted
100644 → 0
View file @
b99bf77b
File deleted
public/doc/intervenant/guide_ose_vacataire.pdf
deleted
100644 → 0
View file @
b99bf77b
File deleted
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment