Merge pull request #16085 from seamuslee001/dev_core_1466
[civicrm-core.git] / ang / crmCaseType / list.html
1 <!--
2 Controller: CaseTypeListsCtrl
3 Required vars: caseTypes
4 -->
5 <h1 crm-page-title>{{ts('Case Types')}}</h1>
6
7 <div class="help">
8 {{ts('A Case Type describes a group of related tasks, interactions, or processes.')}}
9 </div>
10
11 <div class="crm-content-block crm-block">
12
13 <table class="display">
14 <thead>
15 <tr>
16 <th>{{ts('Title')}}</th>
17 <th>{{ts('Name')}}</th>
18 <th>{{ts('Description')}}</th>
19 <th>{{ts('Enabled?')}}</th>
20 <th></th>
21 </tr>
22 </thead>
23 <tbody>
24 <tr ng-repeat="caseType in caseTypes"
25 class="crm-entity"
26 ng-class-even="'even-row even'"
27 ng-class-odd="'odd-row odd'"
28 ng-class="{disabled: 0==caseType.is_active, forked: 1==caseType.is_forked}">
29 <td>{{caseType.title}}</td>
30 <td>{{caseType.name}}</td>
31 <td>{{caseType.description}}</td>
32 <td>{{caseType.is_active == 1 ? ts('Yes') : ts('No')}}</td>
33 <!-- FIXME: Can't figure out how styling in other tables gets the nowrap effect... in absence of a consistent fix, KISS -->
34 <td style="white-space: nowrap">
35 <span>
36 <a class="action-item crm-hover-button" ng-href="#/caseType/{{caseType.id}}">{{ts('Edit')}}</a>
37
38 <!-- The variables used in ng-show below can take on any of the values from the set {0, 1, "0", "1", undefined}, so use explicit ==1 or !=1 to cover all possibilities properly. -->
39 <span class="more-panel btn-slide crm-hover-button" ng-show="caseType.is_reserved!=1 || (caseType.is_active!=1 || caseType.is_forked==1)">
40 {{ts('more')}}
41 <ul class="panel" style="display: none;">
42 <li class="panel-item-enable" ng-hide="caseType.is_active==1">
43 <a class="action-item crm-hover-button" ng-click="toggleCaseType(caseType)">
44 {{ts('Enable')}}
45 </a>
46 </li>
47 <li class="panel-item-disable" ng-show="caseType.is_active==1 && caseType.is_reserved!=1">
48 <a class="action-item crm-hover-button"
49 crm-confirm="{type: 'disable', obj: caseType}"
50 on-yes="toggleCaseType(caseType)">
51 {{ts('Disable')}}
52 </a>
53 </li>
54 <li class="panel-item-revert" ng-show="caseType.is_forked==1">
55 <a class="action-item crm-hover-button"
56 crm-confirm="{type: 'revert', obj: caseType}"
57 on-yes="revertCaseType(caseType)">
58 {{ts('Revert')}}
59 </a>
60 </li>
61 <li class="panel-item-delete" ng-show="caseType.is_reserved!=1">
62 <a class="action-item crm-hover-button"
63 crm-confirm="{type: 'delete', obj: caseType}"
64 on-yes="deleteCaseType(caseType)">
65 {{ts('Delete')}}
66 </a>
67 </li>
68 </ul>
69 </span>
70 </span>
71 </td>
72 </tr>
73 </tbody>
74 </table>
75
76 <div class="crm-submit-buttons">
77 <a ng-href="#/caseType/new" class="button"><span><i class="crm-i fa-plus-circle"></i> {{ts('New Case Type')}}</span></a>
78 </div>
79 </div>