Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos-tav
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
agplv3
kohinos-tav
Commits
230ce048
Commit
230ce048
authored
Mar 01, 2024
by
Yvon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ssa-gironde' into 5767-late-autoevaluation-presta-edit
parents
55b9e57b
d30ccaea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
12 deletions
+32
-12
twig.yaml
config/packages/twig.yaml
+3
-2
PrestatairesController.php
src/Controller/PrestatairesController.php
+13
-9
show.html.twig
templates/themes/kohinos/presta/show.html.twig
+16
-1
No files found.
config/packages/twig.yaml
View file @
230ce048
...
@@ -12,4 +12,5 @@ twig:
...
@@ -12,4 +12,5 @@ twig:
'
%kernel.project_dir%/templates/themes/kohinos'
:
kohinos
'
%kernel.project_dir%/templates/themes/kohinos'
:
kohinos
globals
:
globals
:
tav_env
:
'
%env(TAV_ENV)%'
tav_env
:
'
%env(TAV_ENV)%'
presta_self_init_and_eval
:
'
%env(PRESTA_SELF_INIT_AND_EVAL)%'
presta_self_init_and_eval
:
'
%env(PRESTA_SELF_INIT_AND_EVAL)%'
\ No newline at end of file
presta_extra_data
:
'
%env(PRESTA_EXTRA_DATA)%'
\ No newline at end of file
src/Controller/PrestatairesController.php
View file @
230ce048
...
@@ -43,15 +43,19 @@ class PrestatairesController extends FrontController
...
@@ -43,15 +43,19 @@ class PrestatairesController extends FrontController
return
new
RedirectResponse
(
$this
->
router
->
generate
(
'index'
));
return
new
RedirectResponse
(
$this
->
router
->
generate
(
'index'
));
}
}
$quiz
=
$prestataire
->
getSelfEvalPrestaQuiz
();
$templateData
=
[
'presta'
=>
$prestataire
];
$formClass
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
DistributorSelfEvalPrestaQuizType
::
class
:
ProducerSelfEvalPrestaQuizType
::
class
;
// If feature activated, display self evaluation form
$form
=
$this
->
createForm
(
$formClass
,
$quiz
,
[
"mode"
=>
SelfEvalPrestaQuizType
::
READONLY
]);
if
(
$this
->
getParameter
(
'presta_self_init_and_eval'
)
==
true
)
{
$quiz
=
$prestataire
->
getSelfEvalPrestaQuiz
();
return
$this
->
render
(
'@kohinos/presta/show.html.twig'
,
[
$formClass
=
Prestataire
::
DISTRIBUTOR
===
$prestataire
->
getMarketChannelFunction
()
?
'presta'
=>
$prestataire
,
DistributorSelfEvalPrestaQuizType
::
class
:
ProducerSelfEvalPrestaQuizType
::
class
;
'form'
=>
$form
->
createView
()
$form
=
$this
->
createForm
(
$formClass
,
$quiz
,
[
"mode"
=>
SelfEvalPrestaQuizType
::
READONLY
]);
]);
$templateData
[
'form'
]
=
$form
->
createView
();
}
return
$this
->
render
(
'@kohinos/presta/show.html.twig'
,
$templateData
);
}
}
/**
/**
...
...
templates/themes/kohinos/presta/show.html.twig
View file @
230ce048
...
@@ -50,6 +50,9 @@
...
@@ -50,6 +50,9 @@
{%
if
presta.web
!=
null
%}
{%
if
presta.web
!=
null
%}
<h6
class=
"card-subtitle mb-3"
>
{{
'Site web'
|
trans
}}
:
<a
href=
'
{{
presta.web
}}
'
target=
'_blank'
rel=
'noopener noreferrer'
>
{{
presta.web
}}
</a></h6>
<h6
class=
"card-subtitle mb-3"
>
{{
'Site web'
|
trans
}}
:
<a
href=
'
{{
presta.web
}}
'
target=
'_blank'
rel=
'noopener noreferrer'
>
{{
presta.web
}}
</a></h6>
{%
endif
%}
{%
endif
%}
{%
if
presta_extra_data
and
presta.conventionnement
!=
null
and
presta.conventionnement
>
0
%}
<h6
class=
"card-subtitle mb-3"
>
{{
'Pourcentage de conventionnement'
|
trans
}}
:
{{
presta.conventionnement
*
100
}}
%
</h6>
{%
endif
%}
{#
{
% if presta.responsable != null and presta.metier != null %}
{#
{
% if presta.responsable != null and presta.metier != null %}
<h6 class="card-title my-3">Responsable :
{{
presta.responsable }} (
{{
presta.metier }})</h6>
<h6 class="card-title my-3">Responsable :
{{
presta.responsable }} (
{{
presta.metier }})</h6>
{
% endif %} #}
{
% endif %} #}
...
@@ -77,10 +80,22 @@
...
@@ -77,10 +80,22 @@
{%
endfor
%}
{%
endfor
%}
</ul>
</ul>
{%
endif
%}
{%
endif
%}
{%
if
presta_extra_data
and
presta.prestataireProductFamilies
|
length
>
0
%}
<div
class=
"card-header"
><h2>
{{
'Produits vendus'
|
trans
}}
</h2></div>
<ul
class=
"list-group list-group-flush"
>
{%
for
prestataireProductFamily
in
presta.prestataireProductFamilies
%}
{%
if
prestataireProductFamily.products
|
length
>
0
%}
<li
class=
"list-group-item"
>
{{
prestataireProductFamily.productFamily.name
}}
</li>
{%
endif
%}
{%
endfor
%}
</ul>
{%
endif
%}
{%
if
app.user
and
presta_self_init_and_eval
and
presta.selfEvalPrestaQuiz
%}
{%
if
app.user
and
presta_self_init_and_eval
and
presta.selfEvalPrestaQuiz
%}
{%
set
prestataire
=
presta
%}
{%
set
prestataire
=
presta
%}
<div
class=
"card-header"
>
<div
class=
"card-header"
>
<h2>
Questionnaire
</h2>
<h2>
{{
'Questionnaire'
|
trans
}}
</h2>
{%
if
app.user
in
prestataire.users
and
is_granted
(
"ROLE_PRESTATAIRE"
)
%}
{%
if
app.user
in
prestataire.users
and
is_granted
(
"ROLE_PRESTATAIRE"
)
%}
<a
class=
'btn btn-primary float-right'
href=
"
{{
path
(
'quiz-presta-edit'
)
}}
"
>
Corriger
</a>
<a
class=
'btn btn-primary float-right'
href=
"
{{
path
(
'quiz-presta-edit'
)
}}
"
>
Corriger
</a>
{%
endif
%}
{%
endif
%}
...
...
Write
Preview
Markdown
is supported
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