1
0

add custom config to info array - fixes #165 3a and half of 3b

This commit is contained in:
Ian
2014-05-20 20:13:22 +02:00
parent e8a2900beb
commit b4f015e4c0
2 changed files with 13 additions and 5 deletions

View File

@ -258,6 +258,10 @@ function serendipity_fetchTemplateInfo($theme, $abspath = null) {
$data[$k] = implode("\n", $v);
}
if (@is_file($serendipity['templatePath'] . $theme . '/config.inc.php')) {
$data['custom_config'] = YES;
}
if ( $theme != 'default' && $theme != 'default-rtl'
&& @is_dir($serendipity['templatePath'] . $theme . '/admin')
&& strtolower($data['backend']) == 'yes' ) {

View File

@ -47,6 +47,8 @@
<dd>{$cur_tpl.info.author}</dd>
<dt class="template_date">{$CONST.LAST_UPDATED}:</dt>
<dd>{$cur_tpl.info.date}</dd>
<dt class="template_config">{$CONST.CUSTOM_CONFIG}:</dt>{* # i18n *}
<dd>{$cur_tpl.info.custom_config|default:$CONST.NO}</dd>
<dt class="template_admin">{$CONST.CUSTOM_ADMIN_INTERFACE}:</dt>
<dd>{$cur_tpl.info.custom_admin_interface}</dd>
</dl>
@ -56,11 +58,11 @@
<button class="template_show_info button_link" type="button" data-href="#template_info_cur" title="{$CONST.TEMPLATE_INFO}"><span class="icon-info-circled"></span><span class="visuallyhidden"> {$CONST.TEMPLATE_INFO}</span></button>
<a class="button_link" href="?serendipity[adminModule]=templates&amp;serendipity[adminAction]=editConfiguration" title="{$CONST.CONFIGURATION}">{$CONST.CONFIGURATION}</a>
{if $cur_tpl.info.custom_config}<a class="button_link" href="?serendipity[adminModule]=templates&amp;serendipity[adminAction]=editConfiguration" title="{$CONST.CONFIGURATION}">{$CONST.CONFIGURATION}</a>{/if}
</article>
{if $cur_template_backend}
<article class="clearfix current_template even">
<article class="clearfix current_template">
<h3>{$CONST.BACKEND}: {$cur_tpl_backend.info.name|truncate:30}</h3>
<div class="clearfix equal_heights template_wrap">
@ -112,6 +114,8 @@
<dd>{$info.info.author}</dd>
<dt class="template_date">{$CONST.LAST_UPDATED}:</dt>
<dd>{$info.info.date}</dd>
<dt class="template_config">{$CONST.CUSTOM_CONFIG}:</dt>{* # i18n *}
<dd>{$info.info.custom_config|default:$CONST.NO}</dd>
<dt class="template_admin">{$CONST.CUSTOM_ADMIN_INTERFACE}:</dt>
<dd>{if $info.info.custom_admin_interface} {$info.info.custom_admin_interface} {else} {$CONST.NO} {/if}</dd>
</dl>