{namespace em=TYPO3\CMS\Extensionmanager\ViewHelpers}

<f:layout name="main" />

<f:section name="docheader-buttons">
	<f:be.buttons.icon uri="{f:uri.action(action:'form',controller:'UploadExtensionFile')}" icon="actions-edit-upload" title="{f:translate(key:'extensionList.uploadExtension')}"/>
</f:section>

<f:section name="module-headline">
	<h2><f:translate key="manageExtensions">Manage extensions</f:translate></h2>
</f:section>

<f:section name="Content">
	<div class="uploadForm" style="display: none;">
		<span class="spinner"></span>
		<f:translate key="extensionList.loading"/>
	</div>

	<div class="headerRow ui-helper-clearfix">
		<div class="typo3-extensionmanager-headerRowLeft">
		</div>
		<div class="typo3-extensionmanager-headerRowRight">
		</div>
	</div>
	<table id="typo3-extension-list" class="typo3-extension-list">
		<thead>
			<tr>
				<th title="{f:translate(key:'extensionList.header.title.update')}"><f:translate key="extensionList.header.update"/></th>
				<th title="{f:translate(key:'extensionList.header.title.activate')}"><f:translate key="extensionList.header.activate"/></th>
				<th><f:translate key="extensionList.header.extensionName"/></th>
				<th><f:translate key="extensionList.header.extensionKey"/></th>
				<th><f:translate key="extensionList.header.extensionVersion"/></th>
				<th><f:translate key="extensionList.header.extensionActions"/></th>
				<th><f:translate key="extensionList.header.extensionState"/></th>
			</tr>
		</thead>
		<tbody>
			<f:for each="{extensions}" as="extension" key="extensionKey">
				<f:if condition="{extension.terObject}">
					<f:then>
						<tr id="{extensionKey}" class="{f:if(condition:'{extension.terObject.reviewState} >= 0', then:'', else:'insecure')} {f:if(condition:'{extension.installed}', then: '', else: 'inactive')}">
					</f:then>
					<f:else>
						<tr id="{extensionKey}" class="{f:if(condition:'{extension.installed}', then: '', else: 'inactive')}">
					</f:else>
				</f:if>
				<td>
					<f:if condition="{extension.updateAvailable}">
						<f:be.buttons.icon
							uri="{f:uri.action(action:'updateCommentForUpdatableVersions',controller:'Download',arguments:{extension:extension.key, integerVersion: extension.terObject.integerVersion},format:'json')}"
							icon="actions-system-extension-update"
							title="{f:translate(key:'extensionList.updateToVersion', arguments:{0:extension.updateToVersion.version})}"
						/>
					</f:if>
				</td>
				<td>
					<em:toggleExtensionInstallationState extension="{extension}" />
				</td>
				<f:if condition="{extension.description}">
					<f:then>
						<td title="{extension.description}">
					</f:then>
					<f:else>
						<td>
					</f:else>
				</f:if>

					<em:image src="../{extension.siteRelPath}/{extension.ext_icon}" alt="{extension.title}" height="16" />{extension.title}
				</td>
				<td>
					{extensionKey}
				</td>
				<td>
					{extension.version}
				</td>
				<td class="icons">
					<em:configureExtension extension="{extension}" />
					<em:updateScript extensionKey="{extension.key}" />
					<em:removeExtension extension="{extension}" />
					<f:be.buttons.icon uri="{f:uri.action(action:'downloadExtensionZip',controller:'Action',arguments:'{extension:extension.key}')}" icon="actions-system-extension-download" title="{f:translate(key:'extensionList.downloadzip')}"/>
					<em:downloadExtensionData extension="{extension}" />
				</td>
				<td class="state {extension.state}">
					{extension.state}
				</td>
				</tr>
			</f:for>
		</tbody>
	</table>
</f:section>


