{$max_count_themes = 5} {if !empty($app_themes)} {$count_app_themes = $app_themes|count}

[`Installed`]

{foreach $app_themes as $_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} {$_theme_url = "`$design_url`theme=`$_theme_id`&domain={$domain|urlencode}"} {if !empty($used_domain_themes[$_theme_id])} {$_theme_url = "`$_theme_url`&route=`$used_domain_themes[$_theme_id]`"} {/if}
{$_name|escape}
{if isset($used_app_themes[$_theme_id])} {if isset($used_domain_themes[$_theme_id])} [`Used`] {else} [`Used on other sites.`] {/if} {else} [`Not used`] {/if}
{/foreach}
{if $count_app_themes > $max_count_themes} {/if}
{* Dialogs *}

[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()}
{elseif isset($app_themes)}

[`Installed`]

[`No installed themes.`]
{/if}