Index.html 18.8 KB
Newer Older
1
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
2
<f:layout name="Default" />
3
4
5

<f:section name="main">

6
7
8
    <f:if condition="{uploaded}">
        <div class="alert alert-success">
            <p>
9
                <f:translate key="LLL:EXT:ter_fe2/Resources/Private/Language/locallang.xlf:msg.createVersionUploadSuccess" />
10
11
12
            </p>
        </div>
    </f:if>
13
14
15
16
17
18
19
20
21
22
23
24
25
26

    <f:if condition="{composerStatus}">
        <div class="alert alert-warning">
            <p>
                <f:translate key="LLL:EXT:ter_fe2/Resources/Private/Language/locallang.xlf:msg.composerStatus.{composerStatus}" />
                More information can be found in the official
                <f:link.typolink parameter="https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ExtensionArchitecture/ComposerJson/Index.html">
                    TYPO3 documentation
                </f:link.typolink>.

            </p>
        </div>
    </f:if>

27
28
29
    <header class="mb-4 mt-4">
        <h1>Managing my extensions</h1>
    </header>
30

31
32
33
34
35
    <f:if condition="{expiringExtensions -> f:count()}">
        <div class="alert alert-warning">
            You have {expiringExtensions -> f:count()} expiring extension keys! Please <a data-toggle="tab" onclick="$('#expiretab').tab('show')" href="#expiring">have a look</a>.
        </div>
    </f:if>
Thomas Löffler's avatar
Thomas Löffler committed
36

37
38
39
40
41
42
43
44
45
    <ul class="nav nav-tabs" id="registerkey" role="tablist">
        <li class="nav-item">
            <a class="nav-link active" data-toggle="tab" href="#myextensions" role="tab">Managing extension keys</a>
        </li>
        <f:if condition="{expiringExtensions -> f:count()}">
            <li class="nav-item">
                <a class="nav-link" id="expiretab" data-toggle="tab" href="#expiring" role="tab">Expiring extension keys</a>
            </li>
        </f:if>
46
47
48
49
50
        <f:if condition="{likedExtensions -> f:count()}">
            <li class="nav-item">
                <a class="nav-link" data-toggle="tab" href="#liked" role="tab">My liked extensions</a>
            </li>
        </f:if>
51
52
53
54
55
56
57
58
59
60
61
62
        <li class="nav-item">
            <a class="nav-link" data-toggle="tab" href="#register" role="tab">Register extension key</a>
        </li>
        <li class="nav-item">
            <a class="nav-link" data-toggle="tab" href="#transfer" role="tab">Transfer extension key</a>
        </li>
        <f:security.ifHasRole role="{settings.terAdminGroupUid}">
            <li class="nav-item">
                <a class="nav-link" data-toggle="tab" href="#admin" role="tab">Admin</a>
            </li>
        </f:security.ifHasRole>
    </ul>
Thomas Löffler's avatar
Thomas Löffler committed
63

64
65
    <div class="tab-content">
        <div class="tab-pane active" id="myextensions" role="tabpanel">
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
            <f:if condition="{extensions -> f:count()} == 0" >
                <f:then>
                    <div class="alert alert-info mt-3">
                        You do not have any registered extension keys yet.
                    </div>
                </f:then>
                <f:else>
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>
                                <f:translate key="extensionKey" />
                            </th>
                            <th>
                                Likes
                            </th>
                            <th class="text-right">
                                Actions
                            </th>
                        </tr>
                        </thead>
                        <tbody>
                        <f:for each="{extensions}" as="extension">
                            <tr>
                                <td>
                                    <f:if condition="{extension.versionCount} < 1">
                                        <f:then>
                                            {extension.extKey}
                                        </f:then>
                                        <f:else>
                                            <f:link.action pageUid="{settings.pages.extensionDetailPID}" controller="Extension" action="show" arguments="{extension : extension}">{extension.extKey}</f:link.action>
                                            / <span class="ter-ext-state-{extension.lastVersion.state}">{extension.lastVersion.state}</span>
                                        </f:else>
                                    </f:if>
                                    <br />
                                    <small>
                                        <f:if condition="{extension.versionCount} < 1">
103
                                            <f:then>
104
                                                <f:translate key="tx_terfe2_domain_model_extension.versions.no" />
105
106
                                            </f:then>
                                            <f:else>
107
108
109
110
111
112
113
114
115
                                                <f:if condition="{extension.versionCount} > 1">
                                                    <f:then>
                                                        <f:translate key="tx_terfe2_domain_model_extension.versions.multiple" arguments="{0: extension.versionCount}" />
                                                    </f:then>
                                                    <f:else>
                                                        <f:translate key="tx_terfe2_domain_model_extension.versions.one" />
                                                    </f:else>
                                                </f:if>
                                                (last upload on <f:format.date format="m/d/Y h:i a (T)">{extension.lastVersion.uploadDate}</f:format.date>)
