Merge pull request #23881 from civicrm/5.51
[civicrm-core.git] / ang / crmCaseType / timelineTable.html
1 <!--
2 Controller: CaseTypeCtrl
3 Required vars: activitySet
4 -->
5 <table>
6 <thead>
7 <tr>
8 <th></th>
9 <th>{{:: ts('Activity') }}</th>
10 <th>{{:: ts('Status') }}</th>
11 <th>{{:: ts('Reference') }}</th>
12 <th>{{:: ts('Offset') }}</th>
13 <th>{{:: ts('Select') }}</th>
14 <th>{{:: ts('Default assignee') }}</th>
15 <th></th>
16 </tr>
17 </thead>
18
19 <tbody ui-sortable ng-model="activitySet.activityTypes">
20 <tr ng-repeat="activity in activitySet.activityTypes">
21 <td>
22 <i class="crm-i fa-arrows grip-n-drag" aria-hidden="true"></i>
23 </td>
24 <td>
25 <i class="crm-i {{activityTypes[activity.name].icon}}" aria-hidden="true"></i>
26 {{activity.label}}
27 </td>
28 <td>
29 <select
30 crm-ui-select="{dropdownAutoWidth: true}"
31 ng-model="activity.status"
32 ng-options="actStatus.name as actStatus.label for actStatus in activityStatuses|orderBy:'label'"
33 >
34 <option value=""></option>
35 </select>
36 </td>
37 <td>
38 <select
39 crm-ui-select="{dropdownAutoWidth: true}"
40 ng-model="activity.reference_activity"
41 ng-options="activityType.name as activityType.label for activityType in caseType.definition.timelineActivityTypes"
42 >
43 <option value="">-- Case Start --</option>
44 </select>
45 </td>
46 <td>
47 <input
48 class="number crm-form-text"
49 type="text"
50 ng-pattern="/^-?[0-9]*$/"
51 ng-model="activity.reference_offset"
52 >
53 </td>
54 <td>
55 <select
56 crm-ui-select="{dropdownAutoWidth: true}"
57 ng-model="activity.reference_select"
58 ng-options="key as value for (key,value) in {newest: ts('Newest'), oldest: ts('Oldest')}"
59 >
60 </select>
61 </td>
62 <td>
63 <select
64 crm-ui-select="{dropdownAutoWidth: true}"
65 ng-model="activity.default_assignee_type"
66 ng-options="option.value as option.label for option in defaultAssigneeTypes"
67 ng-change="clearActivityDefaultAssigneeValues(activity)"
68 ></select>
69
70 <p ng-if="activity.default_assignee_type === defaultAssigneeTypeValues.BY_RELATIONSHIP">
71 <select
72 crm-ui-select="{dropdownAutoWidth: true}"
73 ng-model="activity.default_assignee_relationship"
74 ng-options="option.id as option.text for option in relationshipTypeOptions"
75 required
76 ></select>
77 </p>
78
79 <p ng-if="activity.default_assignee_type === defaultAssigneeTypeValues.SPECIFIC_CONTACT">
80 <input
81 type="text"
82 ng-model="activity.default_assignee_contact"
83 placeholder="- Select contact -"
84 crm-entityref="{ entity: 'Contact' }"
85 data-create-links="true"
86 required />
87 </p>
88 </td>
89 <td>
90 <a class="crm-hover-button"
91 crm-icon="fa-trash"
92 ng-show="isActivityRemovable(activitySet, activity)"
93 ng-click="removeItem(activitySet.activityTypes, activity)"
94 title="{{:: ts('Remove') }}">
95 </a>
96 </td>
97 </tr>
98 </tbody>
99
100 <tfoot>
101 <tr class="addRow">
102 <td colspan="8">
103 <span crm-add-name=""
104 crm-options="activityTypeOptions"
105 crm-var="newActivity"
106 crm-on-add="addActivity(activitySet, newActivity)"
107 placeholder="{{:: ts('Add activity') }}"
108 ></span>
109 </td>
110 </tr>
111 </tfoot>
112 </table>