diff --git a/libraries/classes/CentralColumns.php b/libraries/classes/CentralColumns.php
index 6e0dc4b0f6..b18a86579a 100644
--- a/libraries/classes/CentralColumns.php
+++ b/libraries/classes/CentralColumns.php
@@ -875,39 +875,24 @@ class CentralColumns
*
* @return string html to add a column in the central list
*/
- public function getHtmlForAddColumn(
- $total_rows,
- $pos,
- $db
- ) {
- $columnAdd = '
'
- . ''
- . ' '
- . ''
- . Util::getIcon(
- 'centralColumns_add',
- __('Add column')
- )
- . ''
- . ' '
- . ' '
- . ' '
- . '
';
-
- return $columnAdd;
- }
+ public function getHtmlForAddColumn(
+ $total_rows,
+ $pos,
+ $db
+ ) {
+ $icon = Util::getIcon(
+ 'centralColumns_add',
+ __('Add column')
+ );
+ $table_drop_down = $this->getHtmlForTableDropdown($db);
+ return Template::get('database/central_columns/add_column')->render(array(
+ 'icon' => $icon,
+ 'pos' => $pos,
+ 'db' => $db,
+ 'total_rows' => $total_rows,
+ 'table_drop_down' => $table_drop_down,
+ ));
+ }
/**
* build html for a row in central columns table
diff --git a/templates/database/central_columns/add_column.twig b/templates/database/central_columns/add_column.twig
new file mode 100644
index 0000000000..bd79f14bb7
--- /dev/null
+++ b/templates/database/central_columns/add_column.twig
@@ -0,0 +1,19 @@
+
+
+
+
+ {{ icon|raw }}
+
+
+
+
+
diff --git a/test/classes/CentralColumnsTest.php b/test/classes/CentralColumnsTest.php
index b0bb957ad1..ad65ec6c81 100644
--- a/test/classes/CentralColumnsTest.php
+++ b/test/classes/CentralColumnsTest.php
@@ -730,10 +730,19 @@ class CentralColumnsTest extends TestCase
$result
);
$this->assertContains(
- Url::getHiddenInputs('phpmyadmin')
- . ' '
- . ' '
- . ' ',
+ Url::getHiddenInputs('phpmyadmin'),
+ $result
+ );
+ $this->assertContains(
+ ' ',
+ $result
+ );
+ $this->assertContains(
+ ' ',
+ $result
+ );
+ $this->assertContains(
+ ' ',
$result
);
}