diff --git a/Phraseanet-production-client/dist/production.js b/Phraseanet-production-client/dist/production.js
index 1a5ad15b32..d18157d6ca 100644
--- a/Phraseanet-production-client/dist/production.js
+++ b/Phraseanet-production-client/dist/production.js
@@ -65498,7 +65498,18 @@ var previewRecordService = function previewRecordService(services) {
(0, _jquery2.default)('#PREVIEWBOX img.record.zoomable').draggable();
}
- (0, _jquery2.default)('#SPANTITLE').empty().append(data.title);
+ var basketIcon = '';
+ if (data.containerType !== null) {
+ if (data.containerType === 'feedback') {
+ basketIcon = "
";
+ } else if (data.containerType === 'push') {
+ basketIcon = "
";
+ } else {
+ basketIcon = "
";
+ }
+ }
+
+ (0, _jquery2.default)('#SPANTITLE').empty().append(basketIcon + data.title);
(0, _jquery2.default)('#PREVIEWTITLE_COLLLOGO').empty().append(data.collection_logo);
(0, _jquery2.default)('#PREVIEWTITLE_COLLNAME').empty().append(data.databox_name + ' / ' + data.collection_name);
diff --git a/Phraseanet-production-client/dist/production.min.js b/Phraseanet-production-client/dist/production.min.js
index 1a5ad15b32..d18157d6ca 100644
--- a/Phraseanet-production-client/dist/production.min.js
+++ b/Phraseanet-production-client/dist/production.min.js
@@ -65498,7 +65498,18 @@ var previewRecordService = function previewRecordService(services) {
(0, _jquery2.default)('#PREVIEWBOX img.record.zoomable').draggable();
}
- (0, _jquery2.default)('#SPANTITLE').empty().append(data.title);
+ var basketIcon = '';
+ if (data.containerType !== null) {
+ if (data.containerType === 'feedback') {
+ basketIcon = "
";
+ } else if (data.containerType === 'push') {
+ basketIcon = "
";
+ } else {
+ basketIcon = "
";
+ }
+ }
+
+ (0, _jquery2.default)('#SPANTITLE').empty().append(basketIcon + data.title);
(0, _jquery2.default)('#PREVIEWTITLE_COLLLOGO').empty().append(data.collection_logo);
(0, _jquery2.default)('#PREVIEWTITLE_COLLNAME').empty().append(data.databox_name + ' / ' + data.collection_name);
diff --git a/Phraseanet-production-client/src/components/record/recordPreview/index.js b/Phraseanet-production-client/src/components/record/recordPreview/index.js
index 1319781c14..38b0089fb8 100644
--- a/Phraseanet-production-client/src/components/record/recordPreview/index.js
+++ b/Phraseanet-production-client/src/components/record/recordPreview/index.js
@@ -381,7 +381,18 @@ const previewRecordService = services => {
$('#PREVIEWBOX img.record.zoomable').draggable();
}
- $('#SPANTITLE').empty().append(data.title);
+ let basketIcon = '';
+ if (data.containerType !== null ) {
+ if (data.containerType === 'feedback') {
+ basketIcon = "
";
+ } else if (data.containerType === 'push') {
+ basketIcon = "
";
+ } else {
+ basketIcon = "
";
+ }
+ }
+
+ $('#SPANTITLE').empty().append(basketIcon + data.title);
$('#PREVIEWTITLE_COLLLOGO')
.empty()
.append(data.collection_logo);
diff --git a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php
index 1c1e6ee250..55f18cc959 100644
--- a/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php
+++ b/lib/Alchemy/Phrasea/Controller/Prod/RecordController.php
@@ -103,6 +103,18 @@ class RecordController extends Controller
$recordTitle = htmlspecialchars($record->get_title());
}
+ $containerType = null;
+
+ if ($env === 'BASK') {
+ if ($record->get_container()->getValidation()) {
+ $containerType = 'feedback';
+ } elseif ($record->get_container()->getPusher()) {
+ $containerType = 'push';
+ } else {
+ $containerType = 'basket';
+ }
+ }
+
return $this->app->json([
"desc" => $this->render('prod/preview/caption.html.twig', [
'record' => $record,
@@ -131,6 +143,7 @@ class RecordController extends Controller
]),
"pos" => $record->getNumber(),
"title" => $recordTitle,
+ "containerType" => $containerType,
"databox_name" => $record->getDatabox()->get_dbname(),
"collection_name" => $record->getCollection()->get_name(),
"collection_logo" => $record->getCollection()->getLogo($record->getBaseId(), $this->app),
diff --git a/lib/classes/record/preview.php b/lib/classes/record/preview.php
index dd0ae0fe43..63666f5d7b 100644
--- a/lib/classes/record/preview.php
+++ b/lib/classes/record/preview.php
@@ -270,8 +270,7 @@ class record_preview extends record_adapter
$this->title .= parent::get_title($options);
break;
case "BASK":
- $this->title .= $this->name . ' - ' . parent::get_title($options)
- . ' (' . $this->getNumber() . '/' . $this->total . ') ';
+ $this->title .= $this->name . ' (' . $this->getNumber() . '/' . $this->total . ') - ' . parent::get_title($options);
break;
case "REG":
$title = parent::get_title($options);