mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-07 00:48:55 +00:00
update addons to support Smarty3
This commit is contained in:
parent
66334ec5cb
commit
3da6f1471c
62 changed files with 778 additions and 468 deletions
|
@ -1,16 +0,0 @@
|
|||
{{ for $sites as $s }}
|
||||
{{ 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.tpl with $field=$s.delete }}{{ endinc }}
|
||||
<hr>
|
||||
{{ else }}
|
||||
<p>Fill this form to add a new site</p>
|
||||
{{ endif }}
|
||||
|
||||
{{ endfor }}
|
||||
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
|
@ -698,8 +698,15 @@ function statusnet_plugin_admin(&$a, &$o){
|
|||
);
|
||||
|
||||
|
||||
$t = file_get_contents( dirname(__file__). "/admin.tpl" );
|
||||
$o = replace_macros($t, array(
|
||||
$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(
|
||||
'$submit' => t('Submit'),
|
||||
|
||||
'$sites' => $sitesform,
|
||||
|
|
16
statusnet/view/admin.tpl
Executable file
16
statusnet/view/admin.tpl
Executable file
|
@ -0,0 +1,16 @@
|
|||
{{ 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 }}
|
||||
{{ if $s.delete }}
|
||||
{{ inc $field_checkbox with $field=$s.delete }}{{ endinc }}
|
||||
<hr>
|
||||
{{ else }}
|
||||
<p>Fill this form to add a new site</p>
|
||||
{{ endif }}
|
||||
|
||||
{{ endfor }}
|
||||
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
16
statusnet/view/smarty3/admin.tpl
Normal file
16
statusnet/view/smarty3/admin.tpl
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{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}}
|
||||
{{if $s.delete}}
|
||||
{{include file="file:{{$field_checkbox}}" field=$s.delete}}
|
||||
<hr>
|
||||
{{else}}
|
||||
<p>Fill this form to add a new site</p>
|
||||
{{/if}}
|
||||
|
||||
{{/foreach}}
|
||||
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="{{$submit}}" /></div>
|
Loading…
Add table
Add a link
Reference in a new issue