[Rt-commit] rt branch, 4.2/stylesheets-config, created. rt-4.2.4rc1-5-gbb7d9b8
? sunnavy
sunnavy at bestpractical.com
Thu May 8 10:36:35 EDT 2014
The branch, 4.2/stylesheets-config has been created
at bb7d9b890d3b8f69cd3317485a5eaf3093106c04 (commit)
- Log -----------------------------------------------------------------
commit bb7d9b890d3b8f69cd3317485a5eaf3093106c04
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu May 8 20:00:43 2014 +0800
new WebStylesheets config
we hardcoded the list in user theme selection(on preference page) before,
which makes it hard to customize. see also #14667
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index f9b24be..354d4b8 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -813,9 +813,9 @@ Set(@MailParams, ());
=over 4
-=item C<$WebDefaultStylesheet>
+=item C<@WebStylesheets>
-This determines the default stylesheet the RT web interface will use.
+This defines a list of web stylesheets the RT web interface can use.
RT ships with several themes by default:
rudder The default theme for RT 4.2
@@ -823,11 +823,20 @@ RT ships with several themes by default:
web2 The default layout for RT 3.8
ballard Theme which doesn't rely on JavaScript for menuing
-This value actually specifies a directory in F<share/static/css/>
+The values actually are names of directories in F<share/static/css/>
from which RT will try to load the file main.css (which should @import
any other files the stylesheet needs). This allows you to easily and
-cleanly create your own stylesheets to apply to RT. This option can
-be overridden by users in their preferences.
+cleanly create your own stylesheets to apply to RT.
+
+
+=cut
+
+Set(@WebStylesheets, qw/rudder aileron web2 ballard/);
+
+=item C<$WebDefaultStylesheet>
+
+This determines the default stylesheet the RT web interface will use.
+This option can be overridden by users in their preferences.
=cut
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 40dcec1..9573ff5 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -201,8 +201,9 @@ our %META;
Widget => '/Widgets/Form/Select',
WidgetArguments => {
Description => 'Theme', #loc
- # XXX: we need support for 'get values callback'
- Values => [qw(rudder web2 aileron ballard)],
+ Callback => sub {
+ return { Values => [RT->Config->Get('WebStylesheets')] };
+ },
},
PostLoadCheck => sub {
my $self = shift;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list