Skip to content
Snippets Groups Projects
Commit f1cf6f97 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Merge branch 'dev#81468_afficher_la_zone_de_label_dans_inspector_gadget' into 'master'

dev #81468 : display label in inspector gadget

See merge request !2881
parents 781b2dc1 c03ea06a
Branches
Tags
6 merge requests!2890Master,!2889Master,!2888Master,!2887Master,!2886Master,!2881dev #81468 : display label in inspector gadget
Pipeline #5302 failed with stage
in 31 minutes and 20 seconds
- ticket #81468 : Inspecteur Gadget : Ajout de la zone de label dans l'inspecteur de notices
\ No newline at end of file
......@@ -835,6 +835,7 @@ class Class_NoticeUnimarc_Writer extends Class_NoticeUnimarc {
->visitHierarchyLevel($this->inner_guide['hl'])
->visitDataAdress($this->inner_guide['ba'])
->visitCatalogLevel($this->inner_guide['el'])
->visitGuide($this->guide)
;
foreach ($this->inner_data as $label => $contents) {
......
......@@ -23,8 +23,10 @@
class ZendAfi_View_Helper_Notice_Unimarc extends Zend_View_Helper_HtmlElement {
use Trait_Translator, Trait_Yaz;
protected $_headers;
protected $_zones;
protected
$_headers,
$_zones,
$_guide;
public function notice_Unimarc($notice) {
$this->_headers = $this->_zones = [];
......@@ -98,7 +100,7 @@ class ZendAfi_View_Helper_Notice_Unimarc extends Zend_View_Helper_HtmlElement {
protected function renderZones($notice) {
$html = '';
$html = $this->_renderGuide();
foreach ($this->_zones as $zone)
$html .= $zone->render();
......@@ -108,6 +110,17 @@ class ZendAfi_View_Helper_Notice_Unimarc extends Zend_View_Helper_HtmlElement {
}
protected function _renderGuide() {
return $this->_guide
? $this->_tag('tr',
$this->_tag('td', $this->_('label'))
. $this->_tag('td', '')
. $this->_tag('td', '')
. $this->_tag('td', $this->_guide))
: '';
}
protected function renderItems($notice) {
$mapping = ['getCote' => $this->_('Cote'),
'getSectionLabel' => $this->_('Section'),
......@@ -223,6 +236,12 @@ class ZendAfi_View_Helper_Notice_Unimarc extends Zend_View_Helper_HtmlElement {
}
public function visitGuide($value) {
$this->_guide = $value;
return $this;
}
protected function _tag() {
return call_user_func_array([$this->view, 'tag'], func_get_args());
}
......@@ -264,16 +283,16 @@ class ZendAfi_View_Helper_Notice_UnimarcZone {
public function renderField($name, $value, $first=false) {
return $this->view
->tag('tr',
$this->_tag('td', $first ? $this->_label : '')
. $this->_tag('td',
$first
? $this->_fields['indicateur1']
. $this->_fields['indicateur2']
: '')
. $this->_tag('td', $name)
. $this->_tag('td', $value)
return $this
->_tag('tr',
$this->_tag('td', $first ? $this->_label : '')
. $this->_tag('td',
$first
? $this->_fields['indicateur1']
. $this->_fields['indicateur2']
: '')
. $this->_tag('td', $name)
. $this->_tag('td', $value)
);
}
......@@ -282,5 +301,3 @@ class ZendAfi_View_Helper_Notice_UnimarcZone {
return call_user_func_array([$this->view, 'tag'], func_get_args());
}
}
?>
\ No newline at end of file
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