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