Skip to content

Commit

Permalink
Merge branch '5.0/subscription-rows-config' into 5.0-trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Jan 3, 2024
2 parents 0f98f66 + 3d1d2ab commit 8d598c5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions etc/RT_Config.pm.in
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,16 @@ See also L</@LexiconLanguages>.

Set(@EmailDashboardLanguageOrder, qw(_subscription _recipient _subscriber en));

=item C<@EmailDashboardRows>

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(@EmailDashboardRows, (1, 2, 5, 10, 15, 20, 25, 50, 75, 100, 0));

=item C<$DashboardTestEmailLimit>

The maximum number of dashboard test emails that can be sent in a
Expand Down
3 changes: 3 additions & 0 deletions lib/RT/Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1086,6 +1086,9 @@ our %META;
},
ReferrerWhitelist => { Type => 'ARRAY' },
EmailDashboardLanguageOrder => { Type => 'ARRAY' },
EmailDashboardRows => {
Type => 'ARRAY',
},
CustomFieldValuesCanonicalizers => { Type => 'ARRAY' },
CustomFieldValuesValidations => {
Type => 'ARRAY',
Expand Down
2 changes: 1 addition & 1 deletion share/html/Dashboards/Subscription.html
Original file line number Diff line number Diff line change
Expand Up @@ -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('EmailDashboardRows') ) {
<option value="<% $rows %>" <% $fields{'Rows'} eq $rows ? 'selected="selected"' : '' |n %>><% loc($rows || 'Unlimited') %></option>
% }
</select>
Expand Down

0 comments on commit 8d598c5

Please sign in to comment.