mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
PHRAS-3338 detail view add icon in title bar
This commit is contained in:
13
Phraseanet-production-client/dist/production.js
vendored
13
Phraseanet-production-client/dist/production.js
vendored
@@ -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 = "<img src='/assets/common/images/icons/basket_validation.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
} else if (data.containerType === 'push') {
|
||||
basketIcon = "<img src='/assets/common/images/icons/basket_push.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
} else {
|
||||
basketIcon = "<img src='/assets/common/images/icons/basket.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
}
|
||||
}
|
||||
|
||||
(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);
|
||||
|
||||
|
@@ -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 = "<img src='/assets/common/images/icons/basket_validation.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
} else if (data.containerType === 'push') {
|
||||
basketIcon = "<img src='/assets/common/images/icons/basket_push.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
} else {
|
||||
basketIcon = "<img src='/assets/common/images/icons/basket.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
}
|
||||
}
|
||||
|
||||
(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);
|
||||
|
||||
|
@@ -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 = "<img src='/assets/common/images/icons/basket_validation.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
} else if (data.containerType === 'push') {
|
||||
basketIcon = "<img src='/assets/common/images/icons/basket_push.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
} else {
|
||||
basketIcon = "<img src='/assets/common/images/icons/basket.png' title='' width='24' class='btn-image' style='width:24px;height: 24px;'/>";
|
||||
}
|
||||
}
|
||||
|
||||
$('#SPANTITLE').empty().append(basketIcon + data.title);
|
||||
$('#PREVIEWTITLE_COLLLOGO')
|
||||
.empty()
|
||||
.append(data.collection_logo);
|
||||
|
@@ -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),
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user