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 | ||
12 | <div ng-show="cxns.length > 0"> | |
13 | <span crm-ui-order="{var: 'cxnOrder', defaults: ['-created_date']}"></span> | |
14 | <h3>{{ts('Existing Connections')}}</h3> | |
15 | <table class="display"> | |
16 | <thead> | |
17 | <tr> | |
18 | <th>{{ts('Title')}}</th> <!-- <a crm-ui-order-by="[cxnOrder, 'app_meta.appId']"> --> | |
19 | <th>{{ts('Description')}}</th> <!-- <a crm-ui-order-by="[cxnOrder, 'desc']"> --> | |
20 | <th>{{ts('Status')}}</th> | |
21 | <th></th> | |
22 | </tr> | |
23 | </thead> | |
24 | <tbody> | |
25 | <tr ng-repeat="cxn in cxns | orderBy:cxnOrder.get()"> | |
26 | <td>{{cxn.app_meta.title}}</td> | |
27 | <td><div ng-bind-html="cxn.app_meta.desc"></div></td> | |
28 | <td>{{cxn.is_active ? ts('Enabled') : ts('Disabled')}}</td> | |
29 | <td> | |
30 | <!-- | |
31 | <a class="action-item crm-hover-button" ng-click="toggleCxn(cxn)">{{cxn.is_active ? ts('Disable') : ts('Enable') }}</a> | |
32 | --> | |
ac61750f TO |
33 | <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> |
34 | <a class="action-item crm-hover-button" ng-click="openLink(cxn.app_meta, 'logs', {title: ts('%1: Logs (External)', {1: cxn.app_meta.title})})" ng-show="cxn.app_meta.links.logs">{{ts('Logs')}}</a> | |
35 | <a class="action-item crm-hover-button" ng-click="openLink(cxn.app_meta, 'docs', {title: ts('%1: Documentation (External)', {1: cxn.app_meta.title})})" ng-show="cxn.app_meta.links.docs">{{ts('Docs')}}</a> | |
36 | <a class="action-item crm-hover-button" ng-click="openLink(cxn.app_meta, 'support', {title: ts('%1: Support (External)', {1: cxn.app_meta.title})})" ng-show="cxn.app_meta.links.support">{{ts('Support')}}</a> | |
098de400 TO |
37 | <a class="action-item crm-hover-button" |
38 | crm-confirm='{width: "65%", resizable: true, title: ts("Disconnect"), message: ts("Are you sure you want to disconnect \"%1?\". Doing so may permanently destroy data linkage.", {1: cxn.app_meta.title})}' | |
39 | on-yes="unregister(cxn.app_meta)" | |
40 | >{{ts('Disconnect')}}</a> | |
41 | </td> | |
42 | </tr> | |
43 | </tbody> | |
44 | </table> | |
45 | </div> | |
46 | ||
47 | <div ng-show="hasAvailApps()"> | |
48 | <span crm-ui-order="{var: 'availOrder', defaults: ['title']}"></span> | |
49 | ||
50 | <h3>{{ts('New Connections')}}</h3> | |
51 | <table class="display"> | |
52 | <thead> | |
53 | <tr> | |
54 | <th><a crm-ui-order-by="[availOrder, 'title']">{{ts('Title')}}</a></th> | |
55 | <th><a crm-ui-order-by="[availOrder, 'desc']">{{ts('Description')}}</a></th> | |
56 | <th></th> | |
57 | </tr> | |
58 | </thead> | |
59 | <tbody> | |
60 | <tr ng-repeat="appMeta in appMetas | orderBy:availOrder.get()" ng-show="!findCxnByAppId(appMeta.appId)"> | |
61 | <td>{{appMeta.title}}</td> | |
62 | <td><div ng-bind-html="appMeta.desc"></div></td> | |
63 | <td> | |
64 | <a class="action-item crm-hover-button" | |
65 | crm-confirm='{width: "65%", resizable: true, title:ts("Connect"), templateUrl: "~/crmCxn/ConfirmConnectCtrl.html", export: {appMeta: appMeta}}' | |
66 | on-yes="register(appMeta)" | |
67 | >{{ts('Connect')}}</a> | |
68 | </td> | |
69 | </tr> | |
70 | </tbody> | |
71 | </table> | |
72 | </div> | |
73 | ||
74 | <div ng-show="$.isEmptyObject(appMetas)" class="messages status no-popup"> | |
a9e74675 | 75 | <i class="crm-i fa-info-circle"></i> |
098de400 TO |
76 | {{ts('No available applications')}} |
77 | </div> |