Merge pull request #10264 from jitendrapurohit/CRM-20171
[civicrm-core.git] / ang / crmCaseType / timelineTable.html
CommitLineData
4c58e251
TO
1<!--
2Controller: CaseTypeCtrl
3Required vars: activitySet
4-->
5<table>
6 <thead>
7 <tr>
4324b8d7 8 <th></th>
7abbf317
CW
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>
4c58e251
TO
14 <th></th>
15 </tr>
16 </thead>
17
c45daff0 18 <tbody ui-sortable ng-model="activitySet.activityTypes">
4c58e251
TO
19 <tr ng-repeat="activity in activitySet.activityTypes">
20 <td>
77ec5a8d 21 <i class="crm-i fa-arrows grip-n-drag"></i>
4324b8d7
CW
22 </td>
23 <td>
24 <i class="crm-i {{ activityTypes[activity.name].icon }}"></i>
be5aae33 25 {{ activity.label }}
4c58e251
TO
26 </td>
27 <td>
29d7a6e7 28 <select
a2e9f07c
TO
29 ui-jq="select2"
30 ui-options="{dropdownAutoWidth : true}"
29d7a6e7 31 ng-model="activity.status"
be5aae33 32 ng-options="actStatus.name as actStatus.label for actStatus in activityStatuses|orderBy:'label'"
29d7a6e7 33 >
24f6e9ac 34 <option value=""></option>
dc7a657e 35 </select>
4c58e251
TO
36 </td>
37 <td>
29d7a6e7 38 <select
a2e9f07c
TO
39 ui-jq="select2"
40 ui-options="{dropdownAutoWidth : true}"
29d7a6e7 41 ng-model="activity.reference_activity"
be5aae33 42 ng-options="activityType.name as activityType.label for activityType in activitySet.activityTypes"
29d7a6e7 43 ng-hide="activity.name == 'Open Case'"
773632ed 44 ng-required="activity.name != 'Open Case'"
29d7a6e7 45 >
dc7a657e 46 </select>
4c58e251
TO
47 </td>
48 <td>
29d7a6e7 49 <input
4324b8d7 50 class="number crm-form-text"
29d7a6e7 51 type="text"
ba0fd8dd 52 ng-pattern="/^-?[0-9]*$/"
29d7a6e7 53 ng-model="activity.reference_offset"
54 ng-hide="activity.name == 'Open Case'"
773632ed 55 ng-required="activity.name != 'Open Case'"
29d7a6e7 56 />
4c58e251
TO
57 </td>
58 <td>
29d7a6e7 59 <select
a2e9f07c
TO
60 ui-jq="select2"
61 ui-options="{dropdownAutoWidth : true}"
29d7a6e7 62 ng-model="activity.reference_select"
69ca66d2 63 ng-options="key as value for (key,value) in {newest: ts('Newest'), oldest: ts('Oldest')}"
29d7a6e7 64 ng-hide="activity.name == 'Open Case'"
773632ed 65 ng-required="activity.name != 'Open Case'"
29d7a6e7 66 >
dc7a657e 67 </select>
4c58e251
TO
68 </td>
69 <td>
259a7652 70 <a class="crm-hover-button"
77ec5a8d 71 crm-icon="fa-trash"
259a7652 72 ng-show="isActivityRemovable(activitySet, activity)"
3e5e512f 73 ng-click="removeItem(activitySet.activityTypes, activity)"
7abbf317 74 title="{{ts('Remove')}}">
059cd0c2 75 </a>
4c58e251
TO
76 </td>
77 </tr>
c45daff0
TO
78 </tbody>
79
80 <tfoot>
95fd24c0
TO
81 <tr class="addRow">
82 <td colspan="6">
8b3f1203 83 <span crm-add-name
4324b8d7 84 crm-options="activityTypeOptions"
95fd24c0
TO
85 crm-var="newActivity"
86 crm-on-add="addActivity(activitySet, newActivity)"
00eee619 87 placeholder="{{ts('Add activity')}}"
95fd24c0
TO
88 />
89 </td>
90 </tr>
c45daff0 91 </tfoot>
4c58e251 92</table>