Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
renderer
Commits
d0cbe36c
Commit
d0cbe36c
authored
Oct 15, 2021
by
Jean-Philippe Metivier
Browse files
Modification suite réunion
parent
c164b6d1
Pipeline
#11114
passed with stage
in 26 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/UnicaenRenderer/Controller/RenduController.php
View file @
d0cbe36c
...
...
@@ -25,7 +25,7 @@ class RenduController extends AbstractActionController {
return
new
ViewModel
([
'title'
=>
"Affichage du contenu #"
.
$rendu
->
getId
(),
'
cont
enu'
=>
$rendu
,
'
r
en
d
u'
=>
$rendu
,
]);
}
...
...
src/UnicaenRenderer/Controller/TemplateController.php
View file @
d0cbe36c
...
...
@@ -67,6 +67,7 @@ class TemplateController extends AbstractActionController {
$form
=
$this
->
getTemplateForm
();
$form
->
setAttribute
(
'action'
,
$this
->
url
()
->
fromRoute
(
'contenu/template/modifier'
,
[
'template'
=>
$template
->
getId
()],
[],
true
));
$form
->
bind
(
$template
);
$form
->
setOldCode
(
$template
->
getCode
());
$request
=
$this
->
getRequest
();
if
(
$request
->
isPost
())
{
...
...
src/UnicaenRenderer/Entity/Db/Template.php
View file @
d0cbe36c
...
...
@@ -8,6 +8,11 @@ class Template implements ResourceInterface
{
const
RESOURCE_ID
=
'Template'
;
public
function
generateTag
()
:
string
{
return
(
implode
(
'_'
,
[
$this
->
getResourceId
(),
$this
->
getCode
()]));
}
/**
* @return string
*/
...
...
src/UnicaenRenderer/Service/Rendu/RenduService.php
View file @
d0cbe36c
...
...
@@ -92,7 +92,7 @@ class RenduService {
* @param int $id
* @return Rendu|null
*/
public
function
getRendu
(
int
$id
)
:
?Rendu
public
function
getRendu
(
?
int
$id
)
:
?Rendu
{
$qb
=
$this
->
createQueryBuilder
()
->
andWhere
(
'contenu.id = :id'
)
...
...
@@ -111,7 +111,7 @@ class RenduService {
* @param string $param
* @return Rendu|null
*/
public
function
getRequestedRendu
(
AbstractActionController
$controller
,
string
$param
=
'
cont
enu'
)
:
?Rendu
public
function
getRequestedRendu
(
AbstractActionController
$controller
,
string
$param
=
'
r
en
d
u'
)
:
?Rendu
{
$id
=
$controller
->
params
()
->
fromRoute
(
$param
);
$result
=
$this
->
getRendu
(
$id
);
...
...
src/UnicaenRenderer/View/Helper/partial/rendu.phtml
View file @
d0cbe36c
...
...
@@ -2,7 +2,7 @@
/**
* @see \UnicaenRenderer\View\Helper\RenduViewHelper
* @var Rendu $
cont
enu
* @var Rendu $
r
en
d
u
* @var array $options
*/
...
...
@@ -15,29 +15,29 @@ use UnicaenRenderer\Entity\Db\Rendu;
<dl>
<dt>
Identifiant
</dt>
<dd>
<?php
echo
$
cont
enu
->
getId
();
?>
<?php
echo
$
r
en
d
u
->
getId
();
?>
</dd>
<dt>
Template
</dt>
<dd>
<?php
if
(
$
cont
enu
->
getTemplate
())
:
?>
<?php
echo
$
cont
enu
->
getTemplate
()
->
getCode
();
?>
<?php
if
(
$
r
en
d
u
->
getTemplate
())
:
?>
<?php
echo
$
r
en
d
u
->
getTemplate
()
->
getCode
();
?>
<?php
else
:
?>
<i>
Aucun template associé
</i>
<?php
endif
;
?>
</dd>
<dt>
Date de génération
</dt>
<dd>
<?php
echo
$
cont
enu
->
getDate
()
->
format
(
'd/m/Y'
);
?>
<?php
echo
$
r
en
d
u
->
getDate
()
->
format
(
'd/m/Y'
);
?>
</dd>
</dl>
</div>
<div
class=
"col-md-8"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading"
>
<?php
echo
$
cont
enu
->
getSujet
();
?>
<?php
echo
$
r
en
d
u
->
getSujet
();
?>
</div>
<div
class=
"panel-body"
>
<?php
echo
$
cont
enu
->
getCorps
();
?>
<?php
echo
$
r
en
d
u
->
getCorps
();
?>
</div>
</div>
</div>
...
...
view/unicaen-renderer/
cont
enu/afficher.phtml
→
view/unicaen-renderer/
r
en
d
u/afficher.phtml
View file @
d0cbe36c
File moved
view/unicaen-renderer/
cont
enu/index.phtml
→
view/unicaen-renderer/
r
en
d
u/index.phtml
View file @
d0cbe36c
File moved
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment