| 1 | <!-- |
| 2 | Controller: CaseTypeCtrl |
| 3 | Required vars: caseType |
| 4 | --> |
| 5 | <table class="row-highlight"> |
| 6 | <thead> |
| 7 | <tr> |
| 8 | <th></th> |
| 9 | <th>{{:: ts('Activity Type') }}</th> |
| 10 | <th>{{:: ts('Max Instances') }}</th> |
| 11 | <th></th> |
| 12 | </tr> |
| 13 | </thead> |
| 14 | |
| 15 | <tbody ui-sortable ng-model="caseType.definition.activityTypes"> |
| 16 | <tr ng-repeat="activityType in caseType.definition.activityTypes"> |
| 17 | <td> |
| 18 | <i class="crm-i fa-arrows grip-n-drag" aria-hidden="true"></i> |
| 19 | </td> |
| 20 | <td> |
| 21 | <i class="crm-i {{ activityTypes[activityType.name].icon }}" aria-hidden="true"></i> |
| 22 | {{ activityTypes[activityType.name].label }} |
| 23 | </td> |
| 24 | <td> |
| 25 | <input class="crm-form-text number" type="text" ng-pattern="/^[1-9][0-9]*$/" ng-model="activityType.max_instances"> |
| 26 | </td> |
| 27 | <td> |
| 28 | <a crm-icon="fa-trash" class="crm-hover-button" ng-click="removeItem(caseType.definition.activityTypes, activityType)" title="{{:: ts('Remove') }}"></a> |
| 29 | </td> |
| 30 | </tr> |
| 31 | </tbody> |
| 32 | |
| 33 | <tfoot> |
| 34 | <tr class="addRow"> |
| 35 | <td></td> |
| 36 | <td colspan="3"> |
| 37 | <span crm-add-name |
| 38 | crm-options="activityTypeOptions" |
| 39 | crm-var="newActivity" |
| 40 | crm-on-add="addActivityType(newActivity)" |
| 41 | placeholder="{{:: ts('Add activity type') }}" |
| 42 | ></span> |
| 43 | </td> |
| 44 | </tr> |
| 45 | </tfoot> |
| 46 | </table> |