NewPages.html 7.76 KB
Newer Older
1
{namespace be=TYPO3\CMS\Backend\ViewHelpers}
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

<f:be.pageRenderer
    includeRequireJsModules="{
        0:'TYPO3/CMS/Backend/ContextMenu',
        1:'TYPO3/CMS/Backend/NewMultiplePages'
    }"
/>

<h1>
    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:title" />
</h1>

<f:if condition="!{canCreateNew}">
    <f:then>
        <f:be.infobox
            title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:canNotCreateNew.title')}"
            message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:canNotCreateNew.message')}"
            state="-1"
        />
    </f:then>
    <f:else>
        <f:if condition="{hasNewPagesData}">
            <f:then>
                <f:if condition="{pagesCreated}">
                    <f:then>
                        <f:be.infobox
                            title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:pagesCreated.title')}"
                            message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:pagesCreated.message')}"
                            state="-1"
                        />
                    </f:then>
                    <f:else>
                        <f:be.infobox
                            title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:noPagesCreated.title')}"
                            message="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:noPagesCreated.message')}"
                            state="1"
                        />
                    </f:else>
                </f:if>
                <f:if condition="{visiblePages}">
                    <div class="form-group">
                        <h2>
                            <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:newSubPages"/>
                        </h2>
                        <f:for each="{visiblePages}" as="page">
                            <core:iconForRecord table="pages" row="{page}" />
                            {page.title -> f:format.crop(maxCharacters: maxTitleLength)}
                            <br />
                        </f:for>
                    </div>
                </f:if>
            </f:then>
            <f:else>
                <div class="t3js-newmultiplepages-newlinetemplate" style="display:none">
                    <f:render section="FormLine" arguments="{line: {index: '[0]', label: '[1]', pageTypes: '{pageTypes}'}}" />
                </div>

                <form action="{be:moduleLink(route:'pages_new', arguments:'{id:pageUid}')}" method="post">
                    <div class="form-group t3js-newmultiplepages-container">
                        <f:render section="FormLine" arguments="{line: {index: '0', label: '1', pageTypes: '{pageTypes}'}}" />
                        <f:render section="FormLine" arguments="{line: {index: '1', label: '2', pageTypes: '{pageTypes}'}}" />
                        <f:render section="FormLine" arguments="{line: {index: '2', label: '3', pageTypes: '{pageTypes}'}}" />
                        <f:render section="FormLine" arguments="{line: {index: '3', label: '4', pageTypes: '{pageTypes}'}}" />
                        <f:render section="FormLine" arguments="{line: {index: '4', label: '5', pageTypes: '{pageTypes}'}}" />
                    </div>

                    <div class="form-group">
                        <input
                            class="btn btn-default t3js-newmultiplepages-createnewfields"
                            type="button"
                            value="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:addMoreLines')}"
                        />
                    </div>

                    <div class="form-group">
                        <div class="checkbox">
                            <label for="createInListEnd">
                                <input type="checkbox" name="createInListEnd" id="createInListEnd" value="1" />
                                <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:listEnd" />
                            </label>
                        </div>
                        <div class="checkbox">
                            <label for="hidePages">
                                <input type="checkbox" name="hidePages" id="hidePages" value="1" />
                                <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:hidePages" />
                            </label>
                        </div>
                        <div class="checkbox">
                            <label for="hidePagesInMenus">
                                <input type="checkbox" name="hidePagesInMenus" id="hidePagesInMenus" value="1" />
                                <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:hidePagesInMenus" />
                            </label>
                        </div>
                    </div>

                    <div class="form-group">
                        <input
                            class="btn btn-default"
                            type="submit"
                            name="create"
                            value="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:create')}"
                        />
                        <input
                            class="btn btn-default"
                            type="reset"
                            value="{f:translate(key: 'LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:reset')}"
                        />
                    </div>
                </form>
            </f:else>
        </f:if>
    </f:else>
</f:if>

<f:section name="FormLine">
    <div class="form-section" id="form-line-{line.index}">
        <div class="row">
119
            <div class="form-group col-8">
120
121
122
123
124
125
126
                <label for="page_new_{line.index}">
                    <f:translate key="LLL:EXT:backend/Resources/Private/Language/locallang_pages_new:newPage"/> {line.label}:
                </label>
                <div class="form-control-wrap">
                    <input class="form-control" type="text" id="page_new_{line.index}" name="pages[NEW{line.index}][title]" />
                </div>
            </div>
127
            <div class="form-group col-4">
128
                <label for="page_new_select_{line.index}">
129
                    <f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.type"/>
130
131
132
133
134
135
                </label>
                <div class="form-control-wrap">
                    <div class="input-group">
                        <div id="page_new_icon_{line.index}" class="input-group-addon input-group-icon">
                            <core:iconForRecord table="pages" row="{id: '0'}" />
                        </div>
136
                        <select id="page_new_select_{line.index}" class="form-control form-control-adapt t3js-newmultiplepages-select-doktype" name="pages[NEW{line.index}][doktype]" data-bs-target="#page_new_icon_{line.index}">
137
138
139
140
141
142
143
144
145
146
147
148
149
150
                            <f:for each="{line.pageTypes}" as="typegroup" key="group">
                                <optgroup label="{f:translate(key: '{group}')}">
                                    <f:for each="{typegroup}" as="type">
                                        <option data-icon='{core:icon(identifier: "{type.2}")}' value="{type.1}">{f:translate(key: '{type.0}')}</option>
                                    </f:for>
                                </optgroup>
                            </f:for>
                        </select>
                    </div>
                </div>
            </div>
        </div>
    </div>
</f:section>