From 94fa4e76e0aef93816c9b8c087fda914e246ada7 Mon Sep 17 00:00:00 2001 From: cash Date: Tue, 22 Feb 2011 02:25:58 +0000 Subject: started adding a settings page git-svn-id: http://code.elgg.org/elgg/trunk@8414 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/developers/actions/developers/settings.php | 6 ++++ mod/developers/languages/en.php | 10 +++--- mod/developers/manifest.xml | 2 +- .../views/default/admin/developers/settings.php | 7 ++++ mod/developers/views/default/developers/css.php | 8 +++++ .../views/default/forms/developers/settings.php | 41 ++++++++++++++++++++++ 6 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 mod/developers/actions/developers/settings.php create mode 100644 mod/developers/views/default/admin/developers/settings.php create mode 100644 mod/developers/views/default/forms/developers/settings.php (limited to 'mod') diff --git a/mod/developers/actions/developers/settings.php b/mod/developers/actions/developers/settings.php new file mode 100644 index 000000000..56509282f --- /dev/null +++ b/mod/developers/actions/developers/settings.php @@ -0,0 +1,6 @@ + 'Theming Preview', // settings - 'developers:label:simple_cache' => '', - 'developers:help:simple_cache' => '', - 'developers:label:views_cache' => '', - 'developers:help:views_cache' => '', + 'developers:label:simple_cache' => 'Use simple cache', + 'developers:help:simple_cache' => 'Turn off this file cache when developing', + 'developers:label:views_cache' => 'Use view path cache', + 'developers:help:views_cache' => 'Turn this off when developing', + 'developers:label:debug_level' => "Trace level", + 'developers:help:debug_level' => "", 'developers:label:' => '', 'developers:help:' => '', diff --git a/mod/developers/manifest.xml b/mod/developers/manifest.xml index 7dbde85ea..f6fb4b38a 100644 --- a/mod/developers/manifest.xml +++ b/mod/developers/manifest.xml @@ -1,7 +1,7 @@ Elgg Developer Tools - Cash Costello + Core developers 1.0 Developer tools A set of tools for writing plugins and themes. diff --git a/mod/developers/views/default/admin/developers/settings.php b/mod/developers/views/default/admin/developers/settings.php new file mode 100644 index 000000000..990d77263 --- /dev/null +++ b/mod/developers/views/default/admin/developers/settings.php @@ -0,0 +1,7 @@ + 'developer-settings-form'); +echo elgg_view_form('developers/settings', $form_vars, array()); \ No newline at end of file diff --git a/mod/developers/views/default/developers/css.php b/mod/developers/views/default/developers/css.php index faa549796..77c27d6b2 100644 --- a/mod/developers/views/default/developers/css.php +++ b/mod/developers/views/default/developers/css.php @@ -8,4 +8,12 @@ width: 100%; height: 600px; border: none; +} +#developer-settings-form label { + margin-right: 5px; +} +#developer-settings-form .elgg-text-help { + display: block; + font-size: 85%; + font-style: italic; } \ No newline at end of file diff --git a/mod/developers/views/default/forms/developers/settings.php b/mod/developers/views/default/forms/developers/settings.php new file mode 100644 index 000000000..2a3825500 --- /dev/null +++ b/mod/developers/views/default/forms/developers/settings.php @@ -0,0 +1,41 @@ +' . elgg_echo('elgg_dev_tools:settings:explanation') . '

'; + +$sections = array( + 'simple_cache' => 'checkbox', + 'views_cache' => 'checkbox', + //'display_errors' => 'checkbox', + 'debug_level' => 'pulldown', +); + +foreach ($sections as $name => $type) { + echo '

'; + if ($type == 'checkbox') { + echo elgg_view("input/$type", array( + 'internalname' => $name, + 'value' => $vars['settings'][$name], + )); + echo ''; + echo '' . elgg_echo("developers:help:$name") . ''; + } else { + echo ''; + echo elgg_view("input/$type", array( + 'internalname' => $name, + 'value' => $vars['settings'][$name], + 'options' => $vars['options'][$name], + )); + echo '' . elgg_echo("developers:help:$name") . ''; + } + echo '

'; +} + +echo '

'; +echo elgg_view('input/submit', array('value' => elgg_echo('save'))); +echo '

'; \ No newline at end of file -- cgit v1.2.3