issue #1467 avoid error when Piwigo version is not available on PEM

* do not display an error message "cannot connect to server" but simply "no plugin available"
* if we are on a beta/RC version, display a button to switch to test plugins compatible with Piwigo previous version
* add a tooltip with more details about the "show beta test plugins"
This commit is contained in:
plegall
2022-03-23 12:03:09 +01:00
parent 68e5901d72
commit 1e64d745a2
3 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -447,7 +447,7 @@ DELETE FROM '. PLUGINS_TABLE .'
$versions_to_check = $this->get_versions_to_check($beta_test);
if (empty($versions_to_check))
{
return false;
return true;
}
// Plugins to check
+5
View File
@@ -181,5 +181,10 @@ else
$page['errors'][] = l10n('Can\'t connect to server.');
}
if (!$beta_test and preg_match('/(beta|RC)/', PHPWG_VERSION))
{
$template->assign('BETA_URL', $base_url.'&beta-test=true');
}
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugins');
?>
@@ -32,7 +32,7 @@ const str_from_begining = "{"since the beginning"|@translate}";
<div class="titrePage">
<div class="sort">
<div class="sort-actions">
<div class="beta-test-plugin-switch">
<div class="beta-test-plugin-switch tiptip" title="{'Show plugins compatible with previous version of Piwigo'|translate|escape:html}">
<label class="switch">
<input type="checkbox" id="showBetaTestPlugin" {if $BETA_TEST}checked{/if}>
<span class="slider round"></span>
@@ -208,5 +208,9 @@ const str_from_begining = "{"since the beginning"|@translate}";
{/foreach}
</div>
{else}
<p>{'There is no other plugin available.'|@translate}</p>
<p>{'There is no other plugin available.'|@translate}
{if isset($BETA_URL)}
<a href="{$BETA_URL}" class="buttonLike icon-fire">{'Show beta test plugins'|@translate}</a>
{/if}
</p>
{/if}