From c3b32f7ce9df2388decfe642e651c85efb87d562 Mon Sep 17 00:00:00 2001 From: Etienne Trimaille Date: Wed, 25 Sep 2024 14:59:07 +0200 Subject: [PATCH] Use a badge for Lizmap server update instead of adding a new column --- .../admin/controllers/server_information.classic.php | 5 +---- .../admin/locales/en_US/admin.UTF-8.properties | 3 +-- lizmap/modules/admin/templates/server_information.tpl | 11 ++--------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/lizmap/modules/admin/controllers/server_information.classic.php b/lizmap/modules/admin/controllers/server_information.classic.php index 50385dfae2..e1f4297142 100644 --- a/lizmap/modules/admin/controllers/server_information.classic.php +++ b/lizmap/modules/admin/controllers/server_information.classic.php @@ -59,16 +59,14 @@ public function index() jLog::log($updateQgisServer, 'lizmapadmin'); } - $displayPluginActionColumn = false; $lizmapQgisServerNeedsUpdate = $server->pluginServerNeedsUpdate( $currentLizmapVersion, $lizmapPluginMinimumVersionRequired ); - $updateLizmapPlugin = jLocale::get('admin.server.information.plugin.update', array('lizmap_server')); + $updateLizmapPlugin = jLocale::get('admin.server.information.plugin.update'); if (!is_null($currentQgisVersion) && $lizmapQgisServerNeedsUpdate) { // lizmap_server is required to use LWC jLog::log($updateLizmapPlugin, 'lizmapadmin'); - $displayPluginActionColumn = true; } // Set the HTML content @@ -78,7 +76,6 @@ public function index() 'baseUrlApplication' => \jServer::getServerURI().\jApp::urlBasePath(), 'qgisServerNeedsUpdate' => $qgisServerNeedsUpdate, 'updateQgisServer' => $updateQgisServer, - 'displayPluginActionColumn' => $displayPluginActionColumn, 'lizmapQgisServerNeedsUpdate' => $lizmapQgisServerNeedsUpdate, 'lizmapPluginUpdate' => $updateLizmapPlugin, 'minimumQgisVersion' => $qgisMinimumVersionRequired, diff --git a/lizmap/modules/admin/locales/en_US/admin.UTF-8.properties b/lizmap/modules/admin/locales/en_US/admin.UTF-8.properties index c6006d5e71..2ed964e142 100644 --- a/lizmap/modules/admin/locales/en_US/admin.UTF-8.properties +++ b/lizmap/modules/admin/locales/en_US/admin.UTF-8.properties @@ -275,7 +275,6 @@ server.information.qgis.plugins=Plugins server.information.qgis.plugins.version=Version number server.information.qgis.plugin=Plugin server.information.qgis.plugin.version=Version -server.information.qgis.plugin.action=Action server.information.qgis.test.ok=QGIS Server is correctly installed and returns the expected response for OGC requests. server.information.qgis.test.error=QGIS Server is not correctly installed in your server or the URL for OGC requests given in Lizmap configuration is not correct. @@ -292,7 +291,7 @@ You might need to increase debug level. server.information.qgis.error.fetching.information.detail.NO_ACCESS=You don't have access to information about QGIS Server server.information.qgis.error.fetching.information.detail.HTTP_ERROR=QGIS Server returns an HTTP error about the Lizmap plugin: server.information.qgis.update=QGIS Server needs to be updated at least to version %s for this version of Lizmap Web Client. -server.information.plugin.update=The %s plugin needs to be updated. +server.information.plugin.update=The plugin must be updated. server.information.qgis.unknown=QGIS server minimum %s and Lizmap QGIS server plugin minimum %s need to be installed and configured correctly. \ Your QGIS server couldn't be reached correctly with the given URL "%s". diff --git a/lizmap/modules/admin/templates/server_information.tpl b/lizmap/modules/admin/templates/server_information.tpl index ded48e201c..bba80c1191 100644 --- a/lizmap/modules/admin/templates/server_information.tpl +++ b/lizmap/modules/admin/templates/server_information.tpl @@ -141,9 +141,6 @@ {@admin.server.information.qgis.plugin@} {@admin.server.information.qgis.plugin.version@} - {if $displayPluginActionColumn } - {@admin.server.information.qgis.plugin.action@} - {/if} {foreach $data['qgis_server_info']['plugins'] as $name=>$version} @@ -164,14 +161,10 @@ {else} {$version['version']} {/if} - - {if $displayPluginActionColumn } {if $name == 'lizmap_server' && $lizmapQgisServerNeedsUpdate} - {$lizmapPluginUpdate} - {else} - + {$lizmapPluginUpdate} {/if} - {/if} + {/foreach}