[Rt-commit] rt branch, 4.6/configindatabase-themed, updated. rt-4.4.4-557-g6fe368f89e

Jim Brandt jbrandt at bestpractical.com
Tue Nov 26 11:00:10 EST 2019


The branch, 4.6/configindatabase-themed has been updated
       via  6fe368f89e9e8f0bfb35c36312f4029d408a5ee0 (commit)
       via  e31fdb0f7a4921a487535e4fe412175b45570dc8 (commit)
       via  347b9e0c0078d99d744d2ffb3d90dbaa1e8f327f (commit)
       via  4713731b8d3c50c9d3bc82e148bbc582a644ce10 (commit)
      from  4117e8957a4f540771d2a9088a41a12498188f9e (commit)

Summary of changes:
 etc/RT_Config.pm.in                       | 32 +++++++++++++++++++++++++++++++
 lib/RT/Interface/Web/MenuBuilder.pm       | 10 +++++-----
 share/html/Admin/Elements/ConfigHelp      |  6 ++++++
 share/html/Admin/Tools/Configuration.html |  7 ++++---
 share/html/Admin/Tools/EditConfig.html    |  4 +++-
 share/static/css/elevator-light/admin.css |  8 ++++++++
 6 files changed, 58 insertions(+), 9 deletions(-)
 create mode 100644 share/html/Admin/Elements/ConfigHelp

- Log -----------------------------------------------------------------
commit 4713731b8d3c50c9d3bc82e148bbc582a644ce10
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Nov 26 09:46:46 2019 -0500

    Add container div for configuration pages
    
    This allows us to control the spacing between the header
    and initial titlebox as on other pages.

diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index 0f34470a5b..83b3127929 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -54,8 +54,8 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
 </%init>
 <& /Admin/Elements/Header, Title => $title &>
 <& /Elements/Tabs &>
-
-<&|/Widgets/TitleBox, title => loc("RT Configuration") &>
+<div class="configuration">
+<&|/Widgets/TitleBox, title => loc("RT Configuration"), class => 'fullwidth' &>
   <div class="form-row">
     <div class="col-md-4 label text-left"><&|/l&>Option</&></div>
     <div class="col-md-4 label text-left"><&|/l&>Value</&></div>
@@ -363,7 +363,7 @@ my $row = 1;
 </div>
 % }
 </&>
-
+</div>
 <%INIT>
 use Data::Dumper;
 local $Data::Dumper::Terse = 1;
diff --git a/share/html/Admin/Tools/EditConfig.html b/share/html/Admin/Tools/EditConfig.html
index e9d3d63536..2e159511cd 100644
--- a/share/html/Admin/Tools/EditConfig.html
+++ b/share/html/Admin/Tools/EditConfig.html
@@ -184,7 +184,7 @@ my $nav_type='tab'; # 'tab' or 'pill'
 <& /Admin/Elements/Header, Title => $title &>
 <& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
-
+<div class="configuration">
 <div class="titlebox-content">
 % my @tab_names = map { $_->{Name} } @$options;
   <ul class="nav nav-<% $nav_type %>s" id="config-tabs">
@@ -213,3 +213,4 @@ my $nav_type='tab'; # 'tab' or 'pill'
 % }
   </div><!-- content-all -->
 </div><!-- titlebox-content -->
+</div><!-- configuration -->
\ No newline at end of file
diff --git a/share/static/css/elevator-light/admin.css b/share/static/css/elevator-light/admin.css
index 1f46274b2f..7da98db1d3 100644
--- a/share/static/css/elevator-light/admin.css
+++ b/share/static/css/elevator-light/admin.css
@@ -194,3 +194,7 @@ div.inline-row i {
     background-color: #F6F6F6;
     padding: 2px 3px;
 }
+
+.configuration {
+    padding-top: .1em;
+}

commit 347b9e0c0078d99d744d2ffb3d90dbaa1e8f327f
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Nov 26 09:47:41 2019 -0500

    Move Edit link to the page menu on the configuration page
    
    Make the Admin > Tools menu a single link to the Configuration
    section and add the Edit option in the page menu once you
    are there.

diff --git a/lib/RT/Interface/Web/MenuBuilder.pm b/lib/RT/Interface/Web/MenuBuilder.pm
index df2dd9be5a..328517b793 100644
--- a/lib/RT/Interface/Web/MenuBuilder.pm
+++ b/lib/RT/Interface/Web/MenuBuilder.pm
@@ -674,6 +674,11 @@ sub BuildMainNav {
         $page->child( edit => raw_html => q[<a id="page-edit" class="menu-item" href="] . RT->Config->Get('WebPath') . qq[/Prefs/MyRT.html"><span class="fas fa-cog" alt="$alt" data-toggle="tooltip" data-placement="top" data-original-title="$alt"></span></a>] );
     }
 
+    if ( $request_path =~ m{^/Admin/Tools/(Configuration|EditConfig)} ) {
+        $page->child( display => title => loc('View'), path => "/Admin/Tools/Configuration.html" );
+        $page->child( history => title => loc('Edit'), path => "/Admin/Tools/EditConfig.html" );
+    }
+
     # due to historical reasons of always having been in /Elements/Tabs
     $HTML::Mason::Commands::m->callback( CallbackName => 'Privileged', Path => $request_path, Search_Args => $args, Has_Query => $has_query, ARGSRef => \%args, CallbackPage => '/Elements/Tabs' );
 }
