{if !empty($app_themes)} {$_used_app_themes = []}
{foreach $routes as $r} {$r.theme = $r.theme|default:'default'} {$r.theme_mobile = $r.theme_mobile|default:'default'} {* because rtrim removes repetitions *} {if $r.url && $r.url|substr:-1 == "*"} {$r.url = $r.url|substr:0:-1} {/if} {if isset($app_themes[$r.theme])} {$_theme = $app_themes[$r.theme]} {$_name = $_theme->getName()} {$_cover_image = $_theme->getCover()} {if empty($_cover_image)} {$_cover_image = "`$wa_url`wa-content/img/design/themes/no-image.png"} {/if} {$_theme_id = $_theme->id} {$_used_app_themes[] = $_theme_id} {$_theme_url = "#/design/theme={$r.theme}&domain={$r._domain}&route={$r._id}&action=settings"} {/if} {if isset($app_themes[$r.theme_mobile]) && $r.theme != $r.theme_mobile} {$_theme = $app_themes[$r.theme_mobile]} {$_name = $_theme->getName()} {$_cover_image = $_theme->getCover()} {if empty($_cover_image)} {$_cover_image = "`$wa_url`wa-content/img/design/themes/no-image.png"} {/if} {$_theme_id = $_theme->id} {$_used_app_themes[] = $_theme_id} {$_theme_url = "#/design/theme={$r.theme}&domain={$r._domain}&route={$r._id}&action=settings"} {/if} {/foreach} {foreach $app_themes as $_theme} {$_theme_id = $_theme->id} {if in_array($_theme_id, $_used_app_themes)}{continue}{/if} {$_theme_is_trial = ($_theme.type == waTheme::TRIAL)} {$_name = $_theme->getName()} {$_cover_image = $_theme->getCover()} {if empty($_cover_image)} {$_cover_image = "`$wa_url`wa-content/img/design/themes/no-image.png"} {/if} {$_theme_url = "`$design_url`theme=`$_theme_id`"}
{$_name|escape}
{if isset($used_apps_themes[$_theme_id])} [`Used by other apps.`] {else} [`Not in use`] {/if}
{/foreach}
{if $wa->user()->getRights('installer')}

[s`Upload theme`]

[s`Theme must be uploaded as a valid Webasyst design theme archive (.tar.gz archive with theme files and theme.xml manifest file).`]

{$wa->csrf()}
{/if} {elseif isset($app_themes)}
[`No installed themes.`]
{/if}