Shift to Angular promise version as per advice from totten
[civicrm-core.git] / ang / crmCaseType / timelineTable.html
1 <!--
2 Controller: CaseTypeCtrl
3 Required vars: activitySet
4 -->
5 <table>
6 <thead>
7 <tr>
8 <th>{{ts('Activity')}}</th>
9 <th>{{ts('Status')}}</th>
10 <th>{{ts('Reference')}}</th>
11 <th>{{ts('Offset')}}</th>
12 <th>{{ts('Select')}}</th>
13 <th></th>
14 </tr>
15 </thead>
16
17 <tbody ui-sortable ng-model="activitySet.activityTypes">
18 <tr ng-repeat="activity in activitySet.activityTypes">
19 <td>
20 <span class="icon ui-icon-grip-dotted-vertical"></span>
21 {{ activity.name }}
22 </td>
23 <td>
24 <select
25 ui-jq="select2"
26 ui-options="{dropdownAutoWidth : true}"
27 ng-model="activity.status"
28 ng-options="actStatus.name as actStatus.name for actStatus in activityStatuses|orderBy:'name'"
29 >
30 <option value=""></option>
31 </select>
32 </td>
33 <td>
34 <select
35 ui-jq="select2"
36 ui-options="{dropdownAutoWidth : true}"
37 ng-model="activity.reference_activity"
38 ng-options="actTypeName as actTypeName for actTypeName in activityTypeNames"
39 ng-hide="activity.name == 'Open Case'"
40 ng-required="activity.name != 'Open Case'"
41 >
42 </select>
43 </td>
44 <td>
45 <input
46 class="number"
47 type="text"
48 ng-pattern="/^-?[0-9]*$/"
49 ng-model="activity.reference_offset"
50 ng-hide="activity.name == 'Open Case'"
51 ng-required="activity.name != 'Open Case'"
52 />
53 </td>
54 <td>
55 <select
56 ui-jq="select2"
57 ui-options="{dropdownAutoWidth : true}"
58 ng-model="activity.reference_select"
59 ng-options="key as value for (key,value) in {newest: 'Newest', oldest: 'Oldest'}"
60 ng-hide="activity.name == 'Open Case'"
61 ng-required="activity.name != 'Open Case'"
62 >
63 </select>
64 </td>
65 <td>
66 <a class="crm-hover-button"
67 crm-icon="trash"
68 ng-show="isActivityRemovable(activitySet, activity)"
69 ng-click="removeItem(activitySet.activityTypes, activity)"
70 title="{{ts('Remove')}}">
71 </a>
72 </td>
73 </tr>
74 </tbody>
75
76 <tfoot>
77 <tr class="addRow">
78 <td colspan="6">
79 <span crm-add-name
80 crm-options="activityTypeNames"
81 crm-var="newActivity"
82 crm-on-add="addActivity(activitySet, newActivity)"
83 placeholder="{{ts('Add activity')}}"
84 />
85 </td>
86 </tr>
87 </tfoot>
88 </table>