revert addon Smarty3 templates to non-variable-based includes

This commit is contained in:
Zach Prezkuta 2012-12-25 13:25:09 -07:00
parent 75f47b74d2
commit c12542ef96
53 changed files with 75 additions and 146 deletions

View file

@ -79,14 +79,7 @@ function impressum_plugin_admin_post (&$a) {
}
function impressum_plugin_admin (&$a, &$o) {
$t = get_markup_template( "admin.tpl", "addon/impressum/" );
$includes = array(
'$field_input' => 'field_input.tpl',
'$field_textarea' => 'field_textarea.tpl',
);
$includes = set_template_includes($a->theme['template_engine'], $includes);
$o = replace_macros($t, $includes + array(
$o = replace_macros($t, array(
'$submit' => t('Submit'),
'$owner' => array('owner', t('Site Owner'), get_config('impressum','owner'), t('The page operators name.')),
'$ownerprofile' => array('ownerprofile', t('Site Owners Profile'), get_config('impressum','ownerprofile'), t('Profile address of the operator.')),

12
impressum/view/admin.tpl Executable file → Normal file
View file

@ -1,7 +1,7 @@
{{ inc $field_input with $field=$owner }}{{ endinc }}
{{ inc $field_input with $field=$ownerprofile }}{{ endinc }}
{{ inc $field_textarea with $field=$postal }}{{ endinc }}
{{ inc $field_textarea with $field=$notes }}{{ endinc }}
{{ inc $field_input with $field=$email }}{{ endinc }}
{{ inc $field_textarea with $field=$footer_text }}{{ endinc }}
{{ inc field_input.tpl with $field=$owner }}{{ endinc }}
{{ inc field_input.tpl with $field=$ownerprofile }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$postal }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$notes }}{{ endinc }}
{{ inc field_input.tpl with $field=$email }}{{ endinc }}
{{ inc field_textarea.tpl with $field=$footer_text }}{{ endinc }}
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>

View file

@ -1,7 +1,7 @@
{{include file="file:{{$field_input}}" field=$owner}}
{{include file="file:{{$field_input}}" field=$ownerprofile}}
{{include file="file:{{$field_textarea}}" field=$postal}}
{{include file="file:{{$field_textarea}}" field=$notes}}
{{include file="file:{{$field_input}}" field=$email}}
{{include file="file:{{$field_textarea}}" field=$footer_text}}
{{include file="field_input.tpl" field=$owner}}
{{include file="field_input.tpl" field=$ownerprofile}}
{{include file="field_textarea.tpl" field=$postal}}
{{include file="field_textarea.tpl" field=$notes}}
{{include file="field_input.tpl" field=$email}}
{{include file="field_textarea.tpl" field=$footer_text}}
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>