Commit | Line | Data |
---|---|---|
daa4e55a CW |
1 | <table> |
2 | <thead> | |
3 | <tr> | |
4 | <th class="crm-search-admin-icon-col"></th> | |
5 | <th class="crm-search-admin-icon-col">{{:: ts('Icon') }}</th> | |
2dbf2d72 | 6 | <th>{{:: ts('Open') }}</th> |
daa4e55a CW |
7 | <th>{{:: ts('Text') }}</th> |
8 | <th>{{:: ts('Link') }}</th> | |
9 | <th>{{:: ts('Style') }}</th> | |
10 | <th class="crm-search-admin-icon-col"></th> | |
11 | </tr> | |
12 | </thead> | |
13 | <tbody ui-sortable="$ctrl.sortableOptions" ng-model="$ctrl.group"> | |
e633ddec | 14 | <tr ng-repeat="item in $ctrl.group" class="crm-draggable"> |
daa4e55a | 15 | <td class="crm-search-admin-icon-col"> |
e633ddec | 16 | <i class="crm-i fa-arrows crm-search-move-icon"></i> |
daa4e55a CW |
17 | </td> |
18 | <td class="crm-search-admin-icon-col"> | |
19 | <span class="crm-editable-enabled" ng-click="pickIcon($index)"> | |
2dbf2d72 | 20 | <i class="{{ item.icon ? 'crm-i ' + item.icon : '' }}" style="opacity: 1"></i> |
daa4e55a CW |
21 | </span> |
22 | </td> | |
2dbf2d72 CW |
23 | <td> |
24 | <select class="form-control" ng-model="item.target"> | |
25 | <option value>{{:: ts('Normal') }}</option> | |
26 | <option value="_blank">{{:: ts('New tab') }}</option> | |
27 | <option value="crm-popup">{{:: ts('Popup dialog') }}</option> | |
28 | </select> | |
29 | </td> | |
daa4e55a CW |
30 | <td> |
31 | <input type="text" class="form-control" ng-model="item.text"> | |
32 | </td> | |
33 | <td class="form-inline"> | |
2dbf2d72 | 34 | <crm-search-admin-link-select api-entity="$ctrl.apiEntity" api-params="$ctrl.apiParams" link="item" links="$ctrl.links"></crm-search-admin-link-select> |
daa4e55a | 35 | </td> |
2dbf2d72 CW |
36 | <td> |
37 | <div class="btn-group"> | |
38 | <button type="button" style="min-width: 85px" class="btn btn-{{ item.style }} dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> | |
39 | {{ $ctrl.getStyle(item).value }} <span class="caret"></span> | |
40 | </button> | |
41 | <ul class="dropdown-menu dropdown-menu-right"> | |
42 | <li ng-repeat="opt in $ctrl.styles"> | |
43 | <a href class="bg-{{:: opt.key }}" ng-click="item.style = opt.key">{{:: opt.value }}</a> | |
44 | </li> | |
45 | </ul> | |
46 | </div> | |
daa4e55a CW |
47 | </td> |
48 | <td class="crm-search-admin-icon-col"> | |
49 | <button ng-if="$ctrl.group.length > 1" type="button" class="btn btn-xs btn-danger-outline" ng-click="$ctrl.group.splice($index, 1)"> | |
50 | <i class="crm-i fa-times"></i> | |
51 | </button> | |
52 | </td> | |
53 | </tr> | |
54 | </tbody> | |
55 | <tfoot> | |
56 | <tr> | |
57 | <td colspan="6" class="form-inline"> | |
2dbf2d72 | 58 | <select class="form-control crm-search-admin-add-link" ng-show="$ctrl.links.length"> |
daa4e55a CW |
59 | <option value=""> |
60 | + {{:: ts('Add...') }} | |
61 | </option> | |
62 | <option ng-repeat="link in $ctrl.links" value="{{ link.path }}"> | |
63 | {{ link.title }} | |
64 | </option> | |
65 | <option value="civicrm/"> | |
66 | {{:: ts('Other...') }} | |
67 | </option> | |
68 | </select> | |
69 | </td> | |
70 | </tr> | |
71 | </tfoot> | |
72 | </table> |