Merge pull request #10366 from JMAConsulting/CRM-20590
[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></th>
15 </tr>
16 </thead>
17
18 <tbody ui-sortable ng-model="activitySet.activityTypes">
19 <tr ng-repeat="activity in activitySet.activityTypes">
20 <td>
21 <i class="crm-i fa-arrows grip-n-drag"></i>
22 </td>
23 <td>
24 <i class="crm-i {{ activityTypes[activity.name].icon }}"></i>
25 {{ activity.label }}
26 </td>
27 <td>
28 <select
29 ui-jq="select2"
30 ui-options="{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 ui-jq="select2"
40 ui-options="{dropdownAutoWidth : true}"
41 ng-model="activity.reference_activity"
42 ng-options="activityType.name as activityType.label for activityType in activitySet.activityTypes"
43 ng-hide="activity.name == 'Open Case'"
44 ng-required="activity.name != 'Open Case'"
45 >
46 </select>
47 </td>
48 <td>
49 <input
50 class="number crm-form-text"
51 type="text"
52 ng-pattern="/^-?[0-9]*$/"
53 ng-model="activity.reference_offset"
54 ng-hide="activity.name == 'Open Case'"
55 ng-required="activity.name != 'Open Case'"
56 >
57 </td>
58 <td>
59 <select
60 ui-jq="select2"
61 ui-options="{dropdownAutoWidth : true}"
62 ng-model="activity.reference_select"
63 ng-options="key as value for (key,value) in {newest: ts('Newest'), oldest: ts('Oldest')}"
64 ng-hide="activity.name == 'Open Case'"
65 ng-required="activity.name != 'Open Case'"
66 >
67 </select>
68 </td>
69 <td>
70 <a class="crm-hover-button"
71 crm-icon="fa-trash"
72 ng-show="isActivityRemovable(activitySet, activity)"
73 ng-click="removeItem(activitySet.activityTypes, activity)"
74 title="{{ts('Remove')}}">
75 </a>
76 </td>
77 </tr>
78 </tbody>
79
80 <tfoot>
81 <tr class="addRow">
82 <td colspan="6">
83 <span crm-add-name=""
84 crm-options="activityTypeOptions"
85 crm-var="newActivity"
86 crm-on-add="addActivity(activitySet, newActivity)"
87 placeholder="{{ts('Add activity')}}"
88 ></span>
89 </td>
90 </tr>
91 </tfoot>
92 </table>