From a8b5c78d9eca6d4b389703a7b86acbe99547a97a Mon Sep 17 00:00:00 2001 From: llaffont <llaffont@git-test.afi-sa.fr> Date: Sat, 7 Sep 2013 15:00:45 +0000 Subject: [PATCH] URL_REWRITING: adaptation des liens d'administration des profils --- .../views/scripts/profil/_page_row.phtml | 88 +++++++++++-------- 1 file changed, 52 insertions(+), 36 deletions(-) diff --git a/application/modules/admin/views/scripts/profil/_page_row.phtml b/application/modules/admin/views/scripts/profil/_page_row.phtml index dc52d0a846f..7b1063ac719 100644 --- a/application/modules/admin/views/scripts/profil/_page_row.phtml +++ b/application/modules/admin/views/scripts/profil/_page_row.phtml @@ -1,42 +1,58 @@ - - <li id="page_<?php echo $this->profil->getId()?>" <?php if ($this->selected) echo "class='selected'" ?> > - <div><img src="<?php echo URL_ADMIN_IMG.$this->icon ?>" title="Page" alt="Page"/></div> - - <div> - <a - href="<?php echo BASE_URL.'/admin/profil/accueil/id_profil/'. $this->profil->getId() ?>" - title="Modifier la page"> - <?php echo $this->libelle; ?> - </a> - </div> - - <div class="actions"> - <a href="<?php echo BASE_URL.'/admin/profil/accueil/id_profil/'.$this->profil->getId() ?>"> - <?php echo $this->boutonIco("type=edit") ?> - </a> - - <?php $pp_link_title = sprintf("Visualisation de la page '%s'", $this->profil->getLibelle()); ?> - <a data-prettyphoto="true" - href="<?php echo BASE_URL.'?id_profil='. $this->profil->getId().'&iframe=true&width=100%&height=100%' ?>" - title="<?php echo $pp_link_title ?>" > +<?php +$url_edit_profil = $this->url(['module' => 'admin', + 'controller' => 'profil', + 'action' => 'accueil', + 'id_profil' => $this->profil->getId()], null, true); + +$url_copy_profil = $this->url(['module' => 'admin', + 'controller' => 'profil', + 'action' => 'copy', + 'id_profil' => $this->profil->getId()], null, true); + +$url_delete_profil = $this->url(['module' => 'admin', + 'controller' => 'profil', + 'action' => 'delete', + 'id_profil' => $this->profil->getId()], null, true); +?> + +<li id="page_<?php echo $this->profil->getId()?>" <?php if ($this->selected) echo "class='selected'" ?> > + <div><img src="<?php echo URL_ADMIN_IMG.$this->icon ?>" title="Page" alt="Page"/></div> + + <div> + <a href="<?php echo $url_edit_profil ?>" + title="Modifier la page"> + <?php echo $this->libelle; ?> + </a> + </div> + + <div class="actions"> + <a href="<?php echo $url_edit_profil ?>" + title="Modifier la page"> + <?php echo $this->boutonIco("type=edit") ?> + </a> + + <?php $pp_link_title = sprintf("Visualisation de la page '%s'", $this->profil->getLibelle()); ?> + <a data-prettyphoto="true" + href="<?php echo $this->url(['id_profil' => $this->profil->getId()], null, true).'?iframe=true&width=100%&height=100%' ?>" + title="<?php echo $pp_link_title ?>" > <?php - echo sprintf('<img src="%s" title="%s" alt="%s" />', - URL_ADMIN_IMG.'picto/find.gif', - $pp_link_title, - $pp_link_title); + echo sprintf('<img src="%s" title="%s" alt="%s" />', + URL_ADMIN_IMG.'picto/find.gif', + $pp_link_title, + $pp_link_title); ?> - </a> + </a> - <a href="<?php echo BASE_URL.'/admin/profil/copy/id_profil/'.$this->profil->getId() ?>"> - <?php echo '<img src="'.URL_ADMIN_IMG.'ico/page_copy.png'.'" alt="Dupliquer la page" title="Dupliquer la page"/>'; ?> - </a> + <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 BASE_URL.'/admin/profil/delete/id_profil/'.$this->profil->getId() ?>"> - <?php echo $this->boutonIco("type=del") ?> - </a> - <?php } ?> + <?php if ($this->include_delete_action) { ?> + <a href="<?php echo $url_delete_profil ?>"> + <?php echo $this->boutonIco("type=del") ?> + </a> + <?php } ?> - </div> - </li> + </div> +</li> -- GitLab