From: Coleman Watts Date: Wed, 24 Mar 2021 22:15:08 +0000 (-0400) Subject: SearchKit - Add created & modified info to SavedSearch listing X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c2dabeace428b26b3fbc5d86aca577da2088ce49;p=civicrm-core.git SearchKit - Add created & modified info to SavedSearch listing --- diff --git a/ext/search/ang/crmSearchAdmin.module.js b/ext/search/ang/crmSearchAdmin.module.js index 7aa5b7eb60..88cdddbe69 100644 --- a/ext/search/ang/crmSearchAdmin.module.js +++ b/ext/search/ang/crmSearchAdmin.module.js @@ -23,6 +23,10 @@ 'label', 'api_entity', 'api_params', + 'created.display_name', + 'modified.display_name', + 'created_date', + 'modified_date', 'GROUP_CONCAT(display.name ORDER BY display.id) AS display_name', 'GROUP_CONCAT(display.label ORDER BY display.id) AS display_label', 'GROUP_CONCAT(display.type:icon ORDER BY display.id) AS display_icon', diff --git a/ext/search/ang/crmSearchAdmin/searchList.controller.js b/ext/search/ang/crmSearchAdmin/searchList.controller.js index e554164c3f..42a36d904e 100644 --- a/ext/search/ang/crmSearchAdmin/searchList.controller.js +++ b/ext/search/ang/crmSearchAdmin/searchList.controller.js @@ -4,6 +4,7 @@ angular.module('crmSearchAdmin').controller('searchList', function($scope, savedSearches, crmApi4) { var ts = $scope.ts = CRM.ts('org.civicrm.search'), ctrl = $scope.$ctrl = this; + $scope.formatDate = CRM.utils.formatDate; this.savedSearches = savedSearches; this.afformEnabled = CRM.crmSearchAdmin.afformEnabled; this.afformAdminEnabled = CRM.crmSearchAdmin.afformAdminEnabled; diff --git a/ext/search/ang/crmSearchAdmin/searchList.html b/ext/search/ang/crmSearchAdmin/searchList.html index 427ae1718b..856f4e89a8 100644 --- a/ext/search/ang/crmSearchAdmin/searchList.html +++ b/ext/search/ang/crmSearchAdmin/searchList.html @@ -17,14 +17,16 @@ {{:: ts('Displays') }} {{:: ts('Smart Group') }} {{:: ts('Forms') }} + {{:: ts('Created') }} + {{:: ts('Last Modified') }} - {{ search.id }} - {{ search.label }} - {{ $ctrl.entityTitles[search.api_entity] }} + {{:: search.id }} + {{:: search.label }} + {{:: $ctrl.entityTitles[search.api_entity] }}
- {{ search.groups.join(', ') }} + {{:: search.groups.join(', ') }}
+ {{:: ts('%1 by %2', {1: formatDate(search.created_date), 2: search['created.display_name']}) }} + {{:: ts('%1 by %2', {1: formatDate(search.created_date), 2: search['modified.display_name']}) }} {{:: ts('Edit') }} {{:: ts('Clone') }}