mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +00:00
read video chapters from meta fields in video-editor
This commit is contained in:
@@ -40,10 +40,24 @@ class ToolsController extends Controller
|
||||
$metadatas = false;
|
||||
$record = null;
|
||||
$recordAccessibleSubdefs = array();
|
||||
$JSFields = [];
|
||||
|
||||
if (count($records) == 1) {
|
||||
/** @var \record_adapter $record */
|
||||
$record = $records->first();
|
||||
$databox = $record->getDatabox();
|
||||
|
||||
|
||||
foreach ($databox->get_meta_structure() as $meta) {
|
||||
/** @var \databox_field $meta */
|
||||
$fields[] = $meta;
|
||||
|
||||
/** @Ignore */
|
||||
$JSFields[$meta->get_id()] = [
|
||||
'name' => $meta->get_name(),
|
||||
'_value' => $record->getCaption([$meta->get_name()]),
|
||||
];
|
||||
}
|
||||
|
||||
// fetch subdef list:
|
||||
$subdefs = $record->get_subdefs();
|
||||
@@ -93,6 +107,7 @@ class ToolsController extends Controller
|
||||
'videoEditorConfig' => $conf->get(['video-editor']),
|
||||
'recordSubdefs' => $recordAccessibleSubdefs,
|
||||
'metadatas' => $metadatas,
|
||||
'JSonFields' => json_encode($JSFields),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@@ -365,6 +365,7 @@
|
||||
processing: '{{ "processing" | trans }}',
|
||||
thumbnailTitle: '{{ 'thumbnail validation' | trans }}'
|
||||
},
|
||||
T_fields: {{ JSonFields|raw }},
|
||||
videoEditorConfig: {% if videoEditorConfig is not null %}{{ videoEditorConfig|json_encode()|raw }}{% else %}{}{% endif %},
|
||||
records: [
|
||||
|
||||
|
Reference in New Issue
Block a user