...
 
Commits (1)
......@@ -44,75 +44,7 @@
<div class="tab-content">
<div class="tab-pane active" id="myextensions" role="tabpanel">
<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>
<f:render section="extensionList" arguments="{_all}" />
</div>
<f:if condition="{expiringExtensions -> f:count()}">
......@@ -236,3 +168,84 @@
</f:security.ifHasRole>
</div>
</f:section>
<f:section name="extensionList">
<table class="table table-striped">
<thead>
<tr>
<th colspan="2">
<f:translate key="extensionKey" />
</th>
</tr>
</thead>
<tbody>
<f:if condition="{extensions -> f:count()} > 0">
<f:then>
<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>
</f:then>
<f:else>
<td colspan="2">
<p><em>You have not registered any extension keys.</em></p>
</td>
</f:else>
</f:if>
</tbody>
</table>
</f:section>