From 7a05e49a54e743a9547035be43516d1d32642c88 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 6 Dec 2013 17:14:58 -0500 Subject: [PATCH] Change the yesno directive to settingType and support text rows. --- admin/setting.php | 27 +------------ admin/templates/admin_settings.tpl | 63 ++++++++++++++++++++++-------- static/admin.js | 5 ++- 3 files changed, 51 insertions(+), 44 deletions(-) diff --git a/admin/setting.php b/admin/setting.php index 9b22803..0184fef 100755 --- a/admin/setting.php +++ b/admin/setting.php @@ -93,23 +93,6 @@ if ($_REQUEST['do'] == 'modify') } } $admin->row_list(T('The authentication class to use to validate cookie data and longins. You may need to edit the actual file for certain authentication systems.'), 'setting[authmethod]'); - - - // webmasteremail - $admin->row_span(T('Webmaster Email Address'), 'thead'); - $admin->row_input(T('The email address from which emails will be sent out.'), 'setting[webmasteremail]', $bugsys->options['webmasteremail']); - - // trackertitle - $admin->row_span(T('Tracker Title'), 'thead'); - $admin->row_input(T('The global name of the bug tracker. Example: Blue Static Bug Tracker'), 'setting[trackertitle]', $bugsys->options['trackertitle']); - - // trackerurl - $admin->row_span(T('Tracker Base URL'), 'thead'); - $admin->row_input(T('The base URL of the tracker. This is used when creating external links to the tracker. Be sure that this does not end in a trailing slash ("/").
Example: http://www.bluestatic.org/bugs'), 'setting[trackerurl]', $bugsys->options['trackerurl']); - - // dateformat - $admin->row_span(T('Date Format'), 'thead'); - $admin->row_input(T('Set the date format used for bug report and comment information. This is based on PHP\'s date() function.'), 'setting[dateformat]', $bugsys->options['dateformat']); // defaulttimezone $admin->row_span(T('Default Time Zone'), 'thead'); @@ -118,15 +101,7 @@ if ($_REQUEST['do'] == 'modify') // defaultlanguage $admin->row_span(T('Default Language'), 'thead'); $admin->row_text(T('You can set the default language that all new users (and guests) will use.'), construct_option_select('setting[defaultlanguage]', Bugdar::$datastore['language'], $bugsys->options['defaultlanguage'], 'languageid', 'title'), $bugsys->options['defaultlanguage']); - - // syndicateditems - $admin->row_span(T('Number of Syndicated Items'), 'thead'); - $admin->row_input(T('The number of bugs to be syndicated at any one time by the Atom XML feed.'), 'setting[syndicateditems]', $bugsys->options['syndicateditems']); - - // redirectheaders - $admin->row_span(T('Use Header Redirects'), 'thead'); - $admin->row_yesno(T('Instead of displaying an intermediate page informing the user that their action was a success and a redirect is occurring, just send the user to the next screen using HTTP headers. This can save bandwidth.'), 'setting[redirectheaders]', $bugsys->options['redirectheaders']); - + $admin->table_end(); // ################################################################### diff --git a/admin/templates/admin_settings.tpl b/admin/templates/admin_settings.tpl index a6d9ca8..661506f 100644 --- a/admin/templates/admin_settings.tpl +++ b/admin/templates/admin_settings.tpl @@ -2,49 +2,80 @@
- - - - - - - - - + + + + + + + +
{%=T('General Options')%}
- - {%=T('The email address from which emails will be sent out.')%} - - -
diff --git a/static/admin.js b/static/admin.js index 373bb81..2c9484a 100644 --- a/static/admin.js +++ b/static/admin.js @@ -1,12 +1,13 @@ angular.module('bugdar.admin.settings', []) - .directive('yesno', ['$templateCache', function($templateCache) { + .directive('settingType', ['$templateCache', function($templateCache) { return { restrict: 'A', replace: false, - template: $templateCache.get('-/admin/settings/yesno.tpl'), + template: $templateCache.get('-/admin/settings/row.tpl'), scope: { title: '@', description: '@', + settingType: '@', name: '@', value: '@' } -- 2.43.5