Commit | Line | Data |
---|---|---|
2ef64700 CW |
1 | // https://civicrm.org/licensing |
2 | (function(angular, $, _) { | |
3 | "use strict"; | |
4 | ||
5 | angular.module('afGuiEditor').component('afGuiSearchDisplay', { | |
6 | templateUrl: '~/afGuiEditor/elements/afGuiSearchDisplay.html', | |
7 | bindings: { | |
8 | node: '=' | |
9 | }, | |
10 | controller: function($scope, afGui) { | |
67d666c6 | 11 | var ts = $scope.ts = CRM.ts('org.civicrm.afform_admin'), |
2ef64700 CW |
12 | ctrl = this; |
13 | ||
14 | this.$onInit = function() { | |
5c952e51 | 15 | ctrl.display = afGui.getSearchDisplay(ctrl.node['search-name'], ctrl.node['display-name']); |
01a057e4 | 16 | ctrl.editUrl = CRM.url('civicrm/admin/search#/edit/' + ctrl.display.saved_search_id); |
2ef64700 CW |
17 | }; |
18 | ||
19 | } | |
20 | }); | |
21 | ||
22 | })(angular, CRM.$, CRM._); |