[BUGFIX] Hide download distributions in composer mode 54/52354/3
authorFrans Saris <franssaris@gmail.com>
Tue, 4 Apr 2017 08:40:38 +0000 (10:40 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Sun, 9 Apr 2017 16:39:22 +0000 (18:39 +0200)
When installation is done with composer hide the
download distributions options in the install steps.

Resolves: #80673
Releases: master
Change-Id: I0cce6888b1af84cec879ce415106acf81fbac146
Reviewed-on: https://review.typo3.org/52354
Reviewed-by: Mathias Brodala <mbrodala@pagemachine.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/install/Classes/Controller/Action/Step/DefaultConfiguration.php
typo3/sysext/install/Resources/Private/Templates/Action/Step/DefaultConfiguration.html

index e3da688..ff21342 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Install\Controller\Action\Step;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Registry;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -164,6 +165,7 @@ For each website you need a TypoScript template on the main page of your website
     protected function executeAction()
     {
         $this->assignSteps();
+        $this->view->assign('composerMode', Bootstrap::usesComposerClassLoading());
         return $this->view->render();
     }
 }
index 086080d..3fb0eb0 100644 (file)
        </p>
 
        <p>&nbsp;</p>
-       <div class="alert alert-notice">
-               <h4>Want a pre-configured site?</h4>
-               <p>
-                       You now have an empty installation. If you want a pre-configured site, there are
-                       distributions on the web which can be installed via the Extension Manager.
-                       If you check the option below, the list of distributions will be fetched and you will
-                       be able to choose one directly.
-                       <strong>Please note: This may take some time after login.</strong>
-               </p>
-       </div>
+       <f:if condition="!{composerMode}">
+               <div class="alert alert-notice">
+                       <h4>Want a pre-configured site?</h4>
+                       <p>
+                               You now have an empty installation. If you want a pre-configured site, there are
+                               distributions on the web which can be installed via the Extension Manager.
+                               If you check the option below, the list of distributions will be fetched and you will
+                               be able to choose one directly.
+                               <strong>Please note: This may take some time after login.</strong>
+                       </p>
+               </div>
+       </f:if>
 
        <form method="post">
                <f:render partial="Action/Common/HiddenFormFields" arguments="{_all}" />
                <input type="hidden" value="execute" name="install[set]" />
                <div class="form-group">
-                       <div class="radio">
-                               <label for="load-distributions">
-                                       <input type="radio" id="load-distributions" name="install[values][sitesetup]" value="loaddistribution" />
-                                       Yes, download the list of distributions.
-                               </label>
-                       </div>
+                       <f:if condition="!{composerMode}">
+                               <div class="radio">
+                                       <label for="load-distributions">
+                                               <input type="radio" id="load-distributions" name="install[values][sitesetup]" value="loaddistribution" />
+                                               Yes, download the list of distributions.
+                                       </label>
+                               </div>
+                       </f:if>
                        <div class="radio">
                                <label for="create-site">
                                        <input type="radio" id="create-site" name="install[values][sitesetup]" value="createsite" />