aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-15 22:45:07 -0700
committerredmatrix <git@macgirvin.com>2016-08-15 22:45:07 -0700
commit8a89cfb158986dd6be4c820188326f10f0bc1a94 (patch)
treef7a73e63ba508bfbebe7451abf2f288996949e17 /view
parent7fc254a81c5648653a03a7a631195d7c5212dcba (diff)
downloadvolse-hubzilla-8a89cfb158986dd6be4c820188326f10f0bc1a94.tar.gz
volse-hubzilla-8a89cfb158986dd6be4c820188326f10f0bc1a94.tar.bz2
volse-hubzilla-8a89cfb158986dd6be4c820188326f10f0bc1a94.zip
move schema settings into the display settings main so we can set theme:schema theme selectors in settings
Diffstat (limited to 'view')
-rw-r--r--view/theme/redbasic/php/config.php36
-rw-r--r--view/theme/redbasic/tpl/theme_settings.tpl3
-rwxr-xr-xview/tpl/settings_display.tpl3
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}}