PHRAS-851 - add databox name, collection name and logo to record title in preview

This commit is contained in:
Florian BLOUET
2016-05-23 11:36:25 +02:00
parent f489043280
commit b7a3571d04
4 changed files with 8 additions and 4 deletions

View File

@@ -106,6 +106,7 @@ class RecordController extends Controller
]), ]),
"pos" => $record->getNumber(), "pos" => $record->getNumber(),
"title" => str_replace(array('[[em]]', '[[/em]]'), array('<em>', '</em>'), $record->get_title($query, $searchEngine)), "title" => str_replace(array('[[em]]', '[[/em]]'), array('<em>', '</em>'), $record->get_title($query, $searchEngine)),
"databox_name" => $record->getDatabox()->get_dbname(),
"collection_name" => $record->getCollection()->get_name(), "collection_name" => $record->getCollection()->get_name(),
"collection_logo" => $record->getCollection()->getLogo($record->getBaseId(), $this->app), "collection_logo" => $record->getCollection()->getLogo($record->getBaseId(), $this->app),
]); ]);

View File

@@ -258,7 +258,7 @@ class record_preview extends record_adapter
return $this->title; return $this->title;
} }
$this->title = collection::getLogo($this->getBaseId(), $this->app) . ' '; $this->title = '';
switch ($this->env) { switch ($this->env) {

View File

@@ -180,7 +180,7 @@ function openPreview(event, env, pos, contId, reload) {
$('#SPANTITLE').empty().append(data.title); $('#SPANTITLE').empty().append(data.title);
$("#PREVIEWTITLE_COLLLOGO").empty().append(data.collection_logo); $("#PREVIEWTITLE_COLLLOGO").empty().append(data.collection_logo);
$("#PREVIEWTITLE_COLLNAME").empty().append(data.collection_name); $("#PREVIEWTITLE_COLLNAME").empty().append(data.databox_name + ' / ' + data.collection_name);
setPreview(); setPreview();

View File

@@ -16,8 +16,11 @@
cursor: pointer; cursor: pointer;
} }
#PREVIEWBOX #PREVIEWTITLE_COLLNAME { #PREVIEWBOX #PREVIEWTITLE_COLLLOGO {
display:none; img {
width: 16px;
height: 16px;
}
} }
.PREVIEW_PIC,.PREVIEW_HD { .PREVIEW_PIC,.PREVIEW_HD {