diff --git a/lib/Alchemy/Phrasea/Controller/Prod/SubdefsController.php b/lib/Alchemy/Phrasea/Controller/Prod/SubdefsController.php index eb5741d492..31658384d9 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/SubdefsController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/SubdefsController.php @@ -48,6 +48,7 @@ class SubdefsController extends Controller return $this->render('prod/actions/Tools/metadata.html.twig', [ 'record' => $record, 'metadatas' => $metadataBag, + 'subdef_name' => $subdef_name ]); } diff --git a/lib/Alchemy/Phrasea/Controller/Prod/ToolsController.php b/lib/Alchemy/Phrasea/Controller/Prod/ToolsController.php index 20291ec2c3..3b88e81237 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/ToolsController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/ToolsController.php @@ -47,6 +47,8 @@ class ToolsController extends Controller $record = $records->first(); $databox = $record->getDatabox(); + /**Array list of subdefs**/ + $listsubdef = array_keys($record-> get_subdefs()); // fetch subdef list: $subdefs = $record->get_subdefs(); @@ -57,7 +59,6 @@ class ToolsController extends Controller && $acl->has_right_on_base($record->getBaseId(), \ACL::IMGTOOLS) ) { $databoxSubdefs = $record->getDatabox()->get_subdef_structure()->getSubdefGroup($record->getType()); - foreach ($subdefs as $subdef) { $label = $subdefName = $subdef->get_name(); if (null === $permalink = $subdef->get_permalink()) { @@ -94,6 +95,7 @@ class ToolsController extends Controller 'record' => $record, 'recordSubdefs' => $recordAccessibleSubdefs, 'metadatas' => $metadatas, + 'listsubdef' => $listsubdef ]); } diff --git a/templates/web/prod/actions/Tools/index.html.twig b/templates/web/prod/actions/Tools/index.html.twig index 3d4cb6029c..8a043a16a6 100644 --- a/templates/web/prod/actions/Tools/index.html.twig +++ b/templates/web/prod/actions/Tools/index.html.twig @@ -194,6 +194,14 @@ {# exiftool section #} {% if metadatas %}
-