diff --git a/libraries/classes/Controllers/Table/TableRelationController.php b/libraries/classes/Controllers/Table/TableRelationController.php index 08c661b728..eff01cba6e 100644 --- a/libraries/classes/Controllers/Table/TableRelationController.php +++ b/libraries/classes/Controllers/Table/TableRelationController.php @@ -163,21 +163,6 @@ class TableRelationController extends TableController ); } - // display secondary level tabs if necessary - $engine = $this->dbi->getTable($this->db, $this->table)->getStorageEngine(); - - $this->response->addHTML( - $this->template->render('table/secondary_tabs', [ - 'url_params' => [ - 'db' => $GLOBALS['db'], - 'table' => $GLOBALS['table'], - ], - 'is_foreign_key_supported' => Util::isForeignKeySupported($engine), - 'cfg_relation' => $this->relation->getRelationsParam(), - ]) - ); - $this->response->addHTML('
'); - /** * Dialog */ @@ -202,8 +187,15 @@ class TableRelationController extends TableController } // common form + $engine = $this->dbi->getTable($this->db, $this->table)->getStorageEngine(); $this->response->addHTML( $this->template->render('table/relation/common_form', [ + 'url_params' => [ + 'db' => $GLOBALS['db'], + 'table' => $GLOBALS['table'], + ], + 'is_foreign_key_supported' => Util::isForeignKeySupported($engine), + 'cfg_relation' => $this->relation->getRelationsParam(), 'db' => $this->db, 'table' => $this->table, 'cfg_relation' => $this->cfgRelation, diff --git a/libraries/classes/Controllers/Table/TableStructureController.php b/libraries/classes/Controllers/Table/TableStructureController.php index 943ac5e37e..2b32e2b29f 100644 --- a/libraries/classes/Controllers/Table/TableStructureController.php +++ b/libraries/classes/Controllers/Table/TableStructureController.php @@ -288,20 +288,6 @@ class TableStructureController extends TableController } } - // display secondary level tabs if necessary - $engine = $this->table_obj->getStorageEngine(); - $this->response->addHTML( - $this->template->render('table/secondary_tabs', [ - 'url_params' => [ - 'db' => $this->db, - 'table' => $this->table, - ], - 'is_foreign_key_supported' => Util::isForeignKeySupported($engine), - 'cfg_relation' => $this->relation->getRelationsParam(), - ]) - ); - $this->response->addHTML('
'); - /** * Modifications have been submitted -> updates the table */ @@ -1368,7 +1354,14 @@ class TableStructureController extends TableController } } + $engine = $this->table_obj->getStorageEngine(); return $this->template->render('table/structure/display_structure', [ + 'url_params' => [ + 'db' => $this->db, + 'table' => $this->table, + ], + 'is_foreign_key_supported' => Util::isForeignKeySupported($engine), + 'cfg_relation' => $this->relation->getRelationsParam(), 'hide_structure_actions' => $hideStructureActions, 'db' => $this->db, 'table' => $this->table, diff --git a/templates/table/secondary_tabs.twig b/templates/table/page_with_secondary_tabs.twig similarity index 88% rename from templates/table/secondary_tabs.twig rename to templates/table/page_with_secondary_tabs.twig index a38b039e5d..34373f896f 100644 --- a/templates/table/secondary_tabs.twig +++ b/templates/table/page_with_secondary_tabs.twig @@ -15,3 +15,7 @@
{% endif %} + +
+ {% block content %} + {% endblock %} diff --git a/templates/table/relation/common_form.twig b/templates/table/relation/common_form.twig index 39f1ede26f..65eb7f3d1e 100644 --- a/templates/table/relation/common_form.twig +++ b/templates/table/relation/common_form.twig @@ -1,3 +1,6 @@ +{% extends 'table/page_with_secondary_tabs.twig' %} + +{% block content %}
{{ Url_getHiddenInputs(db, table) }} {# InnoDB #} @@ -189,3 +192,4 @@
+{% endblock %} diff --git a/templates/table/structure/display_structure.twig b/templates/table/structure/display_structure.twig index 1e5aea5caa..f28ccbf7fc 100644 --- a/templates/table/structure/display_structure.twig +++ b/templates/table/structure/display_structure.twig @@ -1,3 +1,5 @@ +{% extends 'table/page_with_secondary_tabs.twig' %} +{% block content %}
{{ Url_getHiddenInputs(db, table) }} @@ -501,3 +503,4 @@ {{ table_stats|raw }} {% endif %}
+{% endblock %} diff --git a/templates/table/structure/display_table_stats.twig b/templates/table/structure/display_table_stats.twig index 2fd7e29e48..ace313cd6d 100644 --- a/templates/table/structure/display_table_stats.twig +++ b/templates/table/structure/display_table_stats.twig @@ -1,3 +1,5 @@ +{% extends 'table/page_with_secondary_tabs.twig' %} +{% block content %}
{% trans 'Information' %} @@ -166,3 +168,4 @@
+{% endblock %}