[Rt-commit] rt branch 5.0/add-disabled-articles-to-search created. rt-5.0.5-149-g5f3de528d8
BPS Git Server
git at git.bestpractical.com
Tue Jan 30 01:02:25 UTC 2024
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/add-disabled-articles-to-search has been created
at 5f3de528d83de361e0f7359a6345bb9452aed818 (commit)
- Log -----------------------------------------------------------------
commit 5f3de528d83de361e0f7359a6345bb9452aed818
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Mon Jan 29 22:01:56 2024 -0300
Add option to find disabled articles in search
Previously, the search would only find enabled articles. This adds an
option to the search to include disabled articles in the results.
diff --git a/share/html/Articles/Article/Elements/ShowSearchCriteria b/share/html/Articles/Article/Elements/ShowSearchCriteria
index 2497cba1fc..c2f2578e8a 100644
--- a/share/html/Articles/Article/Elements/ShowSearchCriteria
+++ b/share/html/Articles/Article/Elements/ShowSearchCriteria
@@ -99,6 +99,16 @@
</div>
</div>
+<div class="form-row">
+ <div class="label col-3"></div>
+ <div class="value col-9">
+ <div class="custom-control custom-checkbox">
+ <input type="checkbox" id="FindDisabledArticles" name="FindDisabledArticles" class="custom-control-input" <% $ARGS{'FindDisabledArticles'} ? 'checked="checked"' : "" %> />
+ <label class="custom-control-label" for="FindDisabledArticles"><&|/l&>Include disabled articles in listing.</&></label>
+ </div>
+ </div>
+</div>
+
<div class="form-row label">
<h5><&|/l&>Content</&></h5>
</div>
diff --git a/share/html/Articles/Article/Search.html b/share/html/Articles/Article/Search.html
index 8eaa92334c..b65ea60ff7 100644
--- a/share/html/Articles/Article/Search.html
+++ b/share/html/Articles/Article/Search.html
@@ -267,6 +267,8 @@ if ($ARGS{'Save'}) {
my $customfields = RT::CustomFields->new( $session{'CurrentUser'} );
my %dates;
+$articles->FindAllRows if $ARGS{FindDisabledArticles};
+
$articles->Search( %ARGS, CustomFields => $customfields, Dates => \%dates,
OrderBy => \@OrderBy, Order => \@Order, );
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list