Index.html 13.1 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 13 14 15
            </p>
        </div>
    </f:if>
    <header class="mb-4 mt-4">
        <h1>Managing my extensions</h1>
    </header>
16

17 18 19 20 21
    <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>
22

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
    <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>
        <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>
44

45 46
    <div class="tab-content">
        <div class="tab-pane active" id="myextensions" role="tabpanel">
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
            <table class="table table-striped">
                <thead>
                <tr>
                    <th colspan="2">
                        <f:translate key="extensionKey" />
                    </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">
                                    <f:then>
                                        <f:translate key="tx_terfe2_domain_model_extension.versions.no" />
                                    </f:then>
                                    <f:else>
                                        <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>)
                                    </f:else>
                                </f:if>
                            </small>
                        </td>
                        <td class="text-right">
                            <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>
                                    <f:link.action class="btn btn-secondary" onclick="if (confirm('Really abandon key \"{extension.extKey}\"?')) return true; else return false;" action="transfer" controller="Registerkey" arguments="{extension: extension, newUser: 'abandoned_extensions'}">
                                        <i class="fa fa-trash-o"></i>
                                        Abandon
                                    </f:link.action>
                                </f:else>
                            </f:if>
                            <f:link.action class="btn btn-info" action="edit" controller="Extension" arguments="{extension: extension}">
                                <i class="fa fa-pencil"></i>
                                Edit
                            </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>
                                Upload
                            </f:link.action>
                        </td>
                    </tr>
                </f:for>
                </tbody>
            </table>
116 117
        </div>
        <f:if condition="{expiringExtensions -> f:count()}">
118

119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
            <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>
        <div class="tab-pane" id="register" role="tabpanel">
172

173 174 175 176 177 178 179
            <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="" />
180
                        <div class="input-group-append">
181
                            <f:form.submit class="btn btn-primary mb-0 mt-0" value="Register" />
182 183 184 185 186 187 188 189
                        </div>
                    </div>
                </div>
            </f:form>
            <div class="alert alert-info mt-3">
                <h4>Please make sure that the extension key you register follows the following rules</h4>
                <ul>
                    <li>Allowed characters are: a-z (lowercase), 0-9 and '_' (underscore)</li>
190
                    <li>The key must not begin with one of the following prefixes: tx,user_,pages,tt_,sys_,ts_language_,csh_</li>
Thomas Löffler's avatar
Thomas Löffler committed
191
                    <li>Extension keys must not start with a number and must not start or end with an '_' (underscore)</li>
192 193 194 195 196
                    <li>An extension key must have minimum 3, maximum 30 characters (not counting underscores)</li>
                </ul>
            </div>
        </div>
        <div class="tab-pane" id="transfer" role="tabpanel">
197
            <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;">
198 199 200 201 202 203 204 205 206 207
                <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="" />
208
                        <div class="input-group-append">
209
                            <f:form.submit class="btn btn-primary mb-0 mt-0" value="Transfer key" />
210 211 212 213 214 215
                        </div>
                    </div>
                </div>
            </f:form>
            <div class="alert alert-warning mt-3">
                <h4>Please check twice!</h4>
216
                <p>Are you sure? You might not be able to get your transferred key back.</p>
217 218 219 220 221 222 223 224 225 226 227
            </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="" />
228
                            <div class="input-group-append">
229
                                <f:form.submit class="btn btn-primary mb-0 mt-0" value="Search" />
230 231 232 233 234 235 236
                            </div>
                        </div>
                    </div>
                </f:form>
            </div>
        </f:security.ifHasRole>
    </div>
237
</f:section>