mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
revert addon Smarty3 templates to non-variable-based includes
This commit is contained in:
parent
75f47b74d2
commit
c12542ef96
53 changed files with 75 additions and 146 deletions
|
@ -699,14 +699,7 @@ function statusnet_plugin_admin(&$a, &$o){
|
|||
|
||||
|
||||
$t = get_markup_template( "admin.tpl", "addon/statusnet/" );
|
||||
|
||||
$includes = array(
|
||||
'$field_input' => 'field_input.tpl',
|
||||
'$field_checkbox' => 'field_checkbox.tpl',
|
||||
);
|
||||
$includes = set_template_includes($a->theme['template_engine'], $includes);
|
||||
|
||||
$o = replace_macros($t, $includes + array(
|
||||
$o = replace_macros($t, array(
|
||||
'$submit' => t('Submit'),
|
||||
|
||||
'$sites' => $sitesform,
|
||||
|
|
10
statusnet/view/admin.tpl
Executable file → Normal file
10
statusnet/view/admin.tpl
Executable file → Normal file
|
@ -1,10 +1,10 @@
|
|||
{{ for $sites as $s }}
|
||||
{{ inc $field_input with $field=$s.sitename }}{{ endinc }}
|
||||
{{ inc $field_input with $field=$s.apiurl }}{{ endinc }}
|
||||
{{ inc $field_input with $field=$s.secret }}{{ endinc }}
|
||||
{{ inc $field_input with $field=$s.key }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$s.sitename }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$s.apiurl }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$s.secret }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$s.key }}{{ endinc }}
|
||||
{{ if $s.delete }}
|
||||
{{ inc $field_checkbox with $field=$s.delete }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$s.delete }}{{ endinc }}
|
||||
<hr>
|
||||
{{ else }}
|
||||
<p>Fill this form to add a new site</p>
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{{foreach $sites as $s}}
|
||||
{{include file="file:{{$field_input}}" field=$s.sitename}}
|
||||
{{include file="file:{{$field_input}}" field=$s.apiurl}}
|
||||
{{include file="file:{{$field_input}}" field=$s.secret}}
|
||||
{{include file="file:{{$field_input}}" field=$s.key}}
|
||||
{{include file="field_input.tpl" field=$s.sitename}}
|
||||
{{include file="field_input.tpl" field=$s.apiurl}}
|
||||
{{include file="field_input.tpl" field=$s.secret}}
|
||||
{{include file="field_input.tpl" field=$s.key}}
|
||||
{{if $s.delete}}
|
||||
{{include file="file:{{$field_checkbox}}" field=$s.delete}}
|
||||
{{include file="field_checkbox.tpl" field=$s.delete}}
|
||||
<hr>
|
||||
{{else}}
|
||||
<p>Fill this form to add a new site</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue