ExtensionAdminPane.html 4.46 KB
Newer Older
1
<f:security.ifHasRole role="{settings.terAdminGroupUid}">
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
    <div class="tab-content lite-tab-panes-black">
        <table class="table table-striped">
            <thead>
            <tr>
                <th colspan="2">
                    <f:translate key="extensionKey" />
                </th>
                <th>User</th>
                <th class="transfer-colum">
                    <f:translate key="transferToUser" />
                </th>
            </tr>
            </thead>
            <tbody>
            <f:for each="{adminExtensions}" as="extension">
                <!-- cycle values for rows -->
                <tr>
                    <td>
                        {extension.extKey}
                        <f:if condition="{extension.lastVersion}">({extension.lastVersion.title})</f:if>
                        <br />
                        <span class="b-comment-date">
                            <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}" />
                                            ({extension.lastVersion.versionString})
                                        </f:then>
                                        <f:else>
                                            <f:translate key="tx_terfe2_domain_model_extension.versions.one" />
                                        </f:else>
                                    </f:if>
                                </f:else>
                            </f:if>
                        </span>
                    </td>
                    <td>
                        <f:if condition="{extension.versionCount} < 1">
                            <f:then>
                                <f:link.action class="btn btn-danger" onclick="if (confirm('Really delete!!')) return true; else return false;" action="delete" controller="Registerkey" arguments="{extension: extension}">
                                    <f:translate key="delete-button" />
                                </f:link.action>
                            </f:then>
                        </f:if>
                    </td>
                    <td>{extension.frontendUser}</td>
                    <td>
                        <f:form action="transfer" controller="Registerkey" name="transferKey" method="POST" onsubmit="if (confirm('Are you sure? You might not be able to get your transfered key back.')) return true; else return false;">
                            <f:form.hidden name="extension" value="{extension}" />
                            <f:form.textfield class="admin-manage-keys-input manage-keys-input" name="newUser" value="" />
                            <f:form.submit class="btn btn-primary" value="Transfer" />
                        </f:form>
                    </td>
                </tr>
                <f:for each="{extension.reverseVersionsByVersionNumber}" as="version">
                    <tr class="{columCycle}">
                        <td><span class="b-comment-date">{version.versionString}</span></td>
                        <td>
                            <f:link.action class="btn btn-danger" onclick="if (confirm('Really delete!!')) return true; else return false;" action="deleteExtensionVersion" controller="Registerkey" arguments="{version : version}">
                                <f:translate key="delete-button" />
                            </f:link.action>
                        </td>
68 69 70 71 72 73 74
                        <td colspan="2">
                            <f:if condition="{extension.lastVersion} != {version}">
                                <f:link.action class="btn btn-success" action="setAsLastVersion" controller="Registerkey" arguments="{extension: extension, version: version}">
                                    <i class="fa fa-arrow-circle-right"></i> Set as latest version
                                </f:link.action>
                            </f:if>
                        </td>
75 76 77 78 79 80
                    </tr>
                </f:for>
            </f:for>
            </tbody>
        </table>
    </div>
81
</f:security.ifHasRole>