Skip to content
Snippets Groups Projects
Commit 44351b36 authored by llaffont's avatar llaffont
Browse files

Correction prévisualisation des profils avec prettyPhoto

parent 988cae95
Branches
Tags
No related merge requests found
......@@ -33,19 +33,19 @@ $url_delete_profil = $this->url(['module' => 'admin',
<?php
echo $this->tagPreview($this->url(['id_profil' => $this->profil->getId()]),
sprintf("Visualisation de la page '%s'", $this->profil->getLibelle()));
?>
echo $this->tagPreview($this->url(['id_profil' => $this->profil->getId()], null, true),
sprintf("Visualisation de la page '%s'", $this->profil->getLibelle()));
?>
<a href="<?php echo $url_copy_profil ?>">
<?php echo '<img src="'.URL_ADMIN_IMG.'ico/page_copy.png'.'" alt="Dupliquer la page" title="Dupliquer la page"/>'; ?>
</a>
<?php if ($this->include_delete_action) { ?>
<a href="<?php echo $url_delete_profil ?>">
<?php echo $this->boutonIco("type=del") ?>
</a>
<a href="<?php echo $url_delete_profil ?>">
<?php echo $this->boutonIco("type=del") ?>
</a>
<?php } ?>
......
......@@ -21,7 +21,7 @@
class ZendAfi_View_Helper_TagPreview extends ZendAfi_View_Helper_BaseHelper {
public function tagPreview($url, $libelle) {
return
'<a data-prettyphoto="true" href="'.$url.'&amp;iframe=true&amp;width=95%25&amp;height=95%25;" title="'.$libelle.'">
'<a data-prettyphoto="true" href="'.$url.'?'.http_build_query(['iframe' => 'true', 'width' => '95%', 'height' => '95%']).'" title="'.$libelle.'">
<img
src="'.URL_ADMIN_IMG.'picto/show.gif"
title="'.$libelle.'"
......
......@@ -124,14 +124,13 @@ class Admin_ProfilControllerWithAdminPortailIndexTest extends Admin_ProfilContro
/** @test */
function previewPageAccueilAnchorTitleShouldBeVisualisationDeLaPageAdulte() {
$this->assertXPath('//div/ul[1]//li[1]//a[@data-prettyphoto="true"][contains(@title, "Visualisation de la page \'Adulte\'")]',
$this->_response->getBody());
$this->assertXPath('//div/ul[1]//li[1]//a[@data-prettyphoto="true"][contains(@title, "Visualisation de la page \'Adulte\'")][@href="/index/index/id_profil/8?iframe=true&width=95%25&height=95%25"]');
}
/** @test */
public function prettyPhotoShouldBeLoaded() {
$this->assertXPath('//script[contains(@src, "public/admin/js/prettyphoto/js/jquery.prettyPhoto.js")]');
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment