related to #1530 status verification for maintenance : action page

This commit is contained in:
Matthieu Leproux
2021-10-20 18:11:11 +02:00
parent 24e923f971
commit 35490ab89a
2 changed files with 9 additions and 0 deletions

View File

@@ -254,6 +254,10 @@ $template->set_filenames(array('maintenance'=>'maintenance_actions.tpl'));
$pwg_token = get_pwg_token();
$url_format = get_root_url().'admin.php?page=maintenance&action=%s&pwg_token='.get_pwg_token();
if (!is_webmaster()) {
$page['warnings'][] = l10n('Webmaster status is required.');
}
$purge_urls[l10n('All')] = 'all';
foreach(ImageStdParams::get_defined_type_map() as $params)
{
@@ -346,6 +350,8 @@ else
);
}
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
// +-----------------------------------------------------------------------+
// | Define advanced features |
// +-----------------------------------------------------------------------+

View File

@@ -113,6 +113,8 @@ $(".delete-size-check").click( function () {
{combine_script id='ajax' load='footer' path='admin/themes/default/js/maintenance.js'}
{if $isWebmaster == 1}
<fieldset class="">
<legend><span class="icon-globe icon-blue"></span>Global Gallery Actions</legend>
<div style="display:flex;flex-wrap: wrap;">
@@ -191,6 +193,7 @@ $(".delete-size-check").click( function () {
<a class="icon-ok delete-sizes">{'Delete these sizes'|@translate}</a>
</fieldset>
{/if}
<style>
#label-delete-size-checkbox {
font-weight: bold;