crmCxnManageCtrl - Display appId and appUrl
authorTim Otten <totten@civicrm.org>
Sat, 5 Dec 2015 21:43:36 +0000 (13:43 -0800)
committerTim Otten <totten@civicrm.org>
Sun, 6 Dec 2015 01:14:30 +0000 (17:14 -0800)
ang/crmCxn/AdvTable.html [new file with mode: 0644]
ang/crmCxn/AdvTable.js [new file with mode: 0644]
ang/crmCxn/ConfirmConnectCtrl.html
ang/crmCxn/ConfirmReconnectCtrl.html

diff --git a/ang/crmCxn/AdvTable.html b/ang/crmCxn/AdvTable.html
new file mode 100644 (file)
index 0000000..7080fdd
--- /dev/null
@@ -0,0 +1,18 @@
+<table>
+  <thead>
+  <tr>
+    <th>{{ts('Property')}}</th>
+    <th>{{ts('Value')}}</th>
+  </tr>
+  </thead>
+  <tbody>
+  <tr class="odd-row odd">
+    <td>App ID</td>
+    <td>{{appMeta.appId}}</td>
+  </tr>
+  <tr class="even-row even">
+    <td>App URL</td>
+    <td><code>{{appMeta.appUrl}}</code></td>
+  </tr>
+  </tbody>
+</table>
diff --git a/ang/crmCxn/AdvTable.js b/ang/crmCxn/AdvTable.js
new file mode 100644 (file)
index 0000000..3ea2bc3
--- /dev/null
@@ -0,0 +1,20 @@
+(function(angular, $, _) {
+
+  // This directive formats the data in appMeta as a nice table.
+  // example: <div crm-cxn-perm-table="{appMeta: cxn.app_meta}"></div>
+  angular.module('crmCxn').directive('crmCxnAdvTable', function crmCxnAdvTable() {
+    return {
+      restrict: 'EA',
+      scope: {
+        crmCxnAdvTable: '='
+      },
+      templateUrl: '~/crmCxn/AdvTable.html',
+      link: function(scope, element, attrs) {
+        scope.ts = CRM.ts(null);
+        scope.$watch('crmCxnAdvTable', function(crmCxnAdvTable){
+          scope.appMeta = crmCxnAdvTable.appMeta;
+        });
+      }
+    };
+  });
+})(angular, CRM.$, CRM._);
index 599be449ed6642982f82d0ac7954b615aede4d3a..eadee337aabade99f41e391ff0b2b65ebba97d6e 100644 (file)
@@ -9,4 +9,7 @@
   <div crm-ui-accordion="{title: ts('Permissions: Details'), collapsed: true}">
     <div crm-cxn-perm-table="{perm: appMeta.perm}"></div>
   </div>
+  <div crm-ui-accordion="{title: ts('Advanced'), collapsed: true}">
+    <div crm-cxn-adv-table="{appMeta: appMeta}"></div>
+  </div>
 </div>
index d9555d433995738d1053086de8da8260b822b39f..04f7252c6bf42e7955d9aa5f2dbcb20117770396 100644 (file)
@@ -15,4 +15,8 @@
   <div crm-ui-accordion="{title: ts('Permissions: Details'), collapsed: true}">
     <div crm-cxn-perm-table="{perm: cxn.app_meta.perm}"></div>
   </div>
+  <div crm-ui-accordion="{title: ts('Advanced'), collapsed: true}">
+    <div crm-cxn-adv-table="{appMeta: cxn.app_meta}"></div>
+  </div>
+
 </div>