From 80e7cea1d07804627e397013314813cac68956b5 Mon Sep 17 00:00:00 2001 From: colemanw Date: Sat, 16 Dec 2023 22:36:10 -0500 Subject: [PATCH] SearchKit - Rearrange 'compose search' into multiple tabs --- .../ang/crmSearchAdmin/compose.html | 87 ------------------- .../crmSearchAdmin/crmSearch-conditions.html | 8 ++ .../ang/crmSearchAdmin/crmSearch-fields.html | 8 ++ .../ang/crmSearchAdmin/crmSearch-for.html | 45 ++++++++++ .../{group.html => crmSearch-group.html} | 0 .../crmSearchAdmin/crmSearch-settings.html | 11 +++ .../crmSearchAdmin.component.js | 25 +++++- .../ang/crmSearchAdmin/crmSearchAdmin.html | 50 +++++++---- ext/search_kit/ang/crmSearchAdmin/tabs.html | 25 +----- ext/search_kit/css/crmSearchAdmin.css | 4 - 10 files changed, 135 insertions(+), 128 deletions(-) delete mode 100644 ext/search_kit/ang/crmSearchAdmin/compose.html create mode 100644 ext/search_kit/ang/crmSearchAdmin/crmSearch-conditions.html create mode 100644 ext/search_kit/ang/crmSearchAdmin/crmSearch-fields.html create mode 100644 ext/search_kit/ang/crmSearchAdmin/crmSearch-for.html rename ext/search_kit/ang/crmSearchAdmin/{group.html => crmSearch-group.html} (100%) create mode 100644 ext/search_kit/ang/crmSearchAdmin/crmSearch-settings.html diff --git a/ext/search_kit/ang/crmSearchAdmin/compose.html b/ext/search_kit/ang/crmSearchAdmin/compose.html deleted file mode 100644 index 45f0e208e4..0000000000 --- a/ext/search_kit/ang/crmSearchAdmin/compose.html +++ /dev/null @@ -1,87 +0,0 @@ -
-
-
-
-
- - - -
-
- -
-
-
-
- - -
-
-
-
-
- - - - - -
-
-
- -
-
-
-
-
- -
-
- -
-
-
- -
- - {{:: ts('Field Transformations') }} - -
- -
- -
-
-
diff --git a/ext/search_kit/ang/crmSearchAdmin/crmSearch-conditions.html b/ext/search_kit/ang/crmSearchAdmin/crmSearch-conditions.html new file mode 100644 index 0000000000..ef69b61a8c --- /dev/null +++ b/ext/search_kit/ang/crmSearchAdmin/crmSearch-conditions.html @@ -0,0 +1,8 @@ +
+ +
+
+ +
+ + diff --git a/ext/search_kit/ang/crmSearchAdmin/crmSearch-fields.html b/ext/search_kit/ang/crmSearchAdmin/crmSearch-fields.html new file mode 100644 index 0000000000..c02e30b140 --- /dev/null +++ b/ext/search_kit/ang/crmSearchAdmin/crmSearch-fields.html @@ -0,0 +1,8 @@ +
+
+ +
+ +
+
+
diff --git a/ext/search_kit/ang/crmSearchAdmin/crmSearch-for.html b/ext/search_kit/ang/crmSearchAdmin/crmSearch-for.html new file mode 100644 index 0000000000..e09ee67efd --- /dev/null +++ b/ext/search_kit/ang/crmSearchAdmin/crmSearch-for.html @@ -0,0 +1,45 @@ +
+
+ + +
+
+
+
+
+ + + +
+
+ +
+
+
+
+ + +
+
+
+
+
+ + + + + +
+
+
+ +
+
diff --git a/ext/search_kit/ang/crmSearchAdmin/group.html b/ext/search_kit/ang/crmSearchAdmin/crmSearch-group.html similarity index 100% rename from ext/search_kit/ang/crmSearchAdmin/group.html rename to ext/search_kit/ang/crmSearchAdmin/crmSearch-group.html diff --git a/ext/search_kit/ang/crmSearchAdmin/crmSearch-settings.html b/ext/search_kit/ang/crmSearchAdmin/crmSearch-settings.html new file mode 100644 index 0000000000..46a0bceaf2 --- /dev/null +++ b/ext/search_kit/ang/crmSearchAdmin/crmSearch-settings.html @@ -0,0 +1,11 @@ +
+ +
+
+ +
+
+ +
+
+ diff --git a/ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.component.js b/ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.component.js index 9f0062392c..57691eaa8c 100644 --- a/ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.component.js +++ b/ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.component.js @@ -29,7 +29,30 @@ this.searchDisplayPath = CRM.url('civicrm/search'); this.afformPath = CRM.url('civicrm/admin/afform'); - $scope.controls = {tab: 'compose', joinType: 'LEFT'}; + this.tabs = [ + { + key: 'for', + title: ts('Search For'), + icon: 'fa-search', + }, + { + key: 'conditions', + title: ts('Conditions'), + icon: 'fa-filter', + }, + { + key: 'fields', + title: ts('Select Fields'), + icon: 'fa-columns', + }, + { + key: 'settings', + title: ts('Configure Settings'), + icon: 'fa-gears', + }, + ]; + + $scope.controls = {tab: this.tabs[0].key, joinType: 'LEFT'}; $scope.joinTypes = [ {k: 'LEFT', v: ts('With (optional)')}, {k: 'INNER', v: ts('With (required)')}, diff --git a/ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.html b/ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.html index 235c6773d0..f3cfeb1f0a 100644 --- a/ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.html +++ b/ext/search_kit/ang/crmSearchAdmin/crmSearchAdmin.html @@ -13,12 +13,18 @@
- +
-
-
+
+
-
-
-
@@ -85,5 +104,6 @@
+
diff --git a/ext/search_kit/ang/crmSearchAdmin/tabs.html b/ext/search_kit/ang/crmSearchAdmin/tabs.html index 7592b5001e..5117801282 100644 --- a/ext/search_kit/ang/crmSearchAdmin/tabs.html +++ b/ext/search_kit/ang/crmSearchAdmin/tabs.html @@ -1,24 +1,7 @@ -
  • - -
  • -
  • -
    -
    - -
    -
    - -
    -
    -
    -
  • -
  • - -
  • -
  • - - - {{:: ts('Compose Search') }} +
  • + + + {{:: tab.title }}
  • diff --git a/ext/search_kit/css/crmSearchAdmin.css b/ext/search_kit/css/crmSearchAdmin.css index 02a8e323f6..41bcc4b2a2 100644 --- a/ext/search_kit/css/crmSearchAdmin.css +++ b/ext/search_kit/css/crmSearchAdmin.css @@ -1,7 +1,3 @@ -#bootstrap-theme .crm-search-criteria-column { - min-width: 500px; -} - #bootstrap-theme .crm-search-nav-tabs { position: relative; } -- 2.25.1