Commit | Line | Data |
---|---|---|
7585cf5b | 1 | <a href="#!/?name=0" class="btn btn-default"> |
d7056de0 | 2 | <i class="crm-i fa-plus"></i> {{:: ts('New Form') }} |
fd6c0814 | 3 | </a> |
f6c0358e | 4 | <div |
2d4bfef1 | 5 | af-api4="['Afform', 'get', {select: ['name','title','is_public','server_route','has_local','has_base'], orderBy: {name:'ASC'}}]" |
f6c0358e CW |
6 | af-api4-ctrl="listCtrl"> |
7 | ||
8 | <div ng-if="apiData.result.length == 0"> | |
d7056de0 | 9 | {{:: ts('None found.') }} |
f6c0358e CW |
10 | </div> |
11 | ||
12 | <table> | |
13 | <thead> | |
14 | <tr> | |
d7056de0 CW |
15 | <th>{{:: ts('Name') }}</th> |
16 | <th>{{:: ts('Title') }}</th> | |
17 | <th>{{:: ts('Server Route') }}</th> | |
18 | <th>{{:: ts('Frontend?') }}</th> | |
f6c0358e CW |
19 | <th></th> |
20 | </tr> | |
21 | </thead> | |
22 | <tbody> | |
23 | <tr ng-repeat="availForm in listCtrl.result"> | |
24 | <td> | |
7585cf5b | 25 | <a ng-href="#!/?name={{availForm.name}}">{{availForm.name}}</a> |
f6c0358e CW |
26 | </td> |
27 | <td>{{availForm.title}}</td> | |
28 | <td> | |
29 | <a ng-if="availForm.server_route" ng-href="{{crmUrl(availForm.server_route)}}" target="_blank"> | |
30 | <code>{{availForm.server_route}}</code> | |
31 | </a> | |
32 | </td> | |
33 | <td>{{availForm.is_public ? ts('Frontend') : ts('Backend')}}</td> | |
34 | <td> | |
35 | <!--<a ng-click="crmStatus({start: ts('Reverting...'), success: ts('Reverted')}, crmApi4('Afform', 'revert', {where: [['name', '=', availForm.name]]}))">{{ts('Revert')}}</a>--> | |
36 | <a af-api4-action="['Afform', 'revert', {where: [['name','=', availForm.name]]}]" | |
37 | af-api4-start-msg="ts('Reverting...')" | |
38 | af-api4-success-msg="ts('Reverted')" | |
5bf3fa63 | 39 | af-api4-success="listCtrl.refresh()" |
f6c0358e | 40 | class="btn btn-xs btn-default" |
2d4bfef1 | 41 | ng-if="availForm.has_local && availForm.has_base" |
d7056de0 | 42 | >{{:: ts('Revert') }}</a> |
1cad5eb2 TO |
43 | <a af-api4-action="['Afform', 'revert', {where: [['name','=', availForm.name]]}]" |
44 | af-api4-start-msg="ts('Deleting...')" | |
45 | af-api4-success-msg="ts('Deleted')" | |
5bf3fa63 | 46 | af-api4-success="listCtrl.refresh()" |
1cad5eb2 | 47 | class="btn btn-xs btn-default" |
2d4bfef1 | 48 | ng-if="availForm.has_local && !availForm.has_base" |
d7056de0 | 49 | >{{:: ts('Delete') }}</a> |
f6c0358e CW |
50 | </td> |
51 | </tr> | |
52 | </tbody> | |
53 | </table> | |
54 | ||
55 | </div> |