From d5013949d811a5ec9959e7c7752f28cce5d6399b Mon Sep 17 00:00:00 2001
From: gloas <gloas@git-test.afi-sa.fr>
Date: Thu, 30 May 2013 13:06:51 +0000
Subject: [PATCH] Graphisme: maj panier

---
 .../views/scripts/panier/_panier_row.phtml    | 66 ++++++++-----------
 .../opac/views/scripts/panier/index.phtml     | 24 +++----
 public/opac/css/global.css                    | 57 +++++++++++++++-
 3 files changed, 95 insertions(+), 52 deletions(-)

diff --git a/application/modules/opac/views/scripts/panier/_panier_row.phtml b/application/modules/opac/views/scripts/panier/_panier_row.phtml
index 431aed480ee..8515b5db6dd 100644
--- a/application/modules/opac/views/scripts/panier/_panier_row.phtml
+++ b/application/modules/opac/views/scripts/panier/_panier_row.phtml
@@ -1,41 +1,33 @@
 <tr class="<?php echo $this->_item_class; ?>">
 
-	<td style="text-align:left">
-    		<?php echo $this->panier->getLibelle(); ?>
+	 <td><?php echo $this->panier->getLibelle(); ?>
+<?php 
+if ($this->panier->hasCatalogues()) {
+	$catalogue_links = [];
+	$catalogues = $this->panier->getCatalogues();
+	foreach($catalogues as $catalogue) 
+		$catalogue_links []= $this->tagAnchor(['module' => 'admin', 
+																					 'controller' => 'catalogue', 
+																					 'action' => 'paniers', 
+																					 'id_catalogue' => $catalogue->getId()],
+																					$catalogue->getLibelle());
 
-		<?php 
-			 if ($this->panier->hasCatalogues()) {
-				 $catalogue_links = [];
-		     $catalogues = $this->panier->getCatalogues();
-				 foreach($catalogues as $catalogue) 
-				   $catalogue_links []= $this->tagAnchor(['module' => 'admin', 
-																									'controller' => 'catalogue', 
-																									'action' => 'paniers', 
-																									'id_catalogue' => $catalogue->getId()],
-																								 $catalogue->getLibelle());
-
-				 echo '<div>'.implode(', ', $catalogue_links).'</div>';
-		   }
-		?>
-	 <td style="text-align:center"><?php echo $this->panier->getDateMaj(); ?></td>
-		<td style="text-align:center;width:120px"><?php echo $this->panier->numberOfNotices(); ?></td>
-<td style="text-align:left">
-  	<a href="<?php echo $this->url(['action' => 'index', 
-	  				 'id_panier' => $this->panier->getId()]); ?>">Modifier le contenu	</a>
- 		<td style="text-align:left">
-			<?php 
-			 echo $this->tagAnchor(['module' => 'opac', 
-															'controller' => 'recherche',
-															'action' => 'simple',
-															'id_panier' => $this->panier->getId(),
-															'retour_panier' => $this->panier->getId()],
-													 'Afficher en résultat de recherche');
-
-			 ?>
-
-			<?php if ($this->panier->isUserEquals(Class_Users::getIdentity())) { ?>
-			  <a href="<?php echo $this->url(['action' => 'supprimerpanier', 'id_panier' => $this->panier->getId()]) ?>" onclick="return confirm('<?php echo $this->traduire("Etes-vous sûr de vouloir supprimer ce panier ?"); ?>')"> Supprimer </a>
-			<?php } ?>
-			</td>
-</tr>
+	echo '<div>'.implode(', ', $catalogue_links).'</div>';
+}
+?>
+<td><?php echo $this->panier->getDateMaj(); ?></td>
+<td><?php echo $this->panier->numberOfNotices(); ?></td>
+<td><a href="<?php echo $this->url(['action' => 'index', 
+	  				 'id_panier' => $this->panier->getId()]); ?>">&nbsp</a></td>
+	 <td><?php 
+	 echo $this->tagAnchor(['module' => 'opac', 
+													'controller' => 'recherche',
+													'action' => 'simple',
+													'id_panier' => $this->panier->getId(),
+													'retour_panier' => $this->panier->getId()],'&nbsp'); ?></td>
+<?php if ($this->panier->isUserEquals(Class_Users::getIdentity())) { ?>
+		 <td class="supprimer">
+		 <a href="<?php echo $this->url(['action' => 'supprimerpanier', 'id_panier' => $this->panier->getId()]) ?>"  onclick="return confirm('<?php echo $this->traduire("Etes-vous sûr de vouloir supprimer ce panier ?"); ?>')">&nbsp</a>
+<?php }else { ?> <td><a href="#" ></a>	<?php	 } ?>	</td>
+		 </tr>
 
diff --git a/application/modules/opac/views/scripts/panier/index.phtml b/application/modules/opac/views/scripts/panier/index.phtml
index 5980911b925..79731e3dc5d 100644
--- a/application/modules/opac/views/scripts/panier/index.phtml
+++ b/application/modules/opac/views/scripts/panier/index.phtml
@@ -15,17 +15,17 @@ if ($this->ajout_panier_form)
 
 
 <?php $this->openBoite(''); ?>
