Merge pull request #19291 from eileenmcnaughton/prof
[civicrm-core.git] / ext / search / ang / crmSearchAdmin / searchList.html
CommitLineData
475029f6
CW
1<div id="bootstrap-theme" class="crm-search">
2 <h1 crm-page-title>{{:: ts('Saved Searches') }}</h1>
3 <div class="form-inline">
4 <a class="btn btn-primary pull-right" href="#/create/Contact/">
5 <i class="crm-i fa-plus"></i>
6 {{:: ts('New Search') }}
7 </a>
8 </div>
9 <table>
10 <thead>
11 <tr>
12 <th>{{:: ts('ID') }}</th>
44402a2e 13 <th>{{:: ts('Label') }}</th>
475029f6
CW
14 <th>{{:: ts('For') }}</th>
15 <th>{{:: ts('Displays') }}</th>
16 <th>{{:: ts('Smart Group') }}</th>
17 <th></th>
18 </tr>
19 </thead>
20 <tbody>
21 <tr ng-repeat="search in $ctrl.savedSearches">
22 <td>{{ search.id }}</td>
44402a2e 23 <td>{{ search.label }}</td>
475029f6 24 <td>{{ $ctrl.entityTitles[search.api_entity] }}</td>
475029f6 25 <td>
7620b30a 26 <div class="btn-group">
102c400b 27 <button type="button" disabled ng-if="!search.display_name" class="btn btn-xs dropdown-toggle btn-primary-outline">
7620b30a
CW
28 {{:: ts('0 Displays') }}
29 </button>
102c400b 30 <button type="button" ng-if="search.display_name" class="btn btn-xs dropdown-toggle btn-primary-outline" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
7620b30a
CW
31 {{:: search.display_name.length === 1 ? ts('1 Display') : ts('%1 Displays', {1: search.display_name.length}) }} <span class="caret"></span>
32 </button>
33 <ul class="dropdown-menu" ng-if=":: search.display_name.length">
34 <li ng-repeat="display_name in search.display_name">
35 <a href="{{:: $ctrl.searchPath + '#/display/' + search.name + '/' + display_name }}"><i class="fa {{:: search.display_icon[$index] }}"></i> {{:: search.display_label[$index] }}</a>
36 </li>
37 </ul>
38 </div>
39 </td>
40 <td>{{ search.groups.join(', ') }}</td>
41 <td class="text-right">
b40e49df
CW
42 <a class="btn btn-xs btn-default" href="#/edit/{{:: search.id }}">{{:: ts('Edit') }}</a>
43 <a class="btn btn-xs btn-default" href="#/create/{{:: search.api_entity + '?params=' + $ctrl.encode(search.api_params) }}">{{:: ts('Clone') }}</a>
7620b30a 44 <a href class="btn btn-xs btn-danger" crm-confirm="{type: 'delete', obj: search}" on-yes="$ctrl.deleteSearch(search)">{{:: ts('Delete') }}</a>
475029f6
CW
45 </td>
46 </tr>
47 <tr ng-if="$ctrl.savedSearches.length === 0">
48 <td colspan="9">
49 <p class="messages status no-popup text-center">
50 {{:: ts('No saved searches.')}}
475029f6
CW
51 </p>
52 </td>
53 </tr>
54 </tbody>
55 </table>
56</div>