[Rt-commit] rt branch 5.0/subscription-rows-config created. rt-5.0.5-74-g2c32eb2301
BPS Git Server
git at git.bestpractical.com
Wed Dec 6 18:11:39 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/subscription-rows-config has been created
at 2c32eb2301243151027c5d11048e3e24f8d4a2ab (commit)
- Log -----------------------------------------------------------------
commit 2c32eb2301243151027c5d11048e3e24f8d4a2ab
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Wed Dec 6 15:09:04 2023 -0300
Add option to set number of rows in subscription dashboards
In some situations, it is desirable to limit the number of rows
returned by a subscription dashboards. This patch adds a new
option to the subscription dashboards to allow the administrator
to change the available options for the number of rows returned.
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 31e3163168..2856945721 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -3031,6 +3031,22 @@ Set($QuoteSelectedText, 1);
=back
+=head2 Dashboards
+
+=over 4
+
+=item C<@SubscriptionRows>
+
+Define the options available in the Rows dropdown on the dashboard
+subscription page. Add "0" to the list to allow users to select
+"Unlimited" rows.
+
+=cut
+
+Set(@SubscriptionRows, (1, 2, 5, 10, 15, 20, 25, 50, 75, 100, 0));
+
+=back
+
=head2 Group Summary Configuration
Below are configuration options for the Group Summary page.
diff --git a/lib/RT/Config.pm b/lib/RT/Config.pm
index 04fbe3dcd5..e8f15996a9 100644
--- a/lib/RT/Config.pm
+++ b/lib/RT/Config.pm
@@ -2200,6 +2200,9 @@ our %META;
DefaultSelfServiceSearchResultFormat => {
Widget => '/Widgets/Form/MultilineString',
},
+ SubscriptionRows => {
+ Type => 'ARRAY',
+ },
GroupSearchResultFormat => {
Widget => '/Widgets/Form/MultilineString',
},
diff --git a/share/html/Dashboards/Subscription.html b/share/html/Dashboards/Subscription.html
index c1db86230b..427684534a 100644
--- a/share/html/Dashboards/Subscription.html
+++ b/share/html/Dashboards/Subscription.html
@@ -198,7 +198,7 @@
<div class="row">
<div class="col-auto">
<select name="Rows" class="form-control selectpicker">
-% for my $rows (1, 2, 5, 10, 15, 20, 25, 50, 75, 100, 0) {
+% for my $rows ( RT->Config->Get('SubscriptionRows') ) {
<option value="<% $rows %>" <% $fields{'Rows'} eq $rows ? 'selected="selected"' : '' |n %>><% loc($rows || 'Unlimited') %></option>
% }
</select>
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list