-<table style="width:90%" class="panier_notices">
-	<tr class="soustitre">
-		 <th style="text-align:left;"><?php echo $this->_('Nom du panier') ?></th>
-		 <th style="text-align:right;"><?php echo $this->_('Date') ?></th>
-		 <th style="text-align:center;"><?php echo $this->_('Nb de notices') ?></th>
-		 <th style="visibility:hidden;"><?php echo $this->_('Modifier') ?></th>
-		 <th style="visibility:hidden;"><?php echo $this->_('Afficher') ?></th>
-		 <th></th>
+<table class="soustitre">
+	<tr >
+		 <th><?php echo $this->_('Nom du panier') ?></th>
+		 <th><?php echo $this->_('Date') ?></th>
+		 <th><?php echo $this->_('Nb de notices') ?></th>
+		 <th><?php echo $this->_('Modifier le contenu') ?></th>
+		 <th><?php echo $this->_('Afficher en résultat de recherche') ?></th>
+		 <th><?php echo $this->_('Supprimer') ?></th>
 	</tr>
 </table>
-<div style="width:90%" class="panier_notices_container">
+<div class="panier_notices_container">
 <table class="panier_notices">
 <?php 
 		echo $this->partialCycle('panier/_panier_row.phtml', 
@@ -63,7 +63,7 @@ if($this->panier_courant) {
 	
 	// Contenu panier
 	if($nombre_notices > 0)	{
-		print('<table width="80%">');
+		print('<table class="contenu_panier">');
 		print('<tr>');
 		print('<th width="1%">&nbsp;</th>');
 		printf('<th style="text-align:left">%s</th>', $this->_('Nom de la notice'));
@@ -77,8 +77,8 @@ if($this->panier_courant) {
 			print('<td><a href="'.$this->urlNotice($notice,$this->panier_courant->getId()).'">'.$notice->getTitrePrincipal().'</a></td>');
 			print('<td>'.$notice->getAuteurPrincipal().'</td>');
 			?>
-				<td style="text-align:center">
-					<a href="<?php echo $this->url(['action' => 'paniersupprimernotice', 'id_panier' => $this->panier_courant->getId(),'id_notice' => $notice->getId()]); ?>" onclick="return confirm('<?php echo $this->traduire("Etes-vous sûr de vouloir supprimer cette notice du panier ?"); ?>')"> Supprimer	</a>
+				<td class="supprimer" style="text-align:center">
+					<a href="<?php echo $this->url(['action' => 'paniersupprimernotice', 'id_panier' => $this->panier_courant->getId(),'id_notice' => $notice->getId()]); ?>"  onclick="return confirm('<?php echo $this->traduire("Etes-vous sûr de vouloir supprimer cette notice du panier ?"); ?>')">&nbsp</a>
 				</td>
 			<?php
 			print('</tr>');
diff --git a/public/opac/css/global.css b/public/opac/css/global.css
index 5a29cb32aa5..85da0688ff0 100644
--- a/public/opac/css/global.css
+++ b/public/opac/css/global.css
@@ -1583,15 +1583,66 @@ div.entete_notice {
 
 div.panier_notices_container{
     overflow:auto;    
-    height:300px;
+    height:200px;
     margin-bottom:20px;
 }
 
-table.panier_notices td {
+table.soustitre, table.panier_notices , table.contenu_panier {
+    width:90%;
+}
+
+table.soustitre th, table.panier_notices td{
+    text-align:center;
     vertical-align: top;
-    padding-right: 5px;
 }
 
+
+
+table.soustitre th:nth-of-type(1), table.panier_notices td:nth-of-type(1) {
+    width:250px;
+    text-align:left;
+}
+
+table.soustitre th:nth-of-type(2), table.panier_notices td:nth-of-type(2) {
+    width:60px;
+}
+
+table.soustitre th:nth-of-type(3), table.panier_notices td:nth-of-type(3) {
+    width:80px;
+}
+
+table.soustitre th:nth-of-type(4), table.panier_notices td:nth-of-type(4) {
+    width:90px;
+}
+
+table.soustitre th:nth-of-type(5), table.panier_notices td:nth-of-type(5) {
+    width:120px;
+}
+
+table.soustitre th:nth-of-type(6), table.panier_notices td:nth-of-type(6) {
+    width:50px;
+    padding-right:18px;
+}
+
+
+table.panier_notices td:nth-of-type(4) {
+    background: url(../../admin/images/ico/edit.gif) no-repeat top center;
+}
+
+table.panier_notices td:nth-of-type(5) {
+    background: url(../../admin/images/ico/show.gif) no-repeat top center;
+}
+
+table.panier_notices .supprimer {
+    background: url(../../admin/images/ico/del.gif) no-repeat top center;
+}
+
+
+table.contenu_panier .supprimer{
+     background: url(../../admin/images/ico/del.gif) no-repeat center center;
+}
+
+
 table.panier_notices td:first-child + td {
     white-space: nowrap;
 }
-- 
GitLab