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
Quentin CHEVILLON
opacce
Commits
773b3117
Commit
773b3117
authored
Aug 18, 2021
by
Arthur Suzuki
Browse files
hotline MT #138657 fix selection link in user search administration
parent
2a7af482
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
120 additions
and
33 deletions
+120
-33
VERSIONS_HOTLINE/138657
VERSIONS_HOTLINE/138657
+1
-0
application/modules/opac/views/scripts/panier/viewauteur.phtml
...cation/modules/opac/views/scripts/panier/viewauteur.phtml
+1
-30
library/ZendAfi/View/Helper/Panier/Viewauteur.php
library/ZendAfi/View/Helper/Panier/Viewauteur.php
+56
-0
library/templates/Intonation/System/Abstract.php
library/templates/Intonation/System/Abstract.php
+1
-0
library/templates/Intonation/View/Panier/Viewauteur.php
library/templates/Intonation/View/Panier/Viewauteur.php
+28
-0
library/templates/Intonation/View/SocialNetworksActions.php
library/templates/Intonation/View/SocialNetworksActions.php
+1
-1
library/templates/Intonation/View/Template/Permalink.php
library/templates/Intonation/View/Template/Permalink.php
+2
-2
tests/scenarios/Templates/TemplatesAbonneSelectionsTest.php
tests/scenarios/Templates/TemplatesAbonneSelectionsTest.php
+30
-0
No files found.
VERSIONS_HOTLINE/138657
0 → 100644
View file @
773b3117
- ticket #138657 : Administration : correction du lien d'accès aux paniers dans la liste des utilisateurs dans le contexte du magasin de thèmes.
\ No newline at end of file
application/modules/opac/views/scripts/panier/viewauteur.phtml
View file @
773b3117
<?php
$this
->
openBoite
(
$this
->
_
(
'Les paniers de %s'
,
$this
->
name
));
echo
$this
->
tag
(
'span'
,
$this
->
_plural
(
count
(
$this
->
paniers
),
"Il n\'y a aucun panier."
,
"Il y a %d panier"
,
"Il y a %d paniers"
,
count
(
$this
->
paniers
)),
[
'class'
=>
'abonne'
,
'id'
=>
'abonne_erreur'
]);
$panier_domain
=
$this
->
tagAnchor
(
$this
->
url
([
'controller'
=>
'panier'
,
'action'
=>
'domain'
],
null
,
true
),
$this
->
_
(
'Voir les paniers rangés dans des domaines'
),
[
'class'
=>
'bouton'
]);
$panier_pro
=
$this
->
tagAnchor
(
$this
->
url
([
'controller'
=>
'panier'
,
'action'
=>
'pro'
],
null
,
true
),
$this
->
_
(
'Voir les paniers des professionnels'
),
[
'class'
=>
'bouton'
]);
echo
$this
->
tag
(
'div'
,
$panier_domain
.
$panier_pro
);
echo
$this
->
panier_Table
(
$this
->
paniers
,
[],
[],
[],
2
);
if
(
$this
->
erreur
)
echo
$this
->
tag
(
'script'
,
sprintf
(
'alert("%s")'
,
$this
->
erreur
));
$this
->
closeBoite
();
?>
echo
$this
->
Panier_Viewauteur
(
$this
->
name
,
$this
->
paniers
);
library/ZendAfi/View/Helper/Panier/Viewauteur.php
0 → 100644
View file @
773b3117
<?php
/**
* Copyright (c) 2012-2021, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
ZendAfi_View_Helper_Panier_Viewauteur
extends
ZendAfi_View_Helper_BaseHelper
{
public
function
Panier_Viewauteur
(
$name
,
$paniers
)
{
$html
=
[
$this
->
view
->
openBoiteContent
(
$this
->
_
(
'Les paniers de %s'
,
$name
)),
$this
->
_tag
(
'span'
,
$this
->
_plural
(
count
(
$paniers
),
"Il n\'y a aucun panier."
,
"Il y a %d panier"
,
"Il y a %d paniers"
,
count
(
$paniers
)),
[
'class'
=>
'abonne'
,
'id'
=>
'abonne_erreur'
])];
$panier_domain
=
$this
->
view
->
tagAnchor
(
$this
->
view
->
url
([
'controller'
=>
'panier'
,
'action'
=>
'domain'
],
null
,
true
),
$this
->
_
(
'Voir les paniers rangés dans des domaines'
),
[
'class'
=>
'bouton'
]);
$panier_pro
=
$this
->
view
->
tagAnchor
(
$this
->
view
->
url
([
'controller'
=>
'panier'
,
'action'
=>
'pro'
],
null
,
true
),
$this
->
_
(
'Voir les paniers des professionnels'
),
[
'class'
=>
'bouton'
]);
$html
[]
=
$this
->
_tag
(
'div'
,
$panier_domain
.
$panier_pro
);
$html
[]
=
$this
->
view
->
panier_Table
(
$paniers
,
[],
[],
[],
2
);
if
(
$this
->
view
->
erreur
)
$html
[]
=
$this
->
_tag
(
'script'
,
sprintf
(
'alert("%s")'
,
$this
->
view
->
erreur
));
$html
[]
=
$this
->
view
->
closeBoiteContent
();
return
implode
(
$html
);
}
}
library/templates/Intonation/System/Abstract.php
View file @
773b3117
...
...
@@ -166,6 +166,7 @@ abstract class Intonation_System_Abstract {
if
(
$this
->
isVisibleForUserController
())
{
$controllers
[]
=
'abonne'
;
$controllers
[]
=
'panier'
;
$controllers
[]
=
'drive-checkout'
;
}
...
...
library/templates/Intonation/View/Panier/Viewauteur.php
0 → 100644
View file @
773b3117
<?php
/**
* Copyright (c) 2012-2021, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Intonation_View_Panier_Viewauteur
extends
ZendAfi_View_Helper_BaseHelper
{
public
function
Panier_Viewauteur
(
$name
,
$paniers
)
{
$this
->
view
->
titre
=
$this
->
_
(
'Les sélections de %s'
,
$name
);
return
$this
->
view
->
abonne_Selections
(
$paniers
);
}
}
library/templates/Intonation/View/SocialNetworksActions.php
View file @
773b3117
...
...
@@ -47,7 +47,7 @@ class Intonation_View_SocialNetworksActions extends ZendAfi_View_Helper_ReseauxS
public
function
links
(
$info_to_share
)
{
$this
->
shareLinkHtmlHeader
(
$info_to_share
);
$this
->
_actions
[]
=
$this
->
view
->
p
ermalink
(
$this
->
view
->
absoluteUrl
(
$info_to_share
[
'url_to_share'
]));
$this
->
_actions
[]
=
$this
->
view
->
Template_P
ermalink
(
$this
->
view
->
absoluteUrl
(
$info_to_share
[
'url_to_share'
]));
return
''
;
}
}
library/templates/Intonation/View/Permalink.php
→
library/templates/Intonation/View/
Template/
Permalink.php
View file @
773b3117
...
...
@@ -18,9 +18,9 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class
Intonation_View_Permalink
extends
ZendAfi_View_Helper_BaseHelper
{
class
Intonation_View_
Template_
Permalink
extends
ZendAfi_View_Helper_BaseHelper
{
public
function
p
ermalink
(
$url
)
{
public
function
Template_P
ermalink
(
$url
)
{
return
(
new
Intonation_Library_Link
)
->
setText
(
$this
->
_
(
'Lien …'
))
->
setImage
(
$this
->
view
->
templateIco
(
'permalink'
,
'utils'
))
...
...
tests/scenarios/Templates/TemplatesAbonneSelectionsTest.php
View file @
773b3117
...
...
@@ -71,6 +71,36 @@ abstract class TemplatesAbonneSelectionsTestCase extends TemplatesIntonationTest
class
TemplatesAbonneShowUserCartAsAdminTest
extends
Admin_AbstractControllerTestCase
{
protected
$_storm_default_to_volatile
=
true
;
public
function
setUp
()
{
parent
::
setUp
();
$this
->
_buildTemplateProfil
([
'id'
=>
2
]);
$admin
=
Class_Users
::
newInstanceWithId
(
'123456'
,[
'nom'
=>
'Zozor'
])
->
beAdminPortail
();
$this
->
fixture
(
Class_PanierNotice
::
class
,
[
'id'
=>
67
,
'libelle'
=>
'Zozor sélection'
,
'id_user'
=>
123456
]);
$this
->
dispatch
(
'/opac/panier/viewauteur/id/123456'
);
}
/** @test */
public
function
shouldRenderZozorSelection
()
{
$this
->
assertXPathContentContains
(
'//body[contains(@class, "template_INTONATION")]//div[contains(@class,"card-title")]//a[contains(@href, "id_panier/67")]'
,
'Zozor sélection'
);
}
}
class
TemplatesAbonneSelectionsAsAbonneTest
extends
TemplatesAbonneSelectionsTestCase
{
public
function
setUp
()
{
parent
::
setUp
();
...
...
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