116
117
                                            </f:else>
                                        </f:if>
118
119
120
121
122
123
                                    </small>
                                </td>
                                <td>
                                    <f:render partial="Like" arguments="{extension: extension, showOnly: 1}" />
                                </td>
                                <td class="text-right">
124
125
126
127
128
129
130
131
                                    <f:link.action class="btn btn-success" action="uploadVersion" controller="Extension" arguments="{extension: extension}" pageUid="{settings.pages.uploadVersionPID}">
                                        <i class="fa fa-arrow-circle-o-up"></i>
                                        Upload
                                    </f:link.action>
                                    <f:link.action class="btn btn-info" action="edit" controller="Extension" arguments="{extension: extension}">
                                        <i class="fa fa-pencil"></i>
                                        Edit
                                    </f:link.action>
132
133
134
135
136
137
138
139
                                    <f:if condition="{extension.versionCount} < 1">
                                        <f:then>
                                            <f:link.action class="btn btn-danger" onclick="if (confirm('Really delete key \"{extension.extKey}\"?')) return true; else return false;" action="delete" controller="Registerkey" arguments="{extension: extension}">
                                            <i class="fa fa-trash-o"></i>
                                            Delete
                                            </f:link.action>
                                        </f:then>
                                        <f:else>
140
141
142
143
                                            <button type="button" class="btn btn-outline-danger" data-toggle="modal" data-target="#abandonModal{extension.extkey}"><i class="fa fa-trash-o"></i> Abandon</button>
                                            <div class="modal fade" id="abandonModal{extension.extkey}" tabindex="-1" role="dialog" aria-labelledby="abandonModal" aria-hidden="true">
                                                <div class="modal-dialog text-left" role="document">
                                                    <div class="modal-content">
144
145
                                                        <f:form class="needs-validation" controller="Registerkey" action="transfer" arguments="{extension: extension, newUser: 'abandoned_extensions'}" method="post">
                                                            <div class="modal-body">
146
147
                                                                <div class="form-group">
                                                                    <h4>Abandon extension?</h4>
148
149
                                                                    <p><b>Do you really want to abandon your extension?</b><br>You will lose access to it and possibly don't get it back.</p>
                                                                    <p>If yes, please type the extension key <b><i>{extension.extkey}</i></b> in the field below</p>
150
151
                                                                    <input type="text" pattern="^{extension.extKey}$" class="form-control" id="extensionkey" required>
                                                                </div>
152
153
                                                                <div class="modal-footer">
                                                                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
154
                                                                    <button type="submit" class="btn btn-primary">Yes, abandon extension</button>
155
                                                                </div>
156
157
                                                            </div>
                                                        </f:form>
158
159
160
                                                    </div>
                                                </div>
                                            </div>
161
162
163
164
165
166
167
168
169
                                        </f:else>
                                    </f:if>
                                </td>
                            </tr>
                        </f:for>
                        </tbody>
                    </table>
                </f:else>
            </f:if>
170
171
        </div>
        <f:if condition="{expiringExtensions -> f:count()}">
Thomas Löffler's avatar
Thomas Löffler committed
172

173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
            <div class="tab-pane" id="expiring" role="tabpanel">
                <div class="alert alert-info mt-3">
                    <p>
                        <strong>In this list there are only extension keys which have not been used for an extension yet!</strong><br />
                        The following actions are available for your expiring extension keys:
                    </p>
                    <ul>
                        <li><strong>Release to community</strong>: Extension key will be deleted and set free
                            for re-registration.
                        </li>
                        <li><strong>Keep</strong>: You'll keep the extension key for one more year. If there is
                            no upload within this time then the expiry process will repeat.
                        </li>
                        <li><strong>Upload</strong>: You may upload a new version for this extension.</li>
                    </ul>
                </div>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th colspan="2">
                            <f:translate key="extensionKey" />
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <f:for each="{expiringExtensions}" as="extension">
                        <tr>
                            <td>
                                {extension.extKey}<br>
                                <small>Expires: {extension.expire -> f:format.date(format:'m/d/Y h:i a (T)')}</small>
                            </td>
                            <td class="text-right">
                                <f:link.action class="btn btn-danger" onclick="if (confirm('Really release?')) return true; else return false;" action="delete" controller="Registerkey" arguments="{extension: extension}">
                                    <i class="fa fa-trash-o"></i>
                                    Release
                                </f:link.action>
                                <f:link.action class="btn btn-success" action="keep" controller="Registerkey" arguments="{extension: extension}">
                                    <i class="fa fa-repeat"></i>
                                    <f:translate key="keepExtension-button" />
                                </f:link.action>
                                <f:link.action class="btn btn-success" action="uploadVersion" controller="Extension" arguments="{extension: extension}" pageUid="{settings.pages.uploadVersionPID}">
                                    <i class="fa fa-arrow-circle-o-up"></i>
                                    <f:translate key="uploadVersion-button" />
                                </f:link.action>
                                <br />
                            </td>
                        </tr>
                    </f:for>
                    </tbody>
                </table>
            </div>
        </f:if>
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246

        <f:if condition="{likedExtensions}">
            <f:variable name="hasLiked" value="1" />
            <div class="tab-pane" id="liked" role="tabpanel">
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>
                            Extension key
                        </th>
                        <th>
                            Download latest version
                        </th>
                        <th class="text-right">
                            Likes
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <f:for each="{likedExtensions}" as="extension">
                        <tr>
                            <td class="text-middle">
