abtesting/list.html - Added a new column that shows the AB mailing type
authorVitor <vitor@futurefirst.org.uk>
Tue, 30 Sep 2014 11:21:44 +0000 (12:21 +0100)
committerVitor <vitor@futurefirst.org.uk>
Tue, 30 Sep 2014 11:21:44 +0000 (12:21 +0100)
js/angular-crmMailingAB.js
partials/abtesting/list.html

index 93c57a8d5bdf2cc9836d0447721fb81ec455dd65..476625731cb94461c77d5b744473b0b09220e128 100755 (executable)
   // Ex: <crmAddName crm-options="['Alpha','Beta','Gamma']" crm-var="newItem" crm-on-add="callMyCreateFunction(newItem)" />
   crmMailingAB.controller('ABListingCtrl', function ($scope, crmApi,mailingABList) {
     $scope.mailingABList = mailingABList.values;
+    $scope.testing_criteria = {
+      '1': "Subject lines",
+      '2': "From names",
+      '3': "Two different emails"
+    };
   });
 
   crmMailingAB.controller('ReportCtrl', function ($scope, crmApi, selectedABTest,$location) {
index 2bbf187342ea1d1450d804066fa92552e0459709..6afd2ae78e5fdac984a42a80bfb448daf32089e6 100755 (executable)
@@ -12,17 +12,19 @@ Required vars: mailingABList
     <tr>
       <th>Title</th>
       <th>Id</th>
+      <th>Test Type</th>
       <th></th>
 
       <th></th>
     </tr>
     </thead>
     <tbody>
-    <tr ng-repeat="ab in mailingABList">
-      <td>{{ab.name}}</td>
-      <td>{{ab.id}}</td>
-      <td><a class="action-item crm-hover-button" ng-href="#/mailing/abtesting/{{ab.id}}">Edit</a>&nbsp
-      <a class="action-item crm-hover-button" ng-href="#/mailing/abtesting/report/{{ab.id}}">Results</a></td>
+    <tr ng-repeat="mailingAB in mailingABList">
+      <td>{{mailingAB.name}}</td>
+      <td>{{mailingAB.id}}</td>
+      <td>{{testing_criteria[mailingAB.testing_criteria_id]}}</td>
+      <td><a class="action-item crm-hover-button" ng-href="#/mailing/abtesting/{{mailingAB.id}}">Edit</a>&nbsp
+      <a class="action-item crm-hover-button" ng-href="#/mailing/abtesting/report/{{mailingAB.id}}">Results</a></td>
 
     </tr>
     </tbody>