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(),
"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_logo" => $record->getCollection()->getLogo($record->getBaseId(), $this->app),
]);

View File

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

View File

@@ -180,7 +180,7 @@ function openPreview(event, env, pos, contId, reload) {
$('#SPANTITLE').empty().append(data.title);
$("#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();

View File

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