Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
afi
opacce
Commits
6b76495b
Commit
6b76495b
authored
Dec 18, 2019
by
Patrick Barroca
😁
Browse files
hotline #99313 : honor barre_nav conf
parent
d8335c74
Pipeline
#8983
passed with stage
in 45 minutes and 25 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
57 additions
and
15 deletions
+57
-15
VERSIONS_HOTLINE/99313
VERSIONS_HOTLINE/99313
+1
-0
application/modules/opac/controllers/BlogController.php
application/modules/opac/controllers/BlogController.php
+3
-8
application/modules/opac/views/scripts/blog/viewavis.phtml
application/modules/opac/views/scripts/blog/viewavis.phtml
+2
-6
library/Class/Systeme/ModulesAppli/Default.php
library/Class/Systeme/ModulesAppli/Default.php
+1
-1
tests/application/modules/opac/controllers/BlogControllerTest.php
...plication/modules/opac/controllers/BlogControllerTest.php
+50
-0
No files found.
VERSIONS_HOTLINE/99313
0 → 100644
View file @
6b76495b
- ticket #99313 : Page critique : Respect de la configuration "texte du fil d'ariane"
\ No newline at end of file
application/modules/opac/controllers/BlogController.php
View file @
6b76495b
...
...
@@ -139,14 +139,9 @@ class BlogController extends ZendAfi_Controller_Action {
public
function
viewavisAction
()
{
$id_avis
=
$this
->
_getParam
(
'id'
);
$avis
=
Class_AvisNotice
::
find
(
$id_avis
);
$this
->
view
->
avis
=
$avis
;
$this
->
view
->
commentaires
=
[];
$this
->
view
->
modo_blog
=
$this
->
modo_blog
;
$this
->
view
->
user_co
=
(
$this
->
_user
->
ID_USER
!=
''
);
$this
->
view
->
user
=
$this
->
_user
;
$cfg
=
Class_Profil
::
getCurrentProfil
()
->
getConfigurationOf
(
'blog'
,
'viewavis'
,
''
);
$this
->
view
->
titre
=
$cfg
[
'barre_nav'
];
$this
->
view
->
avis
=
Class_AvisNotice
::
find
((
int
)
$this
->
_getParam
(
'id'
));
}
...
...
application/modules/opac/views/scripts/blog/viewavis.phtml
View file @
6b76495b
<?php
$user
=
Class_Users
::
getIdentity
();
$class_user
=
new
Class_Users
();
$class_blog
=
new
Class_Blog
();
$this
->
openBoite
(
'Critique'
);
<?php
$this
->
openBoite
(
$this
->
titre
);
echo
$this
->
avis
(
$this
->
avis
);
$this
->
closeBoite
();
?>
...
...
library/Class/Systeme/ModulesAppli/Default.php
View file @
6b76495b
...
...
@@ -265,7 +265,7 @@ class Class_Systeme_ModulesAppli_Default {
* @return array
*/
private
function
getDefautBlog
()
{
return
[
'barre_nav'
=>
'Critique'
,
return
[
'barre_nav'
=>
$this
->
_
(
'Critique'
)
,
'nb_display'
=>
50
];
}
...
...
tests/application/modules/opac/controllers/BlogControllerTest.php
View file @
6b76495b
...
...
@@ -227,3 +227,53 @@ class BlogControllerHierarchicalTest extends AbstractControllerTestCase {
$this
->
_response
->
getBody
()];
}
}
/** @see http://forge.afi-sa.fr/issues/99313 */
class
BlogControllerViewavisTest
extends
AbstractControllerTestCase
{
protected
$_storm_default_to_volatile
=
true
;
public
function
setUp
()
{
parent
::
setUp
();
Class_Profil
::
getCurrentProfil
()
->
setCfgModules
([
'blog'
=>
[
'viewavis'
=>
[
'barre_nav'
=>
'Coups de coeur à partager'
]]]);
Class_AdminVar
::
set
(
'AVIS_MIN_SAISIE'
,
0
);
Class_AdminVar
::
set
(
'AVIS_MAX_SAISIE'
,
1000
);
$this
->
ksp
=
$this
->
fixture
(
'Class_Notice'
,
[
'id'
=>
233134
,
'titre_principal'
=>
'Kerbal Space Program'
,
'clef_oeuvre'
=>
'KERBALSPACEPROG-SQUAD-'
,
'clef_alpha'
=>
'KERBALSPACEPROG-SQUAD-'
]);
$this
->
fixture
(
'Class_AvisNotice'
,
[
'id'
=>
1
,
'id_notice'
=>
233134
,
'note'
=>
5
,
'entete'
=>
'Incroyable'
,
'id_notice'
=>
$this
->
ksp
->
getId
(),
'avis'
=>
'What a wonderful game'
,
'statut'
=>
1
,
'date_avis'
=>
'2015-05-18 00:00:00'
,
'id_user'
=>
3
,
'source_author'
=>
null
,
'clef_oeuvre'
=>
$this
->
ksp
->
getClefOeuvre
()]);
$this
->
fixture
(
'Class_Users'
,
[
'id'
=>
3
,
'login'
=>
'Harlock'
,
'password'
=>
'arcadia'
]);
$this
->
dispatch
(
'/blog/viewavis/id/1/retour_avis/10'
);
}
/** @test */
public
function
breadcrumbShouldContainsCoupsDeCoeurAPartager
()
{
$this
->
assertXPathContentContains
(
'//div[@class="barre_nav"]//span'
,
'Coups de coeur à partager'
);
}
}
\ No newline at end of file
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