[Bps-public-commit] RT-BugTracker branch, 4.2-4.4-compatibility, updated. 5.2-13-g984cd92

Shawn Moore shawn at bestpractical.com
Wed Mar 29 17:09:55 EDT 2017


The branch, 4.2-4.4-compatibility has been updated
       via  984cd924fd7f8e14743bc854c7d2dd24d566e9db (commit)
      from  2136b95d57c461a825b30e94db4d91737b574e08 (commit)

Summary of changes:
 html/Callbacks/BugTracker/Elements/Tabs/SelfService | 10 ++++++----
 html/Dist/Elements/BeginsWith                       |  7 ++++++-
 lib/RT/BugTracker.pm                                |  5 +++++
 3 files changed, 17 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit 984cd924fd7f8e14743bc854c7d2dd24d566e9db
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Wed Mar 29 21:09:42 2017 +0000

    Make BugTracker_HideBrowseDistributions configurable
    
    Fixes: T#182764

diff --git a/html/Callbacks/BugTracker/Elements/Tabs/SelfService b/html/Callbacks/BugTracker/Elements/Tabs/SelfService
index f4d5f95..7a61fb2 100644
--- a/html/Callbacks/BugTracker/Elements/Tabs/SelfService
+++ b/html/Callbacks/BugTracker/Elements/Tabs/SelfService
@@ -66,10 +66,12 @@ $tracker->child(
     path        => '/Dist/Search.html',
 );
 
-$tracker->child(
-    browse => title => loc('Browse'),
-    path        => '/Dist/Browse.html',
-);
+unless (RT->Config->Get('BugTracker_HideBrowseDistributions')) {
+    $tracker->child(
+        browse => title => loc('Browse'),
+        path        => '/Dist/Browse.html',
+    );
+}
 
 my $request_path = $HTML::Mason::Commands::r->path_info;
 $request_path =~ s!^/{2,}!/!;
diff --git a/html/Dist/Elements/BeginsWith b/html/Dist/Elements/BeginsWith
index 7ef9d5a..60aae4f 100644
--- a/html/Dist/Elements/BeginsWith
+++ b/html/Dist/Elements/BeginsWith
@@ -47,13 +47,18 @@
 %# END BPS TAGGED BLOCK }}}
 <form action="<% RT->Config->Get('WebPath') %><% $m->request_path %>" method="GET">
 <p>
+% if (RT->Config->Get('BugTracker_HideBrowseDistributions')) {
+ <% loc('Prefix is') %>
+% } else {
 <% loc('First letter is') %>
 % for my $letter ("A".."Z") {
 <a href="<% $RT::WebPath %><% $m->request_path %>?Name=<% $letter %>">
 <% $letter eq $Name ? "<strong>$letter</strong>" : $letter |n %>
 </a>
 % }
- <% loc('or prefix is') %> <input type="text" name="Name" value="<% length($Name) > 1? $Name : '' %>" data-autocomplete="Queues" data-autocomplete-autosubmit=1 />
+ <% loc('or prefix is') %>
+% }
+<input type="text" name="Name" value="<% length($Name) > 1? $Name : '' %>" data-autocomplete="Queues" data-autocomplete-autosubmit=1 />
 </p>
 </form>
 <%ARGS>
diff --git a/lib/RT/BugTracker.pm b/lib/RT/BugTracker.pm
index 324dc98..1f4d33f 100644
--- a/lib/RT/BugTracker.pm
+++ b/lib/RT/BugTracker.pm
@@ -352,6 +352,11 @@ Use this config variable to specify the search result format for a
 distribution's list of tickets, much like C<DefaultSearchResultFormat>
 in core RT.
 
+=item2 BugTracker_HideBrowseDistributions
+
+Use this config variable to suppress the alphabetical distribution browser
+UI, for users with fewer than tens of thousands of queues. :)
+
 =head2 Custom Fields
 
 By default, when you run C<make initdb>, RT::BugTracker creates three

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


More information about the Bps-public-commit mailing list