blob: a9caecc34a2e12c3f110249468106327fa53446d (
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
<!--
Controller: CaseTypeListsCtrl
Required vars: caseTypes
-->
<h1 crm-page-title>{{ts('Case Types')}}</h1>
<div class="help">
{{ts('A Case Type describes a group of related tasks, interactions, or processes.')}}
</div>
<div class="crm-content-block crm-block">
<table class="display">
<thead>
<tr>
<th>{{ts('Title')}}</th>
<th>{{ts('Name')}}</th>
<th>{{ts('Description')}}</th>
<th>{{ts('Enabled?')}}</th>
<th></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="caseType in caseTypes"
class="crm-entity"
ng-class-even="'even-row even'"
ng-class-odd="'odd-row odd'"
ng-class="{disabled: 0==caseType.is_active, forked: 1==caseType.is_forked}">
<td>{{caseType.title}}</td>
<td>{{caseType.name}}</td>
<td>{{caseType.description}}</td>
<td>{{caseType.is_active == 1 ? ts('Yes') : ts('No')}}</td>
<!-- FIXME: Can't figure out how styling in other tables gets the nowrap effect... in absence of a consistent fix, KISS -->
<td style="white-space: nowrap">
<span>
<a class="action-item crm-hover-button" ng-href="#/caseType/{{caseType.id}}">{{ts('Edit')}}</a>
<span class="btn-slide crm-hover-button" ng-show="!caseType.is_reserved || (!caseType.is_active || caseType.is_forked)">
{{ts('more')}}
<ul class="panel" style="display: none;">
<li ng-hide="caseType.is_active">
<a class="action-item crm-hover-button" ng-click="toggleCaseType(caseType)">
{{ts('Enable')}}
</a>
</li>
<li ng-show="caseType.is_active && !caseType.is_reserved">
<a class="action-item crm-hover-button"
crm-confirm="{type: 'disable', obj: caseType}"
on-yes="toggleCaseType(caseType)">
{{ts('Disable')}}
</a>
</li>
<li ng-show="caseType.is_forked">
<a class="action-item crm-hover-button"
crm-confirm="{type: 'revert', obj: caseType}"
on-yes="revertCaseType(caseType)">
{{ts('Revert')}}
</a>
</li>
<li ng-show="!caseType.is_reserved">
<a class="action-item crm-hover-button"
crm-confirm="{type: 'delete', obj: caseType}"
on-yes="deleteCaseType(caseType)">
{{ts('Delete')}}
</a>
</li>
</ul>
</span>
</span>
</td>
</tr>
</tbody>
</table>
<div class="crm-submit-buttons">
<a ng-href="#/caseType/new" class="button"><span><i class="crm-i fa-plus-circle"></i> {{ts('New Case Type')}}</span></a>
</div>
</div>
|