From 527a6362c1f4d161ab153792e71bfce56dd528d1 Mon Sep 17 00:00:00 2001 From: efalcy <efalcy@afi-sa.fr> Date: Thu, 23 Oct 2014 18:21:40 +0200 Subject: [PATCH] hotline #16499 : try to allow reservation for karvi --- .../opac/controllers/NoticeajaxController.php | 2 +- .../View/Helper/Notice/Exemplaires.php | 25 ++++++++++--------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/application/modules/opac/controllers/NoticeajaxController.php b/application/modules/opac/controllers/NoticeajaxController.php index 58400410752..6261feab1e2 100644 --- a/application/modules/opac/controllers/NoticeajaxController.php +++ b/application/modules/opac/controllers/NoticeajaxController.php @@ -145,7 +145,7 @@ class NoticeAjaxController extends Zend_Controller_Action { protected function _loadExemplaireWhere($where) { // Lire les notices groupees ou pas if (0 == $this->notice_html->preferences["exemplaires"]["grouper"]) - return fetchAll("Select id_notice,id_bib,cote,count(*) from exemplaires " . $where . " group by 1,2,3" ); + return fetchAll("Select id_notice,id_bib,cote,count(*),id_int_bib,id_origine from exemplaires " . $where . " group by 1,2,3" ); return fetchAll("Select * from exemplaires " . $where); } diff --git a/library/ZendAfi/View/Helper/Notice/Exemplaires.php b/library/ZendAfi/View/Helper/Notice/Exemplaires.php index 8fd6d5bd8ac..3cd46d0567a 100644 --- a/library/ZendAfi/View/Helper/Notice/Exemplaires.php +++ b/library/ZendAfi/View/Helper/Notice/Exemplaires.php @@ -16,7 +16,7 @@ * * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE * along with AFI-OPAC 2.0; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElement { use Trait_Translator; @@ -32,10 +32,11 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElemen // Recup des donnees de dispo et reservable $cls_comm = null; - if ($preferences["grouper"] == 1) { + xdebug_break(); +// if ($preferences["grouper"] == 1) { $cls_comm = new Class_CommSigb(); $exemplaires = $cls_comm->getDispoExemplaires($exemplaires); - } +// } $cote_libelle = $this->_('Cote').$this->editionLabelle($exemplaires); @@ -61,7 +62,7 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElemen { // Infos bib $bib=fetchEnreg("select LIBELLE,GOOGLE_MAP,INTERDIRE_RESA from bib_c_site where ID_SITE=".$ex["id_bib"]); - + // html $html.='<tr>'; $html.='<td class="num">'.++$num.'</td>'; @@ -94,19 +95,19 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElemen if($preferences["localisation"]==1) { $html.='<td class="localisation" style="text-align:center">'; - - if(!isset($controle[$ex["id_bib"]])) + + if(!isset($controle[$ex["id_bib"]])) $controle[$ex["id_bib"]]=fetchOne("select count(*) from bib_localisations where ID_BIB=".$ex["id_bib"]); - + $onclick="localisationExemplaire(this,".$ex["id_bib"].",'".$ex["cote"]."','".$ex["code_barres"]."')"; - if($controle[$ex["id_bib"]]>0) + if($controle[$ex["id_bib"]]>0) $html.= sprintf('<img src="%s" border="0" title="%s" style="cursor:pointer" onclick="%s" alt="%s" />', URL_ADMIN_IMG.'picto/localisation.png', $this->_('Situer cet exemplaire dans la bibliothèque'), $onclick, $this->_('Situer en exemplaire')); - else + else $html.=' '; $html.='</td>'; } @@ -114,7 +115,7 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElemen if($preferences["plan"]==1) { $html.='<td class="gmap" style="text-align:center;">'; - if($bib["GOOGLE_MAP"] > "") + if($bib["GOOGLE_MAP"] > "") $html .= sprintf('<a href="%s"><img src="%s" border="0" alt="%s" title="%s" /></a>', BASE_URL.'/bib/mapview?id_bib='.$ex["id_bib"].'&retour=notice', URL_ADMIN_IMG.'picto/map.gif', @@ -159,7 +160,7 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElemen $html.='</div>'; $html.='<div class="exemplaires_oeuvre" style="display:none"><img src="'.URL_IMG.'patience.gif"></div>'; } - + // Pour afficher la localisation sur le plan $html.='<div id="plan_localisation" style="display:none"></div>'; @@ -190,7 +191,7 @@ class ZendAfi_View_Helper_Notice_Exemplaires extends Zend_View_Helper_HtmlElemen 'id_profil' => Class_Profil::getCurrentProfil()->getId()], null, true), - $this->view->tagImg(URL_ADMIN_IMG.'ico/edit.gif',['title' => $this->view->_('Modifier la configuration du tableau des exemplaires')]), + $this->view->tagImg(URL_ADMIN_IMG.'ico/edit.gif',['title' => $this->view->_('Modifier la configuration du tableau des exemplaires')]), ['data-popup' => 'true', 'style' => 'position: absolute']); } -- GitLab