Commit f324aafe authored by Thomas Löffler's avatar Thomas Löffler

[TASK] Some improvements on detail view

parent 4b4071ba
Pipeline #501 passed with stages
in 2 minutes and 42 seconds
......@@ -171,15 +171,14 @@ class Tx_TerFe2_Controller_ExtensionController extends Tx_TerFe2_Controller_Abst
$this->view->assign('extensions', $extensions);
}
/**
* Action that displays a single extension
*
* @param Tx_TerFe2_Domain_Model_Extension $extension The extension to display
* @param string $extensionKey Extension key
* @return void
* @dontvalidate $extension
* @dontvalidate $extensionKey
*
* @ignorevalidation $extension
*/
public function showAction(Tx_TerFe2_Domain_Model_Extension $extension = NULL, $extensionKey = NULL)
{
......
<dl class="row">
<dt class="col-sm-3"><f:translate key="version" /></dt>
<dd class="col-sm-9">{extension.lastVersion.versionString}</dd>
<dt class="col-sm-3"><f:translate key="last_updated" /></dt>
<dd class="col-sm-9"><terfe2:dateTime format="{settings.dateFormat}">{extension.lastVersion.uploadDate}</terfe2:dateTime></dd>
<dt class="col-sm-3"><f:translate key="first_upload" /></dt>
<dd class="col-sm-9"><terfe2:dateTime format="{settings.dateFormat}">{extension.crdate}</terfe2:dateTime></dd>
<dt class="col-sm-3"><f:translate key="downloads" /></dt>
<dd class="col-sm-9"><f:format.number decimals="0" thousandsSeparator="," decimalSeparator=".">{extension.downloads}</f:format.number></dd>
<dt class="col-sm-4"><f:translate key="version" /></dt>
<dd class="col-sm-8">{extension.lastVersion.versionString}</dd>
<dt class="col-sm-4">Last update</dt>
<dd class="col-sm-8"><f:format.date format="%d. %b %Y">@{extension.lastVersion.uploadDate}</f:format.date></dd>
<dt class="col-sm-4"><f:translate key="first_upload" /></dt>
<dd class="col-sm-8"><f:format.date format="%d. %b %Y">{extension.crdate}</f:format.date></dd>
<dt class="col-sm-4"><f:translate key="downloads" /></dt>
<dd class="col-sm-8"><f:format.number decimals="0" thousandsSeparator="," decimalSeparator=".">{extension.downloads}</f:format.number></dd>
<f:security.ifHasRole role="{settings.reviewerGroupUid}">
<dt class="col-sm-3">Owner:</dt>
<dd class="col-sm-9">Name: {owner.name}<br />Email: {owner.email}<br />Username: {owner.username}</dd>
<dt class="col-sm-4">Owner:</dt>
<dd class="col-sm-8">Name: {owner.name}<br />Email: {owner.email}<br />Username: {owner.username}</dd>
</f:security.ifHasRole>
<dt class="col-sm-3"><f:translate key="category" /></dt>
<dd class="col-sm-9">
<dt class="col-sm-4"><f:translate key="category" /></dt>
<dd class="col-sm-8">
<f:if condition="{extension.lastVersion.emCategory}">
<f:then>
<f:translate key="category_{extension.lastVersion.emCategory}" />
......@@ -22,12 +22,12 @@
</f:else>
</f:if>
</dd>
<dt class="col-sm-3"><f:translate key="dependencies" /></dt>
<dd class="col-sm-9"><f:render partial="InlineRelationList" arguments="{relations: extension.lastVersion.dependencies}" /></dd>
<dt class="col-sm-3"><f:translate key="conflicts" /></dt>
<dd class="col-sm-9"><f:render partial="InlineRelationList" arguments="{relations: extension.lastVersion.conflicts}" /></dd>
<dt class="col-sm-3"><f:translate key="manual" /></dt>
<dd class="col-sm-9">
<dt class="col-sm-4"><f:translate key="dependencies" /></dt>
<dd class="col-sm-8"><f:render partial="InlineRelationList" arguments="{relations: extension.lastVersion.dependencies}" /></dd>
<dt class="col-sm-4"><f:translate key="conflicts" /></dt>
<dd class="col-sm-8"><f:render partial="InlineRelationList" arguments="{relations: extension.lastVersion.conflicts}" /></dd>
<dt class="col-sm-4"><f:translate key="manual" /></dt>
<dd class="col-sm-8">
<f:if condition="{documentationLink}">
<f:then>
<terfe2:raw>{documentationLink}</terfe2:raw>
......@@ -53,45 +53,45 @@
</f:if>
</dd>
<f:if condition="{extension.forgeLink}">
<dt class="col-sm-3">
<dt class="col-sm-4">
<f:translate key="bugtracker" />
</dt>
<dd class="col-sm-9">
<dd class="col-sm-8">
<f:link.external rel="nofollow" uri="{extension.forgeLink}" target="_blank">
<f:translate key="found_a_bug" />
</f:link.external>
</dd>
</f:if>
<f:if condition="{extension.repositoryUrl}">
<dt class="col-sm-3">
<dt class="col-sm-4">
<f:translate key="repository_url" />
</dt>
<dd class="col-sm-9">
<dd class="col-sm-8">
<f:link.external rel="nofollow" uri="{extension.repositoryUrl}" target="_blank">
<f:translate key="repository_url_value" />
</f:link.external>
</dd>
</f:if>
<f:if condition="{flattrUrl}">
<dt class="col-sm-3">
<dt class="col-sm-4">
<f:translate key="donate" />
</dt>
<dd class="col-sm-9">
<dd class="col-sm-8">
<f:link.external uri="{flattrUrl}" target="_blank"><img
src="https://api.flattr.com/button/flattr-badge-large.png"
alt="{f:translate(key:'donate')}" /></f:link.external>
</dd>
</f:if>
<f:if condition="{extension.paypalUrl}">
<dt class="col-sm-3">
<dt class="col-sm-4">
<f:translate key="like_it" />
</dt>
<dd class="col-sm-9">
<dd class="col-sm-8">
<f:link.external rel="nofollow" uri="{extension.paypalUrl}" target="_blank">
<f:translate key="donate_url" />
</f:link.external>
</dd>
</f:if>
<dt class="col-sm-3"><f:translate key="author" /></dt>
<dd class="col-sm-9">{owner.name}</dd>
<dt class="col-sm-4"><f:translate key="author" /></dt>
<dd class="col-sm-8">{owner.name}</dd>
</dl>
<h3>Installation</h3>
<div class="mb-3" id="accordion" role="tablist" aria-multiselectable="true">
<div class="card bgWhite">
<div class="card-header" role="tab" id="headingOne">
<h5 class="mb-0">
<a data-toggle="collapse" data-parent="#accordion" href="#install-zip" aria-expanded="true" aria-controls="collapseOne">
Install extension via ZIP file
</a>
</h5>
</div>
<div id="install-zip" class="collapse show" role="tabpanel" aria-labelledby="headingOne">
<div class="card-block">
<ol>
<li>
<f:link.action controller="Extension" action="download" arguments="{extension : extension, versionString : extension.lastVersion.versionString, format : 'zip'}">
Download ZIP file
</f:link.action>
</li>
<li>
Log into your TYPO3 backend
</li>
<li>
Go to Extension Manager module
</li>
<li>
Press the upload button on the top bar
</li>
<li>
Select the ZIP file and upload it. If you want to overwrite an existing extension installation, activate the
checkbox.
</li>
</ol>
</div>
</div>
</div>
<f:if condition="{extension.composerPackageName}">
<div class="card bgWhite">
<div class="card-header" role="tab" id="headingTwo">
<h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#install-composer" aria-expanded="false" aria-controls="collapseTwo">
Install extension via composer command
</a>
</h5>
</div>
<div id="install-composer" class="collapse" role="tabpanel" aria-labelledby="headingTwo">
<div class="card-block">
<ol>
<li>
Go to your folder where the root composer.json file is located
</li>
<li>
Type: <code>composer require {extension.composerPackageName}</code> to get the latest version that runs on
your TYPO3 version.
</li>
</ol>
</div>
</div>
</div>
</f:if>
<div class="card bgWhite">
<div class="card-header" role="tab" id="headingThree">
<h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#install-t3x" aria-expanded="false" aria-controls="collapseThree">
Install extension with T3X file
</a>
</h5>
</div>
<div id="install-t3x" class="collapse" role="tabpanel" aria-labelledby="headingThree">
<div class="card-block">
<ol>
<li>
<f:link.action controller="Extension" action="download" arguments="{extension : extension, versionString : extension.lastVersion.versionString, format : 't3x'}">
Download T3X file
</f:link.action>
</li>
<li>
Log into your TYPO3 backend
</li>
<li>
Go to Extension Manager module
</li>
<li>
Press the upload button on the top bar
</li>
<li>
Select the T3X file and upload it. If you want to overwrite an existing extension installation, activate the checkbox.
</li>
</ol>
</div>
</div>
</div>
</div>
......@@ -3,163 +3,86 @@
<f:layout name="Default" />
<f:section name="main">
<f:if condition="{extension}">
<f:then>
<header class="mt-3">
<terfe2:extensionIcon version="{extension.lastVersion}" alt="{extension.lastVersion.title}" class="ter-ext-icon" />
<h1>
{extension.lastVersion.title}
<small class="text-muted">{extension.extKey} / <span class="ter-ext-state-{extension.lastVersion.state}">{extension.lastVersion.state}</span>
</small>
</h1>
</header>
<f:if condition="{extension.lastVersion.reviewState} == -2">
<div class="alert alert-warning" role="alert">
<div class="alert alert-warning mt-3 mb-3" role="alert">
<h4 class="alert-header">
<span class="ter-ext-state-beta"><i class="fa fa-exclamation-triangle"></i></span>
Outdated extension
<small class="text-muted">This extension supports none of the currently supported TYPO3 core version</small>
</h4>
<small>
This extension supports none of the currently supported TYPO3 core versions or was
uploaded before the release of the oldest TYPO3 core version.<br />
It may no longer be maintained or supported by the extension owner.<br />
Please be careful using this extension for your up-to-date TYPO3 instance.<br /><br />
</small>
<small>
If you are sure this extension is flagged as outdated by mistake, please contact the
<f:link.page pageUid="90">t3o team</f:link.page>
</small>
</div>
</f:if>
<div class="row mb-3">
<div class="col-md-8">
<p>{extension.lastVersion.description}</p>
<div class="row mt-3">
<div class="col-md-9">
<header>
<terfe2:extensionIcon version="{extension.lastVersion}" alt="{extension.lastVersion.title}" class="ter-ext-icon" />
<h1>
{extension.lastVersion.title}
<small class="text-muted">{extension.extKey} /
<span class="ter-ext-state-{extension.lastVersion.state}">{extension.lastVersion.state}</span>
</small>
</h1>
</header>
</div>
<div class="col-md-4">
<div class="col-md-3">
<f:if condition="{extension.lastVersion.reviewState} != -1">
<div class="btn-group mb-3">
<button type="button" class="btn btn-primary pull-right dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Install {extension.extKey} via
</button>
<div class="dropdown-menu">
<a class="dropdown-item" data-parent="#collapse-container" data-toggle="collapse" data-target="#install-zip">ZIP file</a>
<a class="dropdown-item" data-parent="#collapse-container" data-toggle="collapse" data-target="#install-composer">composer</a>
<a class="dropdown-item" data-parent="#collapse-container" data-toggle="collapse" data-target="#install-t3x">T3X file</a>
</div>
</div>
<f:link.action class="btn btn-primary pull-right" controller="Extension" action="download" arguments="{extension : extension, versionString : extension.lastVersion.versionString, format : 'zip'}">
Download {extension.lastVersion.versionString}
</f:link.action>
</f:if>
</div>
</div>
<div class="row mb-3 justify-content-center">
<div id="collapse-container">
<div class="collapse" id="install-zip">
<div class="card card-block bgWhite">
<h4>Install {extension.extKey} via ZIP file</h4>
<ol>
<li>
<f:link.action class="" controller="Extension" action="download"
arguments="{extension : extension, versionString : extension.lastVersion.versionString, format : 'zip'}">
Download ZIP file
</f:link.action>
</li>
<li>
Log into your TYPO3 backend
</li>
<li>
Go to Extension Manager module
</li>
<li>
Press the upload button on the top bar
</li>
<li>
Select the ZIP file and upload it. If you want to overwrite an existing extension installation, activate the
checkbox.
</li>
</ol>
</div>
</div>
<div class="collapse" id="install-composer">
<div class="card card-block bgWhite">
<h4>Install {extension.extKey} via composer command</h4>
<ol>
<li>
Go to your folder where the root composer.json file is located
</li>
<li>
Type: <code>composer require {extension.composerPackageName}</code> to get the latest version that runs on
your TYPO3 version.
</li>
</ol>
</div>
</div>
<div class="collapse" id="install-t3x">
<div class="card card-block bgWhite">
<h4>Install {extension.extKey} via T3X file</h4>
<ol>
<li>
<f:link.action class="" controller="Extension" action="download" arguments="{extension : extension, versionString : extension.lastVersion.versionString, format : 't3x'}">
Download T3X file
</f:link.action>
</li>
<li>
Log into your TYPO3 backend
</li>
<li>
Go to Extension Manager module
</li>
<li>
Press the upload button on the top bar
</li>
<li>
Select the T3X file and upload it. If you want to overwrite an existing extension installation, activate the checkbox.
</li>
</ol>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h3>TYPO3 version support</h3>
<div class="alert alert-info">
This version works for <strong>TYPO3 {extension.lastVersion.typo3Dependency.versionString}</strong><br />
If you look for other TYPO3 versions, go to the "Download" area to get a history of all extension versions.
</div>
</div>
<f:if condition="{extension.tags}">
<div class="col-md-6">
<h3>Tags</h3>
<p class="tags">
<f:for each="{extension.tags}" as="tag">
<f:link.page class="btn btn-info mb-1" additionalParams="{q: '{tag.title}'}">{tag.title}</f:link.page>
</f:for>
</p>
</div>
<div class="mb-3">
<p>{extension.lastVersion.description}</p>
<f:if condition="{extension.lastVersion.typo3Dependency}">
<p>
<strong>
This version works for TYPO3 {extension.lastVersion.typo3Dependency.versionString}
</strong>
</p>
</f:if>
</div>
<f:if condition="{extension.tags}">
<h3>Tags</h3>
<p class="tags">
<f:for each="{extension.tags}" as="tag">
<f:link.page class="btn btn-info mb-1" additionalParams="{q: '{tag.title}'}">#{tag.title}</f:link.page>
</f:for>
</p>
</f:if>
<div class="row mb-3">
<div class="col-md-6">
<div class="col-md-8">
<h3>
<f:translate key="last_upload_comment" />
</h3>
<p>
<f:format.nl2br>{extension.lastVersion.uploadComment}</f:format.nl2br>
</p>
<h3>
<f:translate key="downloads_by_version" />
</h3>
<f:format.raw>
<terfe2:chart object="{extension}" method="downloadsByVersion" height="220" width="375" pointCount="{settings.defaultPointCount}" renderOnLoad="1" />
</f:format.raw>
<f:if condition="{versionHistory->f:count()} >= 1}">
<h3>
<f:translate key="downloads_by_version" />
</h3>
<f:format.raw>
<terfe2:chart object="{extension}" method="downloadsByVersion" height="220" width="375" pointCount="{settings.defaultPointCount}" renderOnLoad="1" />
</f:format.raw>
</f:if>
</div>
<div class="col-md-6">
<f:render partial="ExtensionSingleInfo" arguments="{extension:extension, settings:settings, owner:owner, flattrUrl:flattrUrl, documentationLink:documentationLink, qualityLinkNotBroken:qualityLinkNotBroken, urlToQualityServer:urlToQualityServer}" />
<div class="col-md-4">
<div class="alert alert-info">
<f:render partial="ExtensionSingleInfo" arguments="{extension:extension, settings:settings, owner:owner, flattrUrl:flattrUrl, documentationLink:documentationLink, qualityLinkNotBroken:qualityLinkNotBroken, urlToQualityServer:urlToQualityServer}" />
</div>
</div>
</div>
<f:render partial="InstallationHowTo" arguments="{_all}" />
<f:if condition="{versionHistory->f:count()} >= 1">
<h3>
<f:translate key="version_history" />
......@@ -169,89 +92,28 @@
</div>
</f:if>
<f:if condition="{extensionsByUser}">
<script type="text/javascript">
$( '.carousel' ).carousel( {
interval: 2000
} )
</script>
<h3 class="mb-3">
<f:translate key="other_extensions_by_user" />
</h3>
<div id="extensionsByUser" class="carousel slide mb-5" data-ride="carousel">
<div class="carousel-inner" role="listbox">
<f:for each="{extensionsByUser}" as="extByUser" iteration="iterator">
<f:if condition="{iterator.isFirst}">
<f:then>
<div class="carousel-item active">
<div class="card-group">
</f:then>
<f:else>
<f:if condition="{iterator.index} % 3">
<f:else>
<f:if condition="{settings.show.reviewForm}">
<f:security.ifHasRole role="{settings.reviewerGroupUid}">
<div class="hide-tab tab-content lite-tab-panes-black">
<div class="ter-ext-single" style="padding-top: 10px;">
<f:render partial="ReviewForm" arguments="{extension: extension}" />
</div>
</div>
</div>
<div class="carousel-item">
<div class="card-group">
</f:else>
</f:security.ifHasRole>
</f:if>
</f:else>
</f:if>
<div class="card ml-3">
<div class="card-header">
<h4 class="card-title">
<f:link.action action="show" arguments="{extension : extByUser}">
{extByUser.lastVersion.title}
</f:link.action>
</h4>
</div>
<div class="card-block">
<p class="card-text">{extByUser.lastVersion.description}</p>
</div>
</div>
<f:if condition="{iterator.isLast}">
<f:then>
</div>
</div>
</f:then>
</f:if>
</f:for>
<a class="carousel-control-prev" href="#extensionsByUser" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#extensionsByUser" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
</f:if>
<div class="socialshareprivacy"></div>
<f:if condition="{settings.show.reviewForm}">
<f:security.ifHasRole role="{settings.reviewerGroupUid}">
<div class="hide-tab tab-content lite-tab-panes-black">
<div class="ter-ext-single" style="padding-top: 10px;">
<f:render partial="ReviewForm" arguments="{extension: extension}" />
</div>
<f:link.page pageUid="1" class="btn btn-success mb-3">
<f:translate key="back_to_extension_list" />
</f:link.page>
</f:then>
<f:else>
<div class="alert alert-warning">
<f:translate key="msg.extension_not_found" />
</div>
</f:security.ifHasRole>
</f:if>
<div class="socialshareprivacy"></div>
<f:link.page class="btn btn-success">
<f:translate key="back_to_extension_list" />
</f:link.page>
</f:then>
<f:else>
<div class="alert alert-warning">
<f:translate key="msg.extension_not_found" />
</div>
</f:else>
</f:else>
</f:if>
</f:section>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment