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