related to #1530 Status verification for themes pages

This commit is contained in:
Matthieu Leproux 2021-10-22 16:14:03 +02:00
parent 77f4535932
commit 6840eb4c24
2 changed files with 10 additions and 1 deletions

View file

@ -106,7 +106,7 @@ $(window).bind("load", function() {
<div class="themeShot"><a href="{$theme.SCREENSHOT}" class="preview-box" title="{$theme.NAME}"><img src="{$theme.SCREENSHOT}" alt=""></a></div>
<div class="themeName" title="{$theme.NAME}">
{$theme.NAME} {if isset($theme.IS_DEFAULT) and $theme.IS_DEFAULT}<i class="icon-star" title="{'default'|@translate}"></i>{/if} {if $theme.IS_MOBILE}<i class="icon-mobile" title="{'Mobile'|translate}"></i>{/if}
<a class="icon-ellipsis-v showInfo"></a>
{if isWebmaster == 1} <a class="icon-ellipsis-v showInfo"></a>{/if}
</div>
<div class="showInfo-dropdown dropdown">
<div class="showInfo-dropdown-header">
@ -129,6 +129,7 @@ $(window).bind("load", function() {
<a href="{$deactivate_baseurl}{$theme.ID}" class="showInfo-dropdown-action tiptip icon-cancel-circled" title="{'Forbid this theme to users'|@translate}">{'Deactivate'|@translate}</a>
{/if}
</div>
{if isWebmaster == 1}
<div class="themeActions">
{if $theme.STATE == 'active'}
{if $theme.ADMIN_URI}
@ -149,6 +150,7 @@ $(window).bind("load", function() {
{/if}
{/if}
</div> <!-- themeActions -->
{/if}
</div>
{/foreach}

View file

@ -11,6 +11,11 @@ if( !defined("PHPWG_ROOT_PATH") )
die ("Hacking attempt!");
}
if (!is_webmaster())
{
$page['warnings'][] = l10n('Webmaster status is required.');
}
include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
$base_url = get_root_url().'admin.php?page='.$page['page'];
@ -163,6 +168,8 @@ $template->assign(
trigger_notify('loc_end_themes_installed');
$template->assign('isWebmaster', (is_webmaster()) ? 1 : 0);
$template->set_filenames(array('themes' => 'themes_installed.tpl'));
$template->assign_var_from_handle('ADMIN_CONTENT', 'themes');
?>