Commit | Line | Data |
---|---|---|
098de400 TO |
1 | <div crm-ui-debug="appMetas"></div> |
2 | <div crm-ui-debug="cxns"></div> | |
3 | <div crm-ui-debug="alerts"></div> | |
4 | ||
5 | <!-- | |
6 | The merits of this layout: | |
7 | * On a fresh install, the available connections show up first. | |
8 | * Once you've made a connection, the extant connections bubble up. | |
9 | * Extant connections can be portrayed as enabled or disabled. | |
10 | --> | |
11 | ||
fbd5e026 | 12 | <div class="help"> |
f9c5f498 | 13 | <p>{{:: ts('Connections provide a simplified way to link your CiviCRM installation to an external service.') }}</p> |
fbd5e026 C |
14 | </div> |
15 | ||
098de400 TO |
16 | <div ng-show="cxns.length > 0"> |
17 | <span crm-ui-order="{var: 'cxnOrder', defaults: ['-created_date']}"></span> | |
f9c5f498 | 18 | <h3>{{:: ts('Existing Connections') }}</h3> |
098de400 TO |
19 | <table class="display"> |
20 | <thead> | |
21 | <tr> | |
f9c5f498 CW |
22 | <th>{{:: ts('Title') }}</th> <!-- <a crm-ui-order-by="[cxnOrder, 'app_meta.appId']"> --> |
23 | <th>{{:: ts('Description') }}</th> <!-- <a crm-ui-order-by="[cxnOrder, 'desc']"> --> | |
24 | <th>{{:: ts('Status') }}</th> | |
098de400 TO |
25 | <th></th> |
26 | </tr> | |
27 | </thead> | |
28 | <tbody> | |
6f50787b | 29 | <tr ng-repeat="cxn in cxns | orderBy:cxnOrder.get()" ng-class-even="'even-row even'" ng-class-odd="'odd-row odd'"> |
9896e1aa TO |
30 | <td> |
31 | <a class="action-item" | |
32 | crm-confirm='{width: "65%", resizable: true, title:ts("%1: About", {1: cxn.app_meta.title}), templateUrl: "~/crmCxn/AboutCtrl.html", export: {appMeta: cxn.app_meta}}' | |
33 | >{{cxn.app_meta.title}}</a> | |
34 | </td> | |
098de400 | 35 | <td><div ng-bind-html="cxn.app_meta.desc"></div></td> |
e3c37dee | 36 | <td>{{cxn.is_active=="1" ? ts('Enabled') : ts('Disabled')}}</td> |
098de400 | 37 | <td> |
6f50787b | 38 | <span> |
f9c5f498 CW |
39 | <a class="action-item crm-hover-button" ng-click="openLink(cxn.app_meta, 'settings', {title: ts('%1: Settings (External)', {1: cxn.app_meta.title})})" ng-show="cxn.app_meta.links.settings">{{:: ts('Settings') }}</a> |
40 | <span class="btn-slide crm-hover-button">{{:: ts('more') }} | |
6f50787b TO |
41 | <ul class="panel" style="display: none;"> |
42 | <li ng-show="cxn.app_meta.links.logs"> | |
43 | <a class="action-item crm-hover-button" ng-click="openLink(cxn.app_meta, 'logs', {title: ts('%1: Logs (External)', {1: cxn.app_meta.title})})"> | |
f9c5f498 | 44 | {{:: ts('Logs') }} |
6f50787b TO |
45 | </a> |
46 | </li> | |
47 | <li ng-show="cxn.app_meta.links.docs"> | |
48 | <a class="action-item crm-hover-button" ng-click="openLink(cxn.app_meta, 'docs', {title: ts('%1: Documentation (External)', {1: cxn.app_meta.title})})"> | |
f9c5f498 | 49 | {{:: ts('Docs') }} |
6f50787b TO |
50 | </a> |
51 | </li> | |
52 | <li ng-show="cxn.app_meta.links.support"> | |
53 | <a class="action-item crm-hover-button" ng-click="openLink(cxn.app_meta, 'support', {title: ts('%1: Support (External)', {1: cxn.app_meta.title})})"> | |
f9c5f498 | 54 | {{:: ts('Support') }} |
6f50787b TO |
55 | </a> |
56 | </li> | |
e3c37dee C |
57 | <li> |
58 | <a class="action-item crm-hover-button" ng-click="toggleCxn(cxn)">{{ cxn.is_active=="1" ? ts('Disable') : ts('Enable')}}</a> | |
59 | </li> | |
e7041933 TO |
60 | <li> |
61 | <a class="action-item crm-hover-button" | |
ce8eaaea | 62 | crm-confirm='{width: "65%", resizable: true, title:ts("%1: Reconnect", {1: cxn.app_meta.title}), templateUrl: "~/crmCxn/ConfirmReconnectCtrl.html", export: {cxn: cxn, appMeta: findAppByAppId(cxn.app_guid)}}' |
e7041933 | 63 | on-yes="reregister(cxn.app_meta)" |
f9c5f498 | 64 | >{{:: ts('Reconnect') }}</a> |
e7041933 | 65 | </li> |
6f50787b TO |
66 | <li> |
67 | <a class="action-item crm-hover-button" | |
da945809 | 68 | crm-confirm='{width: "65%", resizable: true, title: ts("%1: Disconnect", {1: cxn.app_meta.title}), message: ts("Are you sure you want to disconnect \"%1?\". Doing so may permanently destroy data linkage.", {1: cxn.app_meta.title})}' |
6f50787b | 69 | on-yes="unregister(cxn.app_meta)"> |
f9c5f498 | 70 | {{:: ts('Disconnect') }} |
6f50787b TO |
71 | </a> |
72 | </li> | |
73 | </ul> | |
74 | </span> | |
75 | ||
76 | </span> | |
098de400 TO |
77 | </td> |
78 | </tr> | |
79 | </tbody> | |
80 | </table> | |
6f50787b | 81 | <br/> |
098de400 TO |
82 | </div> |
83 | ||
84 | <div ng-show="hasAvailApps()"> | |
85 | <span crm-ui-order="{var: 'availOrder', defaults: ['title']}"></span> | |
86 | ||
036aa39d | 87 | <div class="crm-content-block crm-block crm-connection-block"> |
f9c5f498 | 88 | <h3>{{:: ts('New Connections') }}</h3> |
098de400 TO |
89 | <table class="display"> |
90 | <thead> | |
91 | <tr> | |
f9c5f498 CW |
92 | <th><a crm-ui-order-by="[availOrder, 'title']">{{:: ts('Title') }}</a></th> |
93 | <th><a crm-ui-order-by="[availOrder, 'desc']">{{:: ts('Description') }}</a></th> | |
098de400 TO |
94 | <th></th> |
95 | </tr> | |
96 | </thead> | |
97 | <tbody> | |
cf73fb00 | 98 | <tr ng-repeat="appMeta in appMetas | orderBy:availOrder.get()" ng-show="!findCxnByAppId(appMeta.appId)" ng-class-even="'even-row even'" ng-class-odd="'odd-row odd'"> |
9896e1aa TO |
99 | <td> |
100 | <a crm-confirm='{width: "65%", resizable: true, title:ts("%1: About", {1: appMeta.title}), templateUrl: "~/crmCxn/AboutCtrl.html", export: {appMeta: appMeta}}' | |
101 | >{{appMeta.title}}</a> | |
102 | </td> | |
098de400 TO |
103 | <td><div ng-bind-html="appMeta.desc"></div></td> |
104 | <td> | |
105 | <a class="action-item crm-hover-button" | |
da945809 | 106 | crm-confirm='{width: "65%", resizable: true, title:ts("%1: Connect", {1: appMeta.title}), templateUrl: "~/crmCxn/ConfirmConnectCtrl.html", export: {appMeta: appMeta}}' |
098de400 | 107 | on-yes="register(appMeta)" |
f9c5f498 | 108 | >{{:: ts('Connect') }}</a> |
098de400 TO |
109 | </td> |
110 | </tr> | |
111 | </tbody> | |
112 | </table> | |
113 | </div> | |
114 | ||
036aa39d MR |
115 | </div> |
116 | ||
e829aa6b | 117 | <div ng-show="appMetas.length === 0" class="messages status no-popup"> |
13a3d214 | 118 | <i class="crm-i fa-info-circle" aria-hidden="true"></i> |
f9c5f498 | 119 | {{:: ts('No available applications') }} |
098de400 | 120 | </div> |