diff --git a/lib/classes/module/report/nav.class.php b/lib/classes/module/report/nav.class.php index 358446cecb..afcd27c8d5 100644 --- a/lib/classes/module/report/nav.class.php +++ b/lib/classes/module/report/nav.class.php @@ -573,11 +573,11 @@ class module_report_nav extends module_report */ public function buildTabUserWhat($bid, $rid, $tab = false) { + $this->initialize(); $sbas_id = phrasea::sbasFromBas($bid); $record = new record_adapter($sbas_id, $rid); $this->setDisplay($tab); - $this->initialize(); $this->champ = array( 'photo', 'record_id', @@ -593,7 +593,7 @@ class module_report_nav extends module_report $x = $record->get_thumbnail(); - $this->result = array( + $this->result[] = array( 'photo' => "" @@ -603,10 +603,10 @@ class module_report_nav extends module_report , 'titre' => $record->get_title() , 'taille' => $document->get_size() ); - + $this->setDisplayNav(); $this->setReport(); - + return $this->report; } diff --git a/lib/classes/record/adapter.class.php b/lib/classes/record/adapter.class.php index bd039fbc82..881bf3e520 100644 --- a/lib/classes/record/adapter.class.php +++ b/lib/classes/record/adapter.class.php @@ -1179,7 +1179,9 @@ class record_adapter implements record_Interface, cache_cacheableInterface foreach ($mandatoryParams as $param) { if (!array_key_exists($param, $params)) - throw new Exception_InvalidArgument(); + { + throw new Exception_InvalidArgument(sprintf('Invalid metadata, missing key %s', $param)); + } } if (!is_array($params['value'])) diff --git a/lib/classes/record/preview.class.php b/lib/classes/record/preview.class.php index 6d95132d3f..a5179b4449 100644 --- a/lib/classes/record/preview.class.php +++ b/lib/classes/record/preview.class.php @@ -274,40 +274,39 @@ class record_preview extends record_adapter { if ($this->title) return $this->title; + $this->title = collection::getLogo($this->get_base_id()) . ' '; + switch ($this->env) { case "RESULT": $this->title .= sprintf( _('preview:: resultat numero %s '), '' . ($this->number + 1) - . '' + . ' : ' ); - $title = parent::get_title(); - if ($search_engine instanceof searchEngine_adapter) - { - $this->title .= array_pop($search_engine->build_excerpt($highlight, array($title), $this)); - } - else - { - $this->title .= $title; - } + $this->title .= parent::get_title($highlight, $search_engine); break; case "BASK": - $this->title .= $this->name . ' - ' . parent::get_title() + $this->title .= $this->name . ' - ' . parent::get_title($highlight, $search_engine) . ' (' . $this->get_number() . '/' . $this->total . ') '; break; case "REG": + $title = parent::get_title(); if ($this->get_number() == 0) - $this->title .= _('preview:: regroupement '); + { + $this->title .= $title; + } else + { $this->title .= sprintf( - _('preview:: Previsualisation numero %s '), $this->get_number() . '/' . $this->total + _('%s %d/%d '), $title, $this->get_number() . '/' . $this->total ); + } break; default: - $this->title .= parent::get_title(); + $this->title .= parent::get_title($highlight, $search_engine); break; } diff --git a/templates/web/prod/preview/caption.html b/templates/web/prod/preview/caption.html index 7a037b4f81..011271a70e 100644 --- a/templates/web/prod/preview/caption.html +++ b/templates/web/prod/preview/caption.html @@ -9,6 +9,10 @@
{{record.get_status_icons()|raw}}
- {{caption.format_caption(record, highlight, searchEngine)}} + {% if record.is_from_reg() %} + {{caption.format_caption(record)}} + {% else %} + {{caption.format_caption(record, highlight, searchEngine)}} + {% endif %}
{% include 'common/technical_datas.twig' %} \ No newline at end of file diff --git a/templates/web/report/generate_tab.twig b/templates/web/report/generate_tab.twig index 34fa44fbea..668b5c337f 100644 --- a/templates/web/report/generate_tab.twig +++ b/templates/web/report/generate_tab.twig @@ -74,18 +74,18 @@ {% endif %} {% for class, config in result.display %} - {% for key , result in value %} + {% for key , res in value %} {% if key == class %} - {% if config.bound == 1 and "" not in result %} + {% if config.bound == 1 and "" not in res %} {% if key == "user" and value.user == "TOTAL"%} - {{ result|raw }} + {{ res|raw }} {% elseif is_nav or is_doc %} - {{ result|raw }} + {{ res|raw }} {% else %} - {{ result|raw }} + {{ res|raw }} {% endif %} {% else %} - {{ result|raw }} + {{ res|raw }} {% endif %} {% endif %} {% endfor %} diff --git a/www/prod/jquery.edit.js b/www/prod/jquery.edit.js index 06a2dc285a..f2e65679dd 100644 --- a/www/prod/jquery.edit.js +++ b/www/prod/jquery.edit.js @@ -1840,6 +1840,7 @@ function preset_load(preset_id) { p4.edit.T_records[r].fields[""+i] = { value:[], + "meta_struct_id":p4.edit.T_fields[i].meta_struct_id, dirty:true };// = { var n = 0; @@ -1853,6 +1854,7 @@ function preset_load(preset_id) { p4.edit.T_records[r].fields[""+i] = { "value":p4.edit.T_fields[i].preset[0], + "meta_struct_id":p4.edit.T_fields[i].meta_struct_id, "dirty":true }; } @@ -1875,7 +1877,6 @@ function preset_load(preset_id) - function hsplit1() { var el = $('#EDIT_TOP');