247
                                <f:link.action pageUid="{settings.pages.extensionDetailPID}" controller="Extension" action="show" arguments="{extension : extension}">{extension.extKey}</f:link.action><br>
248
                                {extension.lastVersion.author.name}
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
                            </td>
                            <td>
                                <f:if condition="{extension.lastVersion.reviewState} != -1">
                                    <f:link.action class="btn btn-primary" controller="Extension" action="download" arguments="{extension : extension, versionString : extension.lastVersion.versionString, format : 'zip'}">
                                        <strong>Download <span itemprop="softwareVersion">{extension.lastVersion.versionString}</span></strong>
                                    </f:link.action>
                                </f:if>
                            </td>
                            <td class="text-right">
                                <f:render partial="Like" arguments="{extension: extension,showOnly: 1}" />
                            </td>
                        </tr>
                    </f:for>
                    </tbody>
                </table>
            </div>
        </f:if>

267
        <div class="tab-pane" id="register" role="tabpanel">
Thomas Löffler's avatar
Thomas Löffler committed
268

269
270
271
272
273
274
275
            <f:form action="create" controller="Registerkey" class="form-inline mt-3" method="post">
                <label class="sr-only">
                    <f:translate key="extensionKey" />
                </label>
                <div class="col-lg-12">
                    <div class="input-group input-lg">
                        <f:form.textfield class="form-control" name="extensionKey" placeholder="Extension key to register" value="" />
276
                        <div class="input-group-append">
277
                            <f:form.submit class="btn btn-primary mb-0 mt-0" value="Register" />
278
279
280
281
282
                        </div>
                    </div>
                </div>
            </f:form>
            <div class="alert alert-info mt-3">
283
284
                <h4>Please make sure that the extension key you register follows the rules</h4>
                <p>Check the <a title="Please review the Rules for the Extension Key"  target="_blank" href="https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ExtensionArchitecture/ExtensionKey/Index.html#rules-for-the-extension-key">Rules for the Extension Key</a> at the official documentation.</p>
285
286
287
            </div>
        </div>
        <div class="tab-pane" id="transfer" role="tabpanel">
288
            <f:form class="form-inline mt-3" action="transfer" controller="Registerkey" name="transferKey" method="POST" onsubmit="if (confirm('Are you sure? You might not be able to get your transferred key back.')) return true; else return false;">
289
290
291
292
293
294
295
296
297
298
                <label class="sr-only">
                    <f:translate key="extensionKey" />
                </label>
                <div class="col-lg-12">
                    <div class="input-group input-lg">
                        <f:form.select class="form-control" name="extension" options="{extensions}" prependOptionLabel="Please select the extension key to transfer" prependOptionValue="" optionLabelField="extKey" sortByOptionLabel="1" />
                        <label class="sr-only">
                            <f:translate key="transferToUser" />
                        </label>
                        <f:form.textfield class="form-control" placeholder="Transfer to user (username)" name="newUser" value="" />
299
                        <div class="input-group-append">
300
                            <f:form.submit class="btn btn-primary mb-0 mt-0" value="Transfer key" />
301
302
303
304
305
306
                        </div>
                    </div>
                </div>
            </f:form>
            <div class="alert alert-warning mt-3">
                <h4>Please check twice!</h4>
307
                <p>Are you sure? You might not be able to get your transferred key back.</p>
308
309
310
311
312
313
314
315
316
317
318
            </div>
        </div>
        <f:security.ifHasRole role="{settings.terAdminGroupUid}">
            <div class="tab-pane" id="admin" role="tabpanel">
                <f:form action="admin" class="form-inline mt-3 mb-3" controller="Registerkey" method="post">
                    <label class="sr-only">
                        <f:translate key="extensionKey" />
                    </label>
                    <div class="col-lg-12">
                        <div class="input-group input-lg">
                            <f:form.textfield class="form-control" placeholder="Search for extension key" name="extensionKey" value="" />
319
                            <div class="input-group-append">
320
                                <f:form.submit class="btn btn-primary mb-0 mt-0" value="Search" />
321
322
323
324
325
326
327
                            </div>
                        </div>
                    </div>
                </f:form>
            </div>
        </f:security.ifHasRole>
    </div>
328
</f:section>