| 1 | <!-- |
| 2 | Controller: ABListingCtrl |
| 3 | Required vars: mailingABList |
| 4 | --> |
| 5 | |
| 6 | <span crm-ui-order="{var: 'myOrder', defaults: ['-created_date']}"></span> |
| 7 | |
| 8 | <div crm-ui-accordion="{title: ts('Filter'), collapsed: true}"> |
| 9 | <form name="filterForm"> |
| 10 | <span> |
| 11 | <input class="big crm-form-text" ng-model="filter.name" placeholder="{{ts('Name')}}"/> |
| 12 | </span> |
| 13 | <span> |
| 14 | <select crm-ui-select style="width: 10em;" ng-model="filter.status"> |
| 15 | <option value="">{{ts('- Status -')}}</option> |
| 16 | <option ng-repeat="o in fields.status.options" ng-value="o.key">{{o.value}}</option> |
| 17 | </select> |
| 18 | </span> |
| 19 | <span> |
| 20 | <select crm-ui-select style="width: 20em;" ng-model="filter.testing_criteria"> |
| 21 | <option value="">{{ts('- Test Type -')}}</option> |
| 22 | <option ng-repeat="o in fields.testing_criteria.options" ng-value="o.key">{{o.value}}</option> |
| 23 | </select> |
| 24 | </span> |
| 25 | </form> |
| 26 | </div> |
| 27 | |
| 28 | <div ng-show="mailingABList.length"> |
| 29 | <table class="display"> |
| 30 | <thead> |
| 31 | <tr> |
| 32 | <th><a crm-ui-order-by="[myOrder, 'name']">{{ts('Name')}}</a></th> |
| 33 | <th><a crm-ui-order-by="[myOrder, 'status']">{{ts('Status')}}</a></th> |
| 34 | <th><a crm-ui-order-by="[myOrder, 'testing_criteria']">{{ts('Test Type')}}</a></th> |
| 35 | <th><a crm-ui-order-by="[myOrder, 'created_date']">{{ts('Created')}}</a></th> |
| 36 | <th></th> |
| 37 | </tr> |
| 38 | </thead> |
| 39 | <tbody> |
| 40 | <tr ng-repeat="mailingAB in mailingABList | filter:filter | orderBy:myOrder.get()"> |
| 41 | <td>{{mailingAB.name}}</td> |
| 42 | <td>{{crmMailingABStatus.getByName(mailingAB.status).label}}</td> |
| 43 | <td>{{crmMailingABCriteria.get(mailingAB.testing_criteria).label}}</td> |
| 44 | <td>{{mailingAB.created_date}}</td> |
| 45 | <td> |
| 46 | <a class="action-item crm-hover-button" ng-href="#/abtest/{{mailingAB.id}}" ng-show="mailingAB.status == 'Draft'">{{ts('Continue')}}</a> |
| 47 | <a class="action-item crm-hover-button" ng-href="#/abtest/{{mailingAB.id}}" ng-show="mailingAB.status != 'Draft'">{{ts('Results')}}</a> |
| 48 | </td> |
| 49 | </tr> |
| 50 | </tbody> |
| 51 | </table> |
| 52 | </div> |
| 53 | |
| 54 | <div ng-show="mailingABList.length === 0" class="messages status no-popup"> |
| 55 | <i class="crm-i fa-info-circle"></i> |
| 56 | {{ts('You have no A/B mailings')}} |
| 57 | </div> |
| 58 | |
| 59 | |
| 60 | <div class="crm-submit-buttons"> |
| 61 | <br> |
| 62 | <a ng-href="#/abtest/new" class="button"><span><i class="crm-i fa-bar-chart"></i> {{ts('New A/B Test')}}</span></a> |
| 63 | </div> |