[Bps-public-commit] rt-extension-assetsql branch, master, updated. 0e02a10a6cd9f4a05f00aef5597386c7bf4406a7
Shawn Moore
shawn at bestpractical.com
Wed Jun 15 14:46:52 EDT 2016
The branch, master has been updated
via 0e02a10a6cd9f4a05f00aef5597386c7bf4406a7 (commit)
from 83af1bf91c7d5ec2c4fc69ae8b782069d1c3a6aa (commit)
Summary of changes:
README | 5 +++++
html/Callbacks/AssetSQL/Elements/Tabs/Privileged | 15 +++++++++++----
lib/RT/Extension/AssetSQL.pm | 5 +++++
3 files changed, 21 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 0e02a10a6cd9f4a05f00aef5597386c7bf4406a7
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Wed Jun 15 18:45:16 2016 +0000
AssetSQL_HideSimpleSearch config
diff --git a/README b/README
index 9f36c4c..8e909f1 100644
--- a/README
+++ b/README
@@ -28,6 +28,11 @@ INSTALLATION
Plugin( "RT::Extension::AssetSQL" );
+ If you wish to hide the legacy Asset Simple Search, add the
+ following line as well:
+
+ Set($AssetSQL_HideSimpleSearch, 1);
+
Clear your mason cache
rm -rf /opt/rt4/var/mason_data/obj
diff --git a/html/Callbacks/AssetSQL/Elements/Tabs/Privileged b/html/Callbacks/AssetSQL/Elements/Tabs/Privileged
index cd273bb..13c7486 100644
--- a/html/Callbacks/AssetSQL/Elements/Tabs/Privileged
+++ b/html/Callbacks/AssetSQL/Elements/Tabs/Privileged
@@ -6,14 +6,21 @@ $ARGSRef
# replace Search -> Assets with a submenu (if the user has ShowAssetsMenu)
if (my $search_assets = Menu()->child("search")->child("assets")) {
$search_assets->path('/Asset/Search/Build.html');
- $search_assets->child("asset_simple", title => loc("Simple Search"), path => "/Asset/Search/");
- $search_assets->child("assetsql", title => loc("New Search"), path => "/Asset/Search/Build.html?NewQuery=1");
+ if (!RT->Config->Get('AssetSQL_HideSimpleSearch')) {
+ $search_assets->child("asset_simple", title => loc("Simple Search"), path => "/Asset/Search/");
+ $search_assets->child("assetsql", title => loc("New Search"), path => "/Asset/Search/Build.html?NewQuery=1");
+ }
}
# add Assets -> New Search (if the user has ShowAssetsMenu)
if (Menu()->child("assets") && (my $assets_search = Menu()->child("assets")->child("search"))) {
- $assets_search->title(loc("Simple Search"));
- $assets_search->add_before("assetsql", title => loc("New Search"), path => "/Asset/Search/Build.html?NewQuery=1");
+ if (RT->Config->Get('AssetSQL_HideSimpleSearch')) {
+ $assets_search->path("/Asset/Search/Build.html?NewQuery=1");
+ }
+ else {
+ $assets_search->title(loc("Simple Search"));
+ $assets_search->add_before("assetsql", title => loc("New Search"), path => "/Asset/Search/Build.html?NewQuery=1");
+ }
}
my $query_string = sub {
diff --git a/lib/RT/Extension/AssetSQL.pm b/lib/RT/Extension/AssetSQL.pm
index 00b4faf..a00ce8a 100644
--- a/lib/RT/Extension/AssetSQL.pm
+++ b/lib/RT/Extension/AssetSQL.pm
@@ -133,6 +133,11 @@ Add this line:
Plugin( "RT::Extension::AssetSQL" );
+If you wish to hide the legacy Asset Simple Search, add the following line
+as well:
+
+ Set($AssetSQL_HideSimpleSearch, 1);
+
=item Clear your mason cache
rm -rf /opt/rt4/var/mason_data/obj
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list