diff --git a/libraries/classes/CentralColumns.php b/libraries/classes/CentralColumns.php index 22a25ee4f6..6bc24764c3 100644 --- a/libraries/classes/CentralColumns.php +++ b/libraries/classes/CentralColumns.php @@ -733,36 +733,11 @@ class CentralColumns string $title = '', int $actionCount = 0 ): string { - $action = ''; - if ($actionCount > 0) { - $action .= '' - . __('Action') . ''; - } - $tableheader = ''; - $tableheader .= '' - . '' - . '' - . $action - . '' - . __('Name') . '
' - . '' - . __('Type') . '
' - . '' - . __('Length/Values') . '
' - . '' - . __('Default') . '
' - . '' . __('Collation') . '
' - . '' - . __('Attribute') . '
' - . '' - . __('Null') . '
' - . '' - . __('A_I') . '
' - . ''; - $tableheader .= ''; - return $tableheader; + return Template::get('database/central_columns/table_header')->render(array( + "class" => $class, + "title" => $title, + "actionCount" => $actionCount, + )); } /** diff --git a/templates/database/central_columns/table_header.twig b/templates/database/central_columns/table_header.twig new file mode 100644 index 0000000000..f393d7229a --- /dev/null +++ b/templates/database/central_columns/table_header.twig @@ -0,0 +1,41 @@ + + + + + {% if actionCount > 0 %} + {% trans 'Action' %} + {% endif %} + + {% trans 'Name' %} +
+ + + {% trans 'Type' %} +
+ + + {% trans 'Lenght/Value' %} +
+ + + {% trans 'Default' %} +
+ + + {% trans 'Collation' %} +
+ + + {% trans 'Attribute' %} +
+ + + {% trans 'Null' %} +
+ + + {% trans 'A_I' %} +
+ + +