diff --git a/libraries/classes/Config/FormDisplayTemplate.php b/libraries/classes/Config/FormDisplayTemplate.php
index 5341b2144d..9ea26e92bc 100644
--- a/libraries/classes/Config/FormDisplayTemplate.php
+++ b/libraries/classes/Config/FormDisplayTemplate.php
@@ -91,23 +91,7 @@ class FormDisplayTemplate
*/
public function displayTabsTop(array $tabs): string
{
- $items = [];
- foreach ($tabs as $tabId => $tabName) {
- $items[] = [
- 'content' => htmlspecialchars($tabName),
- 'url' => [
- 'href' => '#' . $tabId,
- ],
- ];
- }
-
- $htmlOutput = $this->template->render('list/unordered', [
- 'class' => 'tabs responsivetable row',
- 'items' => $items,
- ]);
- $htmlOutput .= '
';
-
- return $htmlOutput;
+ return $this->template->render('config/form_display/tabs_top', ['tabs' => $tabs]);
}
/**
diff --git a/libraries/classes/Controllers/HomeController.php b/libraries/classes/Controllers/HomeController.php
index a0ab20eea7..5f9aed4965 100644
--- a/libraries/classes/Controllers/HomeController.php
+++ b/libraries/classes/Controllers/HomeController.php
@@ -109,23 +109,6 @@ class HomeController extends AbstractController
$checkUserPrivileges = new CheckUserPrivileges($this->dbi);
$checkUserPrivileges->getPrivileges();
- if (($cfg['Server']['auth_type'] !== 'config') && $cfg['ShowChgPassword']) {
- $changePassword = $this->template->render('list/item', [
- 'content' => Generator::getImage('s_passwd') . ' ' . __(
- 'Change password'
- ),
- 'id' => 'li_change_password',
- 'class' => 'list-group-item',
- 'url' => [
- 'href' => Url::getFromRoute('/user-password'),
- 'target' => null,
- 'id' => 'change_password_anchor',
- 'class' => 'ajax',
- ],
- 'mysql_help_page' => null,
- ]);
- }
-
$charsets = Charsets::getCharsets($this->dbi, $cfg['Server']['DisableIS']);
$collations = Charsets::getCollations($this->dbi, $cfg['Server']['DisableIS']);
$charsetsList = [];
@@ -146,21 +129,6 @@ class HomeController extends AbstractController
'collations' => $collationsList,
];
}
-
- $userPreferences = $this->template->render('list/item', [
- 'content' => Generator::getImage('b_tblops') . ' ' . __(
- 'More settings'
- ),
- 'id' => 'li_user_preferences',
- 'class' => 'list-group-item',
- 'url' => [
- 'href' => Url::getFromRoute('/preferences/manage'),
- 'target' => null,
- 'id' => null,
- 'class' => null,
- ],
- 'mysql_help_page' => null,
- ]);
}
}
@@ -217,20 +185,6 @@ class HomeController extends AbstractController
$webServer['php_version'] = PHP_VERSION;
}
}
- if ($cfg['ShowPhpInfo']) {
- $phpInfo = $this->template->render('list/item', [
- 'content' => __('Show PHP information'),
- 'id' => null,
- 'class' => 'list-group-item',
- 'url' => [
- 'href' => Url::getFromRoute('/phpinfo'),
- 'target' => '_blank',
- 'id' => null,
- 'class' => null,
- ],
- 'mysql_help_page' => null,
- ]);
- }
$relation = new Relation($this->dbi);
if ($server > 0) {
@@ -278,14 +232,13 @@ class HomeController extends AbstractController
'is_demo' => $cfg['DBG']['demo'],
'has_server_selection' => $hasServerSelection ?? false,
'server_selection' => $serverSelection ?? '',
- 'change_password' => $changePassword ?? '',
+ 'has_change_password_link' => $cfg['Server']['auth_type'] !== 'config' && $cfg['ShowChgPassword'],
'charsets' => $charsetsList ?? [],
'language_selector' => $languageSelector,
'theme_selection' => $themeSelection,
- 'user_preferences' => $userPreferences ?? '',
'database_server' => $databaseServer,
'web_server' => $webServer,
- 'php_info' => $phpInfo ?? '',
+ 'show_php_info' => $cfg['ShowPhpInfo'],
'is_version_checked' => $cfg['VersionCheck'],
'phpmyadmin_version' => PMA_VERSION,
'config_storage_message' => $configStorageMessage ?? '',
diff --git a/libraries/classes/Relation.php b/libraries/classes/Relation.php
index dae1c4d1c0..85d792cced 100644
--- a/libraries/classes/Relation.php
+++ b/libraries/classes/Relation.php
@@ -403,29 +403,7 @@ class Relation
$retval .= '' . "\n";
if (! $cfgRelation['allworks']) {
- $retval .= '
' . __('Quick steps to set up advanced features:')
- . '
';
-
- $items = [];
- $items[] = sprintf(
- __(
- 'Create the needed tables with the '
- . '
%screate_tables.sql.'
- ),
- htmlspecialchars(SQL_DIR)
- ) . ' ' . MySQLDocumentation::showDocumentation('setup', 'linked-tables');
- $items[] = __('Create a pma user and give access to these tables.') . ' '
- . MySQLDocumentation::showDocumentation('config', 'cfg_Servers_controluser');
- $items[] = __(
- 'Enable advanced features in configuration file '
- . '(
config.inc.php), for example by '
- . 'starting from
config.sample.inc.php.'
- ) . ' ' . MySQLDocumentation::showDocumentation('setup', 'quick-install');
- $items[] = __(
- 'Re-login to phpMyAdmin to load the updated configuration file.'
- );
-
- $retval .= $this->template->render('list/unordered', ['items' => $items]);
+ $retval .= $this->template->render('relation/diagnostic_info', ['sql_dir' => SQL_DIR]);
}
}
diff --git a/templates/config/form_display/tabs_top.twig b/templates/config/form_display/tabs_top.twig
new file mode 100644
index 0000000000..ec50f7939b
--- /dev/null
+++ b/templates/config/form_display/tabs_top.twig
@@ -0,0 +1,6 @@
+
+ {% for id, name in tabs %}
+ - {{ name }}
+ {% endfor %}
+
+
diff --git a/templates/home/index.twig b/templates/home/index.twig
index e958ab514c..867cdef6b4 100644
--- a/templates/home/index.twig
+++ b/templates/home/index.twig
@@ -40,7 +40,13 @@
{% endif %}
{% if server > 0 %}
- {{ change_password is not empty ? change_password|raw }}
+ {% if has_change_password_link %}
+
+
+ {{ get_icon('s_passwd', 'Change password'|trans, true) }}
+
+
+ {% endif %}
+
+
+
+ {{ get_icon('b_tblops', 'More settings'|trans, true) }}
+
+
{% endif %}
- {{ user_preferences is not empty ? user_preferences|raw }}
{% endif %}
@@ -136,7 +147,7 @@
{% endif %}
- {% if web_server is not empty or php_info is not empty %}
+ {% if web_server is not empty or show_php_info %}