crmMailingAB - report.html - Display placeholder column for the final mailing
authorTim Otten <totten@civicrm.org>
Thu, 19 Feb 2015 22:43:45 +0000 (14:43 -0800)
committerTim Otten <totten@civicrm.org>
Thu, 19 Feb 2015 23:04:08 +0000 (15:04 -0800)
This provides some continuity between the appearance during testing and
after testing. It also emphasizes that there's a gap -- that the user
has not yet made a choice.

js/angular-crmMailingAB.js
partials/crmMailingAB/report.html

index 0dd847c3105e6279eee40dba2c8a4e9b43a57791..cf48eb372f861aac5a1bec58552732c34c9522dd 100644 (file)
@@ -74,7 +74,7 @@
     $scope.sync = function sync() {
       abtest.mailings.a.name = ts('Test A (%1)', {1: abtest.ab.name});
       abtest.mailings.b.name = ts('Test B (%1)', {1: abtest.ab.name});
-      abtest.mailings.c.name = ts('Winner (%1)', {1: abtest.ab.name});
+      abtest.mailings.c.name = ts('Final (%1)', {1: abtest.ab.name});
 
       if (abtest.ab.testing_criteria) {
         // TODO review fields exposed in UI and make sure the sync rules match
       };
       var options = CRM.utils.adjustDialogDefaults({
         autoOpen: false,
-        title: ts('Select Winner (%1)', {
+        title: ts('Select Final Mailing (Test %1)', {
           1: mailingName.toUpperCase()
         })
       });
       // need to be registered with the dialog widget (and not embedded in
       // the body of the dialog).
       var buttons = {};
-      buttons[ts('Select Winner')] = function () {
+      buttons[ts('Submit final mailing')] = function () {
         crmMailingMgr.mergeInto(abtest.mailings.c, abtest.mailings[mailingName], [
           'name',
           'recipients',
index 1c50ac719979ee96adebd2eb578218d90ef005ba..3e50eaf94edda5d31d22be3406ba6bae9335e7b0 100644 (file)
@@ -7,8 +7,9 @@
     <tr ng-show="abtest.ab.status == 'Testing'">
       <td></td>
       <td ng-repeat="am in getActiveMailings()">
-        <button ng-click="selectWinner(am.name)">{{ts('Select as Winner')}}</button>
+        <button ng-click="selectWinner(am.name)">{{ts('Select as Final')}}</button>
       </td>
+      <td></td>
     </tr>
     </thead>
 
@@ -16,6 +17,7 @@
     <tr>
       <th>{{ts('Delivery')}}</th>
       <th ng-repeat="am in getActiveMailings()" class="crm-mailing-ab-col">{{am.title}}</th>
+      <th ng-show="abtest.ab.status == 'Testing'">{{ts('Final')}}</th>
     </tr>
     </thead>
 
       <td ng-repeat="am in getActiveMailings()">
         <span ng-repeat="job in am.mailing.jobs" ng-hide="job.is_test == 1 || job.parent_id != null">{{job.status}}</span>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'">{{ts('Not selected')}}</td>
     </tr>
     <tr>
       <td>{{ts('Scheduled')}}</td>
       <td ng-repeat="am in getActiveMailings()">
         <div ng-repeat="job in am.mailing.jobs" ng-hide="job.is_test == 1 || job.parent_id != null">{{job.scheduled_date}}</div>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('Started at')}}</td>
       <td ng-repeat="am in getActiveMailings()">
         <div ng-repeat="job in am.mailing.jobs" ng-hide="job.is_test == 1 || job.parent_id != null">{{job.start_date || ts('Not started')}}</div>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('Completed at')}}</td>
       <td ng-repeat="am in getActiveMailings()">
         <div ng-repeat="job in am.mailing.jobs" ng-hide="job.is_test == 1 || job.parent_id != null">{{job.end_date || ts('Not completed')}}</div>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     </tbody>
 
@@ -50,6 +56,7 @@
     <tr>
       <th>{{ts('Performance')}}</th>
       <th ng-repeat="am in getActiveMailings()" class="crm-mailing-ab-col">{{am.title}}</th>
+      <th ng-show="abtest.ab.status == 'Testing'">{{ts('Final')}}</th>
     </tr>
     </thead>
     <tbody>
@@ -69,6 +76,7 @@
           title="{{ts('Browse events of type \'%1\'', {1: statType.title})}}"
           >{{stats[am.name][statType.name] || ts('n/a')}}</a>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     </tbody>
 
@@ -76,6 +84,7 @@
     <tr>
       <th>{{ts('Details')}}</th>
       <th ng-repeat="am in getActiveMailings()" class="crm-mailing-ab-col">{{am.title}}</th>
+      <th ng-show="abtest.ab.status == 'Testing'">{{ts('Final')}}</th>
     </tr>
     </thead>
 
       <td ng-repeat="am in getActiveMailings()">
         {{am.mailing.name}}
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('From')}}</td>
       <td ng-repeat="am in getActiveMailings()">
         "{{am.mailing.from_name}}" &lt;{{am.mailing.from_email}}&gt;
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('Subject')}}</td>
       <td ng-repeat="am in getActiveMailings()">
         {{am.mailing.subject}}
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr ng-controller="ViewRecipCtrl">
       <td>{{ts('Recipients')}}</td>
           <strong>{{ts('Exclude:')}}</strong> <s>{{getExcludesAsString(am.mailing)}}</s>
         </div>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('Content')}}</td>
         <a crm-icon="newwin" class="crm-hover-button action-item" ng-click="previewMailing(am.name,'html')" ng-show="am.mailing.body_html">{{ts('HTML')}}</a>
         <a crm-icon="newwin" class="crm-hover-button action-item" ng-click="previewMailing(am.name,'text')" ng-show="am.mailing.body_text">{{ts('Text')}}</a>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('Attachments')}}</td>
       <td ng-repeat="am in getActiveMailings()">
         <div ng-repeat="file in am.attachments.files"><a ng-href="{{file.url}}" target="_blank">{{file.name}}</a></div>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('Tracking')}}</td>
         <div crm-mailing-review-bool crm-on="am.mailing.url_tracking=='1'" crm-title="ts('Click Throughs')"></div>
         <div crm-mailing-review-bool crm-on="am.mailing.open_tracking=='1'" crm-title="ts('Opens')"></div>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('Responding')}}</td>
           <div><a crm-icon="newwin" class="crm-hover-button action-item" ng-click="previewComponent(ts('Unsubscribe'), am.mailing.unsubscribe_id)">{{ts('Unsubscribe')}}</a></div>
         </div>
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     <tr>
       <td>{{ts('Publication')}}</td>
       <td ng-repeat="am in getActiveMailings()">
         {{am.mailing.visibility}}
       </td>
+      <td ng-show="abtest.ab.status == 'Testing'"></td>
     </tr>
     </tbody>