[TASK] Improve the form manager
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Resources / Private / Backend / Templates / FormManager / Index.html
1 <html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true">
2 <f:layout name="FormManager" />
3 <f:section name="MainContent">
4
5 <script type="text/javascript">
6 require(['{dynamicRequireJsModules.app}', '{dynamicRequireJsModules.viewModel}'], function (formManagerApp, viewModel) {
7 var FORMMANAGER_APP = formManagerApp.getInstance(
8 <f:format.htmlentitiesDecode>{formManagerAppInitialData}</f:format.htmlentitiesDecode>,
9 viewModel
10 ).run();
11 });
12 </script>
13 <h1><f:translate key="LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.headline" /></h1>
14 <f:if condition="{forms}">
15 <f:then>
16 <div class="panel panel-space panel-default recordlist">
17 <div class="panel-heading">
18 <span><f:translate key="LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.edit_existing_forms" /></span>
19 </div>
20 <div class="collapse in">
21 <div class="table-fit">
22 <table id="forms" class="table table-striped table-hover">
23 <thead>
24 <tr>
25 <th class="col-icon nowrap"><a class="btn btn-default" data-identifier="newForm" href="#"><core:icon identifier="actions-add" /></a></th>
26 <th class="col-title col-responsive nowrap"><f:translate key="LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.form_name" /></th>
27 <th class="col-control nowrap"></th>
28 <th class="nowrap"><f:translate key="LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.location" /></th>
29 <th class="nowrap"><f:translate key="LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.references" /></th>
30 </tr>
31 </thead>
32 <tbody>
33 <f:for each="{forms}" as="form">
34 <tr>
35 <td class="col-icon nowrap">
36 <f:if condition="{form.invalid}">
37 <f:then>
38 <span title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.invalid')}" data-toggle="tooltip" data-placement="top">
39 <core:icon identifier="overlay-missing" />
40 </span>
41 </f:then>
42 <f:else if="{form.duplicateIdentifier}">
43 <span title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.duplicate_identifier')} {form.identifier}" data-toggle="tooltip" data-placement="top">
44 <core:icon identifier="overlay-missing" />
45 </span>
46 </f:else>
47 <f:else>
48 <span title="id={form.identifier}" data-toggle="tooltip" data-placement="right">
49 <core:icon identifier="content-form" />
50 </span>
51 </f:else>
52 </f:if>
53 </td>
54 <td class="col-title col-responsive nowrap">
55 <f:if condition="{form.invalid} || {form.readOnly}">
56 <f:then>
57 <div title="{form.name}">{form.name}</div>
58 </f:then>
59 <f:else>
60 <f:link.action controller="FormEditor" action="index" arguments="{formPersistenceIdentifier: form.persistenceIdentifier}" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.edit_form')}" data="{toggle: 'tooltip', placement: 'right'}">{form.name}</f:link.action>
61 </f:else>
62 </f:if>
63 </td>
64 <td class="col-control nowrap">
65 <div class="btn-group" role="group">
66 <f:if condition="{form.invalid} || {form.readOnly}">
67 <f:then>
68 <button class="btn btn-default form-record-readonly" disabled="disabled" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.edit_form_not_allowed')}"><core:icon identifier="actions-open" /></button>
69 </f:then>
70 <f:else>
71 <f:link.action controller="FormEditor" action="index" arguments="{formPersistenceIdentifier: form.persistenceIdentifier}" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.edit_form')}" class="btn btn-default form-record-open"><core:icon identifier="actions-open" /></f:link.action>
72 </f:else>
73 </f:if>
74 <f:if condition="{form.invalid}">
75 <f:then>
76 <button class="btn btn-default form-record-readonly" disabled="disabled" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.duplicate_form_not_allowed')}"><core:icon identifier="actions-duplicate" /></button>
77 <button class="btn btn-default form-record-readonly" disabled="disabled" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.delete_form_not_allowed')}"><core:icon identifier="actions-edit-delete" /></button>
78 </f:then>
79 <f:else>
80 <a href="#" data-identifier="duplicateForm" data-form-persistence-identifier="{form.persistenceIdentifier}" data-form-name="{form.name}" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.duplicate_this_form')}" class="btn btn-default form-record-duplicate"><core:icon identifier="actions-duplicate" /></a>
81 <f:if condition="{form.removable}">
82 <f:then>
83 <a href="#" data-identifier="removeForm" data-form-persistence-identifier="{form.persistenceIdentifier}" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.delete_form')}" class="btn btn-default form-record-delete"><core:icon identifier="actions-edit-delete" /></a>
84 </f:then>
85 <f:else>
86 <button class="btn btn-default form-record-delete" disabled="disabled" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.delete_form_not_allowed')}"><core:icon identifier="actions-edit-delete" /></button>
87 </f:else>
88 </f:if>
89 </f:else>
90 </f:if>
91 </div>
92 </td>
93 <td class="nowrap">{form.persistenceIdentifier}</td>
94 <td class="nowrap">
95 <f:if condition="{form.referenceCount}">
96 <f:then>
97 <a href="#" data-identifier="showReferences" data-form-persistence-identifier="{form.persistenceIdentifier}" data-form-name="{form.name}">{form.referenceCount}</a>
98 </f:then>
99 <f:else>
100 {form.referenceCount}
101 </f:else>
102 </f:if>
103 </td>
104 </tr>
105 </f:for>
106 </tbody>
107 </table>
108 </div>
109 </div>
110 </div>
111 </f:then>
112 <f:else>
113 <f:be.infobox state="-1" title="{f:translate(key: 'LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.forms_not_found.title')}">
114 <p><f:translate key="LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.forms_not_found.message" /></p>
115 <a class="btn btn-primary" href="#" data-identifier="newForm"><f:translate key="LLL:EXT:form/Resources/Private/Language/Database.xlf:formManager.create_new_form" /></a>
116 </f:be.infobox>
117 </f:else>
118 </f:if>
119
120 </f:section>
121 </html>