diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-08-16 08:05:53 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-08-16 08:05:53 +0200 |
commit | 9fc4246e1d7913d4f5c2b1addaa8f80ef417b1eb (patch) | |
tree | 2d7afb993d7c1ea9d951699c47508494cfef5f11 /view | |
parent | 291b0edbe0da045ce2b68d916d1b41f3c4ee6384 (diff) | |
parent | 70150718c55ec5b55dbded26a5159f06f14c6c25 (diff) | |
download | volse-hubzilla-9fc4246e1d7913d4f5c2b1addaa8f80ef417b1eb.tar.gz volse-hubzilla-9fc4246e1d7913d4f5c2b1addaa8f80ef417b1eb.tar.bz2 volse-hubzilla-9fc4246e1d7913d4f5c2b1addaa8f80ef417b1eb.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
Diffstat (limited to 'view')
-rw-r--r-- | view/theme/redbasic/php/config.php | 36 | ||||
-rw-r--r-- | view/theme/redbasic/tpl/theme_settings.tpl | 3 | ||||
-rwxr-xr-x | view/tpl/settings_display.tpl | 3 |
3 files changed, 24 insertions, 18 deletions
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index 04cf4f904..8f256bde4 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -1,11 +1,30 @@ <?php +class RedbasicConfig { + function get_schemas() { + $scheme_choices = array(); + $scheme_choices["---"] = t("Focus (Hubzilla default)"); + $files = glob('view/theme/redbasic/schema/*.php'); + if($files) { + foreach($files as $file) { + $f = basename($file, ".php"); + if($f != 'default') { + $scheme_name = $f; + $scheme_choices[$f] = $scheme_name; + } + } + } + return $scheme_choices; + } +} + + function theme_content(&$a) { if(!local_channel()) { return;} $arr = array(); - $arr['schema'] = get_pconfig(local_channel(),'redbasic', 'schema' ); +// $arr['schema'] = get_pconfig(local_channel(),'redbasic', 'schema' ); $arr['narrow_navbar'] = get_pconfig(local_channel(),'redbasic', 'narrow_navbar' ); $arr['nav_bg'] = get_pconfig(local_channel(),'redbasic', 'nav_bg' ); $arr['nav_gradient_top'] = get_pconfig(local_channel(),'redbasic', 'nav_gradient_top' ); @@ -42,7 +61,7 @@ function theme_post(&$a) { if(!local_channel()) { return;} if (isset($_POST['redbasic-settings-submit'])) { - set_pconfig(local_channel(), 'redbasic', 'schema', $_POST['redbasic_schema']); +// set_pconfig(local_channel(), 'redbasic', 'schema', $_POST['redbasic_schema']); set_pconfig(local_channel(), 'redbasic', 'narrow_navbar', $_POST['redbasic_narrow_navbar']); set_pconfig(local_channel(), 'redbasic', 'nav_bg', $_POST['redbasic_nav_bg']); set_pconfig(local_channel(), 'redbasic', 'nav_gradient_top', $_POST['redbasic_nav_gradient_top']); @@ -78,18 +97,6 @@ function theme_post(&$a) { function redbasic_form(&$a, $arr) { - $scheme_choices = array(); - $scheme_choices["---"] = t("Focus (Hubzilla default)"); - $files = glob('view/theme/redbasic/schema/*.php'); - if($files) { - foreach($files as $file) { - $f = basename($file, ".php"); - if($f != 'default') { - $scheme_name = $f; - $scheme_choices[$f] = $scheme_name; - } - } - } if(feature_enabled(local_channel(),'expert')) $expert = 1; @@ -101,7 +108,6 @@ if(feature_enabled(local_channel(),'expert')) '$theme' => App::$channel['channel_theme'], '$expert' => $expert, '$title' => t("Theme settings"), - '$schema' => array('redbasic_schema', t('Select scheme'), $arr['schema'], '', $scheme_choices), '$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar'], '', array(t('No'),t('Yes'))), '$nav_bg' => array('redbasic_nav_bg', t('Navigation bar background color'), $arr['nav_bg']), '$nav_gradient_top' => array('redbasic_nav_gradient_top', t('Navigation bar gradient top color'), $arr['nav_gradient_top']), diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl index 0ec6d1741..9672d3d05 100644 --- a/view/theme/redbasic/tpl/theme_settings.tpl +++ b/view/theme/redbasic/tpl/theme_settings.tpl @@ -1,6 +1,3 @@ -{{if $theme == redbasic}} -{{include file="field_select.tpl" field=$schema}} -{{/if}} {{include file="field_checkbox.tpl" field=$align_left}} {{include file="field_checkbox.tpl" field=$narrow_navbar}} {{include file="field_input.tpl" field=$converse_width}} diff --git a/view/tpl/settings_display.tpl b/view/tpl/settings_display.tpl index cf79671fd..2e11fdbaa 100755 --- a/view/tpl/settings_display.tpl +++ b/view/tpl/settings_display.tpl @@ -20,6 +20,9 @@ {{if $theme}} {{include file="field_themeselect.tpl" field=$theme}} {{/if}} + {{if $schema}} + {{include file="field_select.tpl" field=$schema}} + {{/if}} {{if $mobile_theme}} {{include file="field_themeselect.tpl" field=$mobile_theme}} {{/if}} |