summaryrefslogtreecommitdiff
path: root/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmCaseType/activityTypesTable.html
blob: a324f895f716ae1990f66a7df8d7bc6f23b6c228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!--
Controller: CaseTypeCtrl
Required vars: caseType
-->
<table class="row-highlight">
  <thead>
  <tr>
    <th></th>
    <th>{{ts('Activity Type')}}</th>
    <th>{{ts('Max Instances')}}</th>
    <th></th>
  </tr>
  </thead>

  <tbody ui-sortable ng-model="caseType.definition.activityTypes">
  <tr ng-repeat="activityType in caseType.definition.activityTypes">
    <td>
      <i class="crm-i fa-arrows grip-n-drag"></i>
    </td>
    <td>
      <i class="crm-i {{ activityTypes[activityType.name].icon }}"></i>
      {{ activityType.name }}
    </td>
    <td>
      <input class="crm-form-text number" type="text" ng-pattern="/^[1-9][0-9]*$/" ng-model="activityType.max_instances">
    </td>
    <td>
      <a crm-icon="fa-trash" class="crm-hover-button" ng-click="removeItem(caseType.definition.activityTypes, activityType)" title="{{ts('Remove')}}"></a>
    </td>
  </tr>
  </tbody>

  <tfoot>
  <tr class="addRow">
    <td></td>
    <td colspan="3">
      <span crm-add-name
           crm-options="activityTypeOptions"
           crm-var="newActivity"
           crm-on-add="addActivityType(newActivity)"
           placeholder="{{ts('Add activity type')}}"
      ></span>
    </td>
  </tr>
  </tfoot>
</table>