better have logic in php - fixes #165 1 b

This commit is contained in:
Ian 2014-05-20 17:45:53 +02:00
parent b8e60cd7ef
commit 38204c4053
2 changed files with 6 additions and 4 deletions

View File

@ -214,6 +214,12 @@ foreach ($stack as $theme => $info) {
/* TODO: Smarty versioncheck */
}
$data['cur_tpl'] = $data['templates'][$data['cur_template']];
unset($data['templates'][$data['cur_template']]);
$data['cur_tpl_backend'] = $data['templates'][$data['cur_template_backend']];
echo serendipity_smarty_show('admin/templates.inc.tpl', $data);
/* vim: set sts=4 ts=4 expandtab : */

View File

@ -25,7 +25,6 @@
<script src="{serendipity_getFile file='admin/js/jquery.magnific-popup.js'}"></script>
{else}
<section id="template_select" class="clearfix">
{assign var="cur_tpl" value=$templates[$cur_template]}
<h2>{$CONST.CURRENT_TEMPLATE}</h2>
<article class="clearfix current_template">
@ -61,7 +60,6 @@
</article>
{if $cur_template_backend}
{assign var="cur_tpl_backend" value=$templates[$cur_template_backend]}
<article class="clearfix current_template even">
<h3>{$CONST.BACKEND}: {$cur_tpl_backend.info.name}</h3>
@ -95,7 +93,6 @@
<ul class="plainList clearfix">
{foreach $templates as $template=>$info}
{if !empty($template) && $info.info.engine != 'yes'}
<li><article class="clearfix {cycle values="odd,even"}">
<h3>{$info.info.name}</h3>
<div class="clearfix equal_heights template_wrap">
@ -136,7 +133,6 @@
{/if}
</article>
</li>
{/if}
{/foreach}
</ul>
</section>