From 6a206584ee263dc06acdbbd3caf2149e01401688 Mon Sep 17 00:00:00 2001
From: Ghislain Loas <ghislo@sandbox.pergame.net>
Date: Tue, 24 Nov 2015 17:18:23 +0100
Subject: [PATCH] dev #30973 remove info in front + improve popup css

---
 library/ZendAfi/View/Helper/TagDilicomWidget.php | 16 +---------------
 public/opac/css/global.css                       |  6 ++++++
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/library/ZendAfi/View/Helper/TagDilicomWidget.php b/library/ZendAfi/View/Helper/TagDilicomWidget.php
index 0ea70e2326b..a3bd45718a5 100644
--- a/library/ZendAfi/View/Helper/TagDilicomWidget.php
+++ b/library/ZendAfi/View/Helper/TagDilicomWidget.php
@@ -28,8 +28,6 @@ class ZendAfi_View_Helper_TagDilicomWidget extends Zend_View_Helper_HtmlElement
     $this->_album = $album;
     (new Class_WebService_BibNumerique_Dilicom_Hub())->updateStatus($album);
 
-    $infos = $this->view->tag('p', $this->getInfos());
-
     $iframe = $this->view->tag('iframe',
                                null,
                                ['src' => $this->_album->getExternalURI(),
@@ -40,8 +38,7 @@ class ZendAfi_View_Helper_TagDilicomWidget extends Zend_View_Helper_HtmlElement
 
     $this->_user = Class_Users::getIdentity();
     if (!$this->_user || $this->_user->hasRightAccessDilicom())
-      $links = $infos
-        . $this->getConsultBookAnchor()
+      $links = $this->getConsultBookAnchor()
         . $this->getLoanBookAnchor();
 
     return $links . $iframe;
@@ -66,17 +63,6 @@ class ZendAfi_View_Helper_TagDilicomWidget extends Zend_View_Helper_HtmlElement
   }
 
 
-  protected function getInfos() {
-    $item = Class_Album_Item::findFirstBy(['album_id' => $this->_album->getId()]);
-
-    return sprintf('Nombre d\'emprunts total: %d / %d, Nombre d\'emprunts en cours: %d / %d',
-                   $item->getQuantity(),
-                   $this->_album->getUsageConstraints()->getLoanQuantity(),
-                   $item->getLoanCount(),
-                   $this->_album->getUsageConstraints()->getLoanAllowedNumberOfUsers());
-  }
-
-
   protected function getDilicomAnchor($url, $label, $attribs = []) {
     return $this->view->tag('div',
                             $this->view->tagAnchor($url,
diff --git a/public/opac/css/global.css b/public/opac/css/global.css
index 06fbdd99c74..3754d66f2e0 100644
--- a/public/opac/css/global.css
+++ b/public/opac/css/global.css
@@ -3160,6 +3160,12 @@ a.loan-export {
 
 #opac-dialog div.popup-content {
     padding: 5px;
+    max-width: 500px;
+    text-align: center;
+}
+
+#opac-dialog div.popup-content p {
+    text-align: justify;
 }
 
 #opac-dialog div.popup-content,
-- 
GitLab