@@ -983,11 +988,6 @@ sub _BuildAdminMenu {
         description => loc('Detailed information about your RT setup'),
         path        => '/Admin/Tools/Configuration.html',
     );
-    $admin_tools->child( edit_config =>
-        title       => loc('Edit Configuration'),
-        description => loc('Update your RT setup'),
-        path        => '/Admin/Tools/EditConfig.html',
-    );
     $admin_tools->child( theme =>
         title       => loc('Theme'),
         description => loc('Customize the look of your RT'),

commit e31fdb0f7a4921a487535e4fe412175b45570dc8
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Nov 26 10:30:16 2019 -0500

    Add some basic help to configuration pages

diff --git a/share/html/Admin/Elements/ConfigHelp b/share/html/Admin/Elements/ConfigHelp
new file mode 100644
index 0000000000..73ef691c00
--- /dev/null
+++ b/share/html/Admin/Elements/ConfigHelp
@@ -0,0 +1,6 @@
+<div class="help" id="rt-help-text">
+<&| /Widgets/TitleBox, title => loc('RT Configuration') &>
+<p>RT has dozens of configuration options to allow you to modify RT to meet your needs. You can view details about each configuration option online in the <a href="https://docs.bestpractical.com/rt/latest/RT_Config.html" target="_blank">RT documentation</a> or in the file <code>etc/RT_Config.pm</code> on your RT server. You can set global configuration options in the file <code>etc/RT_SiteConfig.pm</code> or right in the browser by clicking the Edit link.</p>
+<p>Changes made in the web interface take precedence over customizations in server configuration files. Some core settings can only be changed in configuration files.</p>
+</&>
+</div>
diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index 83b3127929..66df5bdf0e 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -55,7 +55,8 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
 <& /Admin/Elements/Header, Title => $title &>
 <& /Elements/Tabs &>
 <div class="configuration">
-<&|/Widgets/TitleBox, title => loc("RT Configuration"), class => 'fullwidth' &>
+<& /Admin/Elements/ConfigHelp &>
+<&|/Widgets/TitleBox, title => loc("Current Configuration"), class => 'fullwidth' &>
   <div class="form-row">
     <div class="col-md-4 label text-left"><&|/l&>Option</&></div>
     <div class="col-md-4 label text-left"><&|/l&>Value</&></div>
diff --git a/share/html/Admin/Tools/EditConfig.html b/share/html/Admin/Tools/EditConfig.html
index 2e159511cd..84bd883369 100644
--- a/share/html/Admin/Tools/EditConfig.html
+++ b/share/html/Admin/Tools/EditConfig.html
@@ -185,6 +185,7 @@ my $nav_type='tab'; # 'tab' or 'pill'
 <& /Elements/Tabs &>
 <& /Elements/ListActions, actions => \@results &>
 <div class="configuration">
+<& /Admin/Elements/ConfigHelp &>
 <div class="titlebox-content">
 % my @tab_names = map { $_->{Name} } @$options;
   <ul class="nav nav-<% $nav_type %>s" id="config-tabs">
diff --git a/share/static/css/elevator-light/admin.css b/share/static/css/elevator-light/admin.css
index 7da98db1d3..cbc1617754 100644
--- a/share/static/css/elevator-light/admin.css
+++ b/share/static/css/elevator-light/admin.css
@@ -195,6 +195,10 @@ div.inline-row i {
     padding: 2px 3px;
 }
 
+#rt-help-text a {
+    text-decoration: underline;
+}
+
 .configuration {
     padding-top: .1em;
 }

commit 6fe368f89e9e8f0bfb35c36312f4029d408a5ee0
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Tue Nov 26 10:58:32 2019 -0500

    Add configuration documentation in POD
    
    The warning about editing the RT_Config.pm file directly
    has been available as a comment for a long time, but this
    doesn't get published in the online docs we create.
    
    Move that information to POD so it gets published and add
    details about the new web configuration option.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 35b73f5b25..b1182b6482 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -20,6 +20,38 @@ package RT;
 
 RT::Config
 
+=head1 DESCRIPTION
+
+RT has dozens of configuration options to customize how RT behaves for
+different situations. The available options and valid values are
+described below.
+
+=head2 Server Configuration Files
+
+This file, C<etc/RT_Config.pm>, defines the available configuration options
+and sets the defaults for RT. You should B<never> edit this file directly.
+If you do, your changes will be lost when you upgrade and RT installs the
+newest version of this file on your system.
+
+The correct place to set site-specific options is in C<etc/RT_SiteConfig.pm>.
+If you have many customizations to manage, you can break your configuration
+into multiple files and put them in a directory C<etc/RT_SiteConfig.d/>. More
+information about this option is available in the L<RT::Config>
+documentation.
+
+=head2 Web Configuration
+
+RT also allows you to set configuration via the RT web interface at
+Admin > Tools > System Configuration. Any configuration options set there take
+precedence over values set in C<etc/RT_SiteConfig.pm>. If you provide a
+custom setting in both places, RT will issue a warning in the log as a
+reminder to consider removing the setting from C<etc/RT_SiteConfig.pm>
+to avoid confusion.
+
+Some settings that are core to RT cannot be changed via the web interface.
+This prevents changes that could make your RT inoperable, leaving you
+unable to restore the system via the web UI.
+
 =head1 Base configuration
 
 =over 4

-----------------------------------------------------------------------


More information about the rt-commit mailing list