Browse Source

Merge branch 'release/0.6.1'

Olivier Massot 4 years ago
parent
commit
84bac0cfab
40 changed files with 184 additions and 2406 deletions
  1. 1 0
      README.md
  2. 4 1
      ot_core/Classes/Controller/SelectedSiteController.php
  3. 0 119
      ot_core/Classes/Http/ApiController.php
  4. 1 0
      ot_core/Classes/Service/OpentalentEnvService.php
  5. 0 21
      ot_core/Configuration/Backend/Routes.php
  6. 0 80
      ot_templating/Classes/ViewHelpers/Organizations/AsGeoMarkersArrayViewHelper.php
  7. 56 0
      ot_templating/Classes/ViewHelpers/Request/GetOtEnvVarViewHelper.php
  8. 3 0
      ot_templating/Resources/Private/Language/locallang.xlf
  9. 1 1
      ot_templating/Resources/Private/Layouts/Classic/1Col.html
  10. 30 0
      ot_templating/Resources/Private/Layouts/Classic/StructureDetails.html
  11. 11 85
      ot_templating/Resources/Private/Layouts/Classic/Structures.html
  12. 0 101
      ot_templating/Resources/Private/Layouts/Classic/StructuresFrame.html
  13. 32 0
      ot_templating/Resources/Private/Layouts/Modern/StructureDetails.html
  14. 12 96
      ot_templating/Resources/Private/Layouts/Modern/Structures.html
  15. 3 3
      ot_templating/Resources/Private/Templates/Page/StructureDetails.html
  16. 7 0
      ot_templating/Resources/Public/assets/Classic/script/iframeResizer.min.js
  17. 0 923
      ot_templating/Resources/Public/assets/Classic/script/structures.js
  18. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-blue.css
  19. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-blue.css.map
  20. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-green.css
  21. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-green.css.map
  22. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-grey.css
  23. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-grey.css.map
  24. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-light-blue.css
  25. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-light-blue.css.map
  26. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-light-red.css
  27. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-light-red.css.map
  28. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-orange.css
  29. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-orange.css.map
  30. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-purple.css
  31. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-purple.css.map
  32. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-red.css
  33. 0 0
      ot_templating/Resources/Public/assets/Classic/style/classic-red.css.map
  34. 10 133
      ot_templating/Resources/Public/assets/Classic/style/module/_structures.scss
  35. 0 705
      ot_templating/Resources/Public/assets/Classic/style/module/_structuresframe.scss
  36. 0 0
      ot_templating/Resources/Public/assets/Classic/style/style.css
  37. 0 0
      ot_templating/Resources/Public/assets/Classic/style/style.css.map
  38. 0 1
      ot_templating/Resources/Public/assets/Classic/style/style.scss
  39. 7 0
      ot_templating/Resources/Public/assets/Modern/script/iframeResizer.min.js
  40. 6 137
      ot_templating/Resources/Public/assets/Modern/style/custom.css

+ 1 - 0
README.md

@@ -34,3 +34,4 @@ Pour plus d'information sur chaque extension, consultez les readme de chacune d'
 3. Faire un 'dump autoload':
 
     composer dumpautoload
+

+ 4 - 1
ot_core/Classes/Controller/SelectedSiteController.php

@@ -40,6 +40,7 @@ class SelectedSiteController extends ActionController
      *
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
      * @throws \Opentalent\OtCore\Exception\NoSuchWebsiteException
+     * @throws \Exception
      */
     protected function callActionMethod() {
 
@@ -72,7 +73,9 @@ class SelectedSiteController extends ActionController
 
         // No site is selected, redirect to the warning page
         if ($this->actionMethodName != 'displayNoSelectedPageWarningAction' && $this->currentRootUid == null) {
-            $this->forward('displayNoSelectedPageWarning', 'SelectedSite', 'OtCore');
+            throw new \Exception("No website selected");
+            // forward does not work correctly when called from another extension...
+            // $this->forward('displayNoSelectedPageWarning', 'SelectedSite', 'OtCore');
         }
 
         parent::callActionMethod();

+ 0 - 119
ot_core/Classes/Http/ApiController.php

@@ -1,119 +0,0 @@
-<?php
-
-namespace Opentalent\OtCore\Http;
-
-use Opentalent\OtCore\Exception\ApiRequestException;
-use Opentalent\OtCore\Service\OpentalentEnvService;
-use PDO;
-use TYPO3\CMS\Core\Http\JsonResponse;
-use TYPO3\CMS\Core\Http\ServerRequest;
-
-/**
- * Actions for Http API calls
- *
- * @package Opentalent\OtCore\Http
- */
-class ApiController
-{
-    /**
-     * Return a connection to the DB matching the current context
-     *
-     * @param ServerRequest $request
-     * @return PDO
-     */
-    private function getCnn(ServerRequest $request) {
-        $cnn = new PDO(
-            "mysql:host=" . OpentalentEnvService::get('DB_HOST') . ";dbname=opentalent",
-            OpentalentEnvService::get('DB_USER'),
-            OpentalentEnvService::get('DB_PASSWORD'),
-            array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')
-        );
-        $cnn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-
-        return $cnn;
-    }
-
-    /**
-     * -- Target of the route 'all' --
-     *
-     * Get all of the Opentalent structures directly
-     * from the Opentalent DB (API Platform is too slow with so many records)
-     *
-     * @param ServerRequest $request
-     * @return JsonResponse
-     */
-    public function getAllStructures(ServerRequest $request)
-    {
-        $cnn = $this->getCnn($request);
-
-        $stmt = $cnn->prepare(
-            "SELECT o.id, o.name, o.logo_id as logoId, o.principalType, p.otherWebsite as website, a.latitude, a.longitude,
-                       TRIM(BOTH ' ' FROM CONCAT(a.streetAddress, ' ', a.streetAddressSecond, ' ', a.streetAddressThird)) AS streetAddress,
-                       a.postalCode, a.addressCity, c.name AS country,
-                        (SELECT CONCAT(GROUP_CONCAT(DISTINCT CONCAT(tp.name)))
-                        FROM organization_type_of_practices AS otp
-                        LEFT JOIN TypeOfPractice AS tp ON(tp.id = otp.typeofpractice_id)
-                        WHERE otp.organization_id = o.id) AS practices,
-                       n1.parent_id as n1Id, net1.name as n1Name, n2.parent_id as n2Id, n3.parent_id as n3Id, n4.parent_id as n4Id, n5.parent_id as n5Id,
-                       CONCAT_WS(',', n1.parent_id, n2.parent_id, n3.parent_id, n4.parent_id, n5.parent_id) as parents
-                    FROM opentalent.Organization o
-                        INNER JOIN opentalent.Parameters p on o.parameters_id = p.id
-                        INNER JOIN (SELECT * FROM opentalent.OrganizationAddressPostal WHERE `type`='ADDRESS_HEAD_OFFICE') oa on oa.organization_id = o.id
-                        INNER JOIN opentalent.AddressPostal a on oa.addressPostal_id = a.id
-                        LEFT JOIN opentalent.Country c ON (c.id = a.addressCountry_id)
-                        INNER JOIN (SELECT * FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n1 on n1.organization_id = o.id
-                        INNER JOIN Organization net1 ON net1.id = n1.parent_id
-                        LEFT JOIN (SELECT * FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n2 on n2.organization_id = n1.parent_id
-                        LEFT JOIN (SELECT * FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n3 on n3.organization_id = n2.parent_id
-                        LEFT JOIN (SELECT * FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n4 on n4.organization_id = n3.parent_id
-                        LEFT JOIN (SELECT * FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n5 on n5.organization_id = n4.parent_id
-        ;");
-        $stmt->execute();
-        $stmt->setFetchMode(PDO::FETCH_ASSOC);
-        $data = $stmt->fetchAll(PDO::FETCH_ASSOC);
-        return new JsonResponse($data);
-    }
-
-    /**
-     * -- Target of the route 'get' --
-     *
-     * Get a structure directly with the specific data required in the structures template
-     *
-     * @param ServerRequest $request
-     * @return JsonResponse
-     * @throws ApiRequestException
-     */
-    public function getStructureById(ServerRequest $request)
-    {
-        $params = $request->getQueryParams();
-        $organizationId = $params['organization-id'];
-        if (!$organizationId) {
-            throw new ApiRequestException('Missing argument: organization-id');
-        }
-        $cnn = $this->getCnn($request);
-
-        $stmt = $cnn->prepare(
-            "SELECT o.id, o.name, o.logo_id as logoId, p.otherWebsite as website, a.latitude, a.longitude,
-                       TRIM(BOTH ' ' FROM CONCAT(a.streetAddress, ' ', a.streetAddressSecond, ' ', a.streetAddressThird)) AS streetAddress,
-                       a.postalCode, a.addressCity, cp.telphone, cp.email, o.facebook, o.twitter, o.instagram,
-                       (SELECT CONCAT(GROUP_CONCAT(DISTINCT CONCAT(tp.name)))
-                        FROM organization_type_of_practices AS otp
-                        LEFT JOIN TypeOfPractice AS tp ON(tp.id = otp.typeofpractice_id)
-                        WHERE otp.organization_id = o.id) AS practices,
-                       n1.parent_id as n1Id, net1.name as n1Name
-                    FROM opentalent.Organization o
-                        INNER JOIN opentalent.Parameters p on o.parameters_id = p.id
-                        INNER JOIN (SELECT * FROM opentalent.OrganizationAddressPostal WHERE `type`='ADDRESS_HEAD_OFFICE') oa on oa.organization_id = o.id
-                        INNER JOIN opentalent.AddressPostal a on oa.addressPostal_id = a.id
-                        INNER JOIN (SELECT * FROM NetworkOrganization WHERE parent_id NOT IN (32366, 13) AND (endDate IS NULL OR endDate = '0000-00-00')) n1 on n1.organization_id = o.id
-                        INNER JOIN Organization net1 ON net1.id = n1.parent_id
-                        LEFT JOIN opentalent.organization_contactpoint ocp ON ocp.organization_id = o.id
-                        LEFT JOIN (SELECT * FROM opentalent.ContactPoint WHERE `contactType`='PRINCIPAL') cp ON cp.id = ocp.contactPoint_id
-                    WHERE o.id=" . $organizationId . ";"
-        );
-        $stmt->execute();
-        $stmt->setFetchMode(PDO::FETCH_ASSOC);
-        $data = $stmt->fetch(PDO::FETCH_ASSOC);
-        return new JsonResponse($data);
-    }
-}

+ 1 - 0
ot_core/Classes/Service/OpentalentEnvService.php

@@ -23,6 +23,7 @@ class OpentalentEnvService
         'DB_HOST' => 'prod-back',
         'DB_USER' => 'dbcloner',
         'DB_PASSWORD' => 'wWZ4hYcrmHLW2mUK',
+        'FRAMES_BASE_URI' => 'https://frames.opentalent.fr'
     ];
 
     public static function get($varname) {

+ 0 - 21
ot_core/Configuration/Backend/Routes.php

@@ -1,21 +0,0 @@
-<?php
-
-use Opentalent\OtCore\Http\ApiController;
-
-// Defines the routes used to trigger the admin actions
-// @see https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/BackendRouting/Index.html
-
-return [
-    // Get a json array containing all of the opentalent structures
-    'all-structures' => [
-        'path' => '/otcore/structures/all',
-        'target' => ApiController::class . '::getAllStructures',
-        'access' => 'public'
-    ],
-    // Get a json array containing the data for the requested opentalent structure
-    'get-by-id' => [
-        'path' => '/otcore/structures/get',
-        'target' => ApiController::class . '::getStructureById',
-        'access' => 'public'
-    ]
-];

+ 0 - 80
ot_templating/Classes/ViewHelpers/Organizations/AsGeoMarkersArrayViewHelper.php

@@ -1,80 +0,0 @@
-<?php
-
-namespace Opentalent\OtTemplating\ViewHelpers\Organizations;
-
-use FluidTYPO3\Vhs\Traits\TemplateVariableViewHelperTrait;
-use Opentalent\OtCore\ViewHelpers\OtAbstractViewHelper;
-use Opentalent\OtCore\Domain\Model\Organization;
-use Opentalent\OtCore\Domain\Repository\OrganizationRepository;
-use Opentalent\OtCore\Exception\ApiRequestException;
-
-/**
- *   This viewhelper formats an array of Organization / FederationStructures objects into an json-array
- *   containing the data needed by the leaflet markers: [{id: 0, long: 0, lat: 0, label: ''}, ...]
- *
- *     {namespace ot=Opentalent\OtTemplating\ViewHelpers}
- *
- *     <ot:organizations.asGeoMarkersArray structures="structures">
- *          <f:debug>{organization}</f:debug>
- *     </ot:organizations.asGeoMarkersArray>
- *
- * @package Opentalent\OtTemplating\ViewHelpers
- */
-class AsGeoMarkersArrayViewHelper extends OtAbstractViewHelper {
-
-    use TemplateVariableViewHelperTrait;
-
-    /**
-     * >> Required to prevent typo3 to escape the html output
-     * @var boolean
-     */
-    protected $escapeOutput = true;
-
-    /**
-     * -- This method is expected by Fluid --
-     * Declares the viewhelper's parameters
-     */
-    public function initializeArguments()
-    {
-        $this->registerArgument(
-            'structures',
-            'array',
-            'Array of Organization or FederationStructure objects',
-            true
-        );
-    }
-
-    /**
-     * -- This method is expected by Fluid --
-     * Renders the content as html
-     *
-     * @return string
-     * @throws ApiRequestException
-     */
-    public function render()
-    {
-        $structures = $this->arguments['structures'];
-
-        $markers = [];
-        foreach ($structures as $structure)  {
-            if ($structure->getLongitude() && $structure->getLatitude()) {
-                $markers[] = [
-                    'id' => $structure->getId(),
-                    'long' => $structure->getLongitude(),
-                    'lat' => $structure->getLatitude(),
-                    'label' => $structure->getName() ?? ""
-                ];
-            }
-        }
-
-        return json_encode($markers);
-    }
-
-    /**
-     * @param OrganizationRepository $organizationRepository
-     */
-    public function injectOrganizationRepository(OrganizationRepository $organizationRepository)
-    {
-        $this->organizationRepository = $organizationRepository;
-    }
-}

+ 56 - 0
ot_templating/Classes/ViewHelpers/Request/GetOtEnvVarViewHelper.php

@@ -0,0 +1,56 @@
+<?php
+
+namespace Opentalent\OtTemplating\ViewHelpers\Request;
+
+use Closure;
+use Opentalent\OtCore\Service\OpentalentEnvService;
+use Opentalent\OtCore\ViewHelpers\OtAbstractViewHelper;
+use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
+
+/**
+ *   Returns an opentalent environment variable from the OpentalentEnvService
+ *
+ *     {namespace ot=Opentalent\OtTemplating\ViewHelpers}
+ *
+ *     {ot:request.getOtEnvVar(argument: 'name')}
+ *
+ * @package Opentalent\OtTemplating\ViewHelpers
+ */
+class GetOtEnvVarViewHelper extends OtAbstractViewHelper {
+
+    private OpentalentEnvService $opentalentEnvService;
+
+    /**
+     * @param OpentalentEnvService $opentalentEnvService
+     */
+    public function injectOpentalentEnvService(OpentalentEnvService $opentalentEnvService)
+    {
+        $this->opentalentEnvService = $opentalentEnvService;
+    }
+
+    /**
+     * -- This method is expected by Fluid --
+     * Declares the viewhelper's parameters
+     */
+    public function initializeArguments()
+    {
+        $this->registerArgument('argument',
+            'string',
+            "The argument's name",
+            true);
+    }
+
+    /**
+     * -- This method is expected by Fluid --
+     * Renders the content as html
+     *
+     * @param array $arguments
+     * @param Closure $renderChildrenClosure
+     * @param RenderingContextInterface $renderingContext
+     * @return string
+     */
+    public function render() {
+        $argument = $this->arguments['argument'];
+        return $this->opentalentEnvService->get($argument);
+    }
+}

+ 3 - 0
ot_templating/Resources/Private/Language/locallang.xlf

@@ -61,6 +61,9 @@
 			<trans-unit id="template_structures">
 				<source>Gabarit Structures adhérentes</source>
 			</trans-unit>
+			<trans-unit id="template_structure_details">
+				<source>Gabarit Infos Structure</source>
+			</trans-unit>
 			<trans-unit id="template_structures_events">
 				<source>Gabarit Evènements des structures</source>
 			</trans-unit>

+ 1 - 1
ot_templating/Resources/Private/Layouts/Classic/1Col.html

@@ -7,7 +7,7 @@
 <div class="main">
 
     <f:comment><!-- Central column --></f:comment>
-    <div class="centralcol">
+    <div class="centralcol" style="max-width: 100%;">
         <div class="content">
 
             <f:comment><!-- render the content of the content section (middle column) --></f:comment>

+ 30 - 0
ot_templating/Resources/Private/Layouts/Classic/StructureDetails.html

@@ -0,0 +1,30 @@
+{namespace v=FluidTYPO3\Vhs\ViewHelpers}
+{namespace ot=Opentalent\OtTemplating\ViewHelpers}
+
+<f:comment><!-- Special layout for the Members page --></f:comment>
+<f:layout name="Structures" />
+
+<v:asset.script name="classic-iframe-resizer"
+                path="EXT:ot_templating/Resources/Public/assets/Classic/script/iframeResizer.min.js"
+                standalone="1"
+                rewrite="0" />
+
+<f:comment><!-- Render the header defined in partial/header.html--></f:comment>
+<f:render partial="Classic/Header" arguments="{_all}" />
+
+<div class="main">
+    <f:comment><!-- Central column --></f:comment>
+    <div class="content">
+        <div class="ot-structures">
+            <iframe
+                    src="{ot:request.getOtEnvVar(argument: 'FRAMES_BASE_URI')}/structures/{settings.organizationId}?theme={ot:template.getPreference(key: 'themeColor')}"
+                    referrerpolicy="strict-origin"
+                    style="border: none;"
+                    onload="iFrameResize()"
+            ></iframe>
+        </div>
+    </div>
+</div>
+
+<f:comment><!-- Render the footer defined in partial/footer.html--></f:comment>
+<f:render partial="Classic/Footer" />

+ 11 - 85
ot_templating/Resources/Private/Layouts/Classic/Structures.html

@@ -4,98 +4,24 @@
 <f:comment><!-- Special layout for the Members page --></f:comment>
 <f:layout name="Structures" />
 
+<v:asset.script name="classic-iframe-resizer"
+                path="EXT:ot_templating/Resources/Public/assets/Classic/script/iframeResizer.min.js"
+                standalone="1"
+                rewrite="0" />
+
 <f:comment><!-- Render the header defined in partial/header.html--></f:comment>
 <f:render partial="Classic/Header" arguments="{_all}" />
 
 <div class="main">
     <f:comment><!-- Central column --></f:comment>
     <div class="content">
-        <f:comment><!-- All members --></f:comment>
-        <h2><f:translate key="member-companies"/></h2>
-
         <div class="ot-structures">
-
-            <ot:organizations.getChildren as="structuresCollection"
-                                          organizationId="{settings.organizationId}">
-
-                <div class="ot-structures">
-                    <div class="structure-controls">
-                        <div class="structure-search">
-                            <form>
-                                <input type="text"
-                                       name="search-loc"
-                                       placeholder="{f:translate(key: 'where')}?"
-                                       value="{ot:request.getArgument(argument: 'search-loc')}"/>
-
-                                <f:comment><!--
-                                Important: if the cache is not disabled,
-                                 then the results won't be updated even after submitting this form
-                                 --></f:comment>
-                                <input type="hidden"
-                                       name="no_cache"
-                                       value="1">
-
-                                <button name="search-submit"><f:translate key="find"/></button>
-                            </form>
-                        </div>
-
-                        <div id="structure-map">
-                            <f:for each="{structuresCollection.members}" as="structure" iteration="it">
-                                <f:if condition="{structure.longitude}">
-                                    <i class="item-geodata" style="display: none;"
-                                       data-id="{structure.id}"
-                                       data-long="{structure.longitude}"
-                                       data-lat="{structure.latitude}"
-                                       data-label="<b>{structure.name}</b><br/>{structure.streetAdress}<br/>{structure.postalCode} {structure.addressCity}">
-                                    </i>
-                                </f:if>
-                            </f:for>
-                        </div>
-                    </div>
-
-                    <div class="structure-results">
-                        <f:if condition="{structuresCollection.totalItems} == 0">
-                            <span><f:translate key="no-result"/></span>
-                        </f:if>
-
-                        <f:for each="{structuresCollection.members}" as="structure">
-                            <div class="structure" data-id="{structure.id}">
-                                <div class="structure-preview">
-
-                                    <div class="structure-poster">
-                                        <f:if condition="{structure.logo}">
-                                            <f:then>
-                                                <img src='{structure.logo}' alt="poster" />
-                                            </f:then>
-                                            <f:else>
-                                                <f:image src="EXT:ot_templating/Resources/Public/media/event-default.jpg" alt="poster" />
-                                            </f:else>
-                                        </f:if>
-                                    </div>
-
-                                    <div class="structure-summary">
-                                        <span class="structure-name">
-                                            {structure.name}
-                                        </span>
-                                        <span class="structure-adress">
-                                            {structure.streetAdress}<br/>
-                                            {structure.postalCode} {structure.addressCity}
-                                        </span>
-                                    </div>
-                                </div>
-
-                                <a href="https://{structure.subdomain}.opentalent.fr" class="structure-see">
-                                    <i class="fa fa-plus" style="margin-right: 5px;"></i>
-                                    <span><f:translate key="see"/></span>
-                                </a>
-                            </div>
-                        </f:for>
-
-                        {ot:pagination(collection: structuresCollection)}
-                    </div>
-                </div>
-            </ot:organizations.getChildren>
-
+            <iframe
+                    src="{ot:request.getOtEnvVar(argument: 'FRAMES_BASE_URI')}/structures/?parent={settings.organizationId}&theme={ot:template.getPreference(key: 'themeColor')}"
+                    referrerpolicy="strict-origin"
+                    style="border: none;"
+                    onload="iFrameResize()"
+            ></iframe>
         </div>
     </div>
 </div>

File diff suppressed because it is too large
+ 0 - 101
ot_templating/Resources/Private/Layouts/Classic/StructuresFrame.html


+ 32 - 0
ot_templating/Resources/Private/Layouts/Modern/StructureDetails.html

@@ -0,0 +1,32 @@
+{namespace v=FluidTYPO3\Vhs\ViewHelpers}
+{namespace ot=Opentalent\OtTemplating\ViewHelpers}
+
+<f:comment><!-- Special layout for the Members page --></f:comment>
+<f:layout name="Structures" />
+
+<v:asset.script name="modern-iframe-resizer"
+                path="EXT:ot_templating/Resources/Public/assets/Modern/script/iframeResizer.min.js"
+                standalone="1"
+                rewrite="0" />
+
+<section class="t-container st-effect-3">
+    <div class="wrapper">
+
+        <f:comment><!-- Render the header defined in partial/header.html--></f:comment>
+        <f:render partial="Modern/Header" arguments="{_all}" />
+
+        <section class="page-section-ptb">
+            <div class="ot-structures">
+                <iframe src="{ot:request.getOtEnvVar(argument: 'FRAMES_BASE_URI')}/structures/{settings.organizationId}?theme={ot:template.getPreference(key: 'themeColor')}"
+                        referrerpolicy="strict-origin"
+                        style="border: none;"
+                        onload="iFrameResize()"
+                ></iframe>
+            </div>
+        </section>
+
+        <f:comment><!-- Render the footer defined in partial/footer.html--></f:comment>
+        <f:render partial="Modern/Footer" />
+
+    </div>
+</section>

+ 12 - 96
ot_templating/Resources/Private/Layouts/Modern/Structures.html

@@ -4,112 +4,28 @@
 <f:comment><!-- Special layout for the Members page --></f:comment>
 <f:layout name="Structures" />
 
+<v:asset.script name="modern-iframe-resizer"
+                path="EXT:ot_templating/Resources/Public/assets/Modern/script/iframeResizer.min.js"
+                standalone="1"
+                rewrite="0" />
+
 <section class="t-container st-effect-3">
     <div class="wrapper">
 
         <f:comment><!-- Render the header defined in partial/header.html--></f:comment>
         <f:render partial="Modern/Header" arguments="{_all}" />
 
-
         <section class="page-section-ptb">
-            <div class="container">
-                <div class="row">
-                    <div class="col-sm-12 mt-30">
-                        <f:comment><!-- All members --></f:comment>
-                        <h3><f:translate key="member-companies"/></h3>
-
-                        <div class="ot-structures">
-
-                            <ot:organizations.getChildren as="structuresCollection"
-                                                          organizationId="{settings.organizationId}">
-
-
-                                <div class="ot-structures">
-                                    <div class="structure-controls">
-                                        <div class="structure-search">
-                                            <form>
-                                                <input type="text"
-                                                       name="search-loc"
-                                                       placeholder="{f:translate(key: 'where')}?"
-                                                       value="{ot:request.getArgument(argument: 'search-loc')}"/>
-
-                                                <f:comment><!--
-                                                Important: if the cache is not disabled,
-                                                 then the results won't be updated even after submitting this form
-                                                 --></f:comment>
-                                                <input type="hidden"
-                                                       name="no_cache"
-                                                       value="1">
-
-                                                <button name="search-submit"><f:translate key="find"/></button>
-                                            </form>
-                                        </div>
-
-                                        <div id="structure-map">
-                                            <f:for each="{structuresCollection.members}" as="structure" iteration="it">
-                                                <f:if condition="{structure.longitude}">
-                                                    <i class="item-geodata" style="display: none;"
-                                                       data-id="{structure.id}"
-                                                       data-long="{structure.longitude}"
-                                                       data-lat="{structure.latitude}"
-                                                       data-label="<b>{structure.name}</b><br/>{structure.streetAdress}<br/>{structure.postalCode} {structure.addressCity}">
-                                                    </i>
-                                                </f:if>
-                                            </f:for>
-                                        </div>
-                                    </div>
-
-                                    <div class="structure-results">
-                                        <f:if condition="{structuresCollection.totalItems} == 0">
-                                            <span><f:translate key="no-result"/></span>
-                                        </f:if>
-
-                                        <f:for each="{structuresCollection.members}" as="structure">
-                                            <div class="structure" data-id="{structure.id}">
-                                                <div class="structure-preview">
-
-                                                    <div class="structure-poster">
-                                                        <f:if condition="{structure.logo}">
-                                                            <f:then>
-                                                                <img src='{structure.logo}' alt="poster" />
-                                                            </f:then>
-                                                            <f:else>
-                                                                <f:image src="EXT:ot_templating/Resources/Public/media/event-default.jpg" alt="poster" />
-                                                            </f:else>
-                                                        </f:if>
-                                                    </div>
-
-                                                    <div class="structure-summary">
-                                                        <span class="structure-name">
-                                                            {structure.name}
-                                                        </span>
-                                                        <span class="structure-adress">
-                                                            {structure.streetAdress}<br/>
-                                                            {structure.postalCode} {structure.addressCity}
-                                                        </span>
-                                                    </div>
-                                                </div>
-
-                                                <a target="_blank" href="https://{structure.subdomain}.opentalent.fr" class="structure-see">
-                                                    <i class="fa fa-plus" style="margin-right: 5px;"></i>
-                                                    <span><f:translate key="see"/></span>
-                                                </a>
-                                            </div>
-                                        </f:for>
-
-                                        {ot:pagination(collection: structuresCollection)}
-                                    </div>
-                                </div>
-                            </ot:organizations.getChildren>
-
-                        </div>
-                    </div>
-                </div>
+            <div class="ot-structures">
+                <iframe src="{ot:request.getOtEnvVar(argument: 'FRAMES_BASE_URI')}/structures/?parent={settings.organizationId}&theme={ot:template.getPreference(key: 'themeColor')}"
+                        referrerpolicy="strict-origin"
+                        style="border: none;"
+                        onload="iFrameResize()"
+                ></iframe>
             </div>
-        </div>
+        </section>
 
         <f:comment><!-- Render the footer defined in partial/footer.html--></f:comment>
         <f:render partial="Modern/Footer" />
-
     </div>
 </section>

+ 3 - 3
ot_templating/Resources/Private/Templates/Page/StructuresFrame.html → ot_templating/Resources/Private/Templates/Page/StructureDetails.html

@@ -2,11 +2,11 @@
 {namespace v=FluidTYPO3\Vhs\ViewHelpers}
 {namespace ot=Opentalent\OtTemplating\ViewHelpers}
 
-<f:comment><!-- uses the layout StructuresFrame, defined in layouts/[templateName]/StructuresFrame.html --></f:comment>
-<f:layout name="{ot:template.current()}/StructuresFrame" />
+<f:comment><!-- uses the layout Structures, defined in layouts/[templateName]/Structures.html --></f:comment>
+<f:layout name="{ot:template.current()}/StructureDetails" />
 
 <f:section name='Configuration'>
-    <flux:form id="structures_frame" label="LLL:template_structures_frame" extensionName="Opentalent.OtTemplating">
+    <flux:form id="structureDetails" label="LLL:template_structure_details" extensionName="Opentalent.OtTemplating">
     </flux:form>
 
     <!-- Backend layout grid -->

File diff suppressed because it is too large
+ 7 - 0
ot_templating/Resources/Public/assets/Classic/script/iframeResizer.min.js


+ 0 - 923
ot_templating/Resources/Public/assets/Classic/script/structures.js

@@ -1,923 +0,0 @@
-// Specific code for the 'federation-structures' page
-
-const apiGetAllUrl = "/typo3/index.php?route=/otcore/structures/all";
-const apiGetByIdUrl = "/typo3/index.php?route=/otcore/structures/get";
-
-// Converts numeric degrees to radians
-function toRad(Value)
-{
-    return Value * Math.PI / 180;
-}
-
-//This function takes in latitude and longitude of two location and returns the distance between them as the crow flies (in km)
-function sphericDistance(lat1, lon1, lat2, lon2)
-{
-    let R = 6371; // km
-    let dLat = toRad(lat2-lat1);
-    let dLon = toRad(lon2-lon1);
-    lat1 = toRad(lat1);
-    lat2 = toRad(lat2);
-
-    let a = Math.sin(dLat/2) * Math.sin(dLat/2) +
-        Math.sin(dLon/2) * Math.sin(dLon/2) * Math.cos(lat1) * Math.cos(lat2);
-    let c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
-    return R * c;
-}
-
-const practicesFr = {
-    "BIG_BAND": "Big band",
-    "BRASS_BAND": "Brass band",
-    "ORCHESTRA_CLASS": "Classe d'orchestre",
-    "ACCORDION_ORCHESTRA": "Orchestre d'accordéons",
-    "HARMONY_ORCHESTRA": "Orchestre d'harmonie",
-    "PHILHARMONIC_ORCHESTRA": "Orchestre philharmonique",
-    "SYMPHONY_ORCHESTRA": "Orchestre symphonique",
-    "STRING_ORCHESTRA": "Orchestre à cordes",
-    "PLUCKED_ORCHESTRA": "Orchestre à plectres",
-    "FANFARE_BAND": "Orchestre de fanfare",
-    "BAGAD": "Bagad",
-    "BANDAS": "Bandas ou Fanfare de rue",
-    "BATTERY_FANFARE": "Batterie fanfare",
-    "BATTUCADA": "Battucada",
-    "FOLKLORIC_BAND": "Ensemble folklorique",
-    "FIFE_AND_DRUM": "Fifres et tambours",
-    "MARCHING_BAND": "Marching band ou Show parade",
-    "HUNTING_HORNS": "Trompes de chasse",
-    "CHILDRENS_CHOIR": "Choeur d'enfants",
-    "FEMAL_CHOIR": "Choeur de femmes",
-    "MENS_CHOIR": "Choeur d'hommes",
-    "MIXED_CHORUS": "Choeur mixte",
-    "VOCAL_BAND_UP_16": "Ensemble vocal (jusqu'à 16)",
-    "CLARINET_CHOIR": "Ensemble de clarinettes",
-    "COPPER_BAND": "Ensemble de cuivres",
-    "FLUTE_ENSEMBLE": "Ensemble de flûtes",
-    "SAXOPHONES_BAND": "Ensemble de saxophones",
-    "VIOLIN_BAND": "Ensemble de violons",
-    "PERCUSSION_BAND": "Ensemble de percussions",
-    "CURRENT_MUSIC_GROUP": "Groupe de Musique actuelle",
-    "CHAMBER_MUSIC_ENSEMBLE": "Ensemble de Musique de chambre",
-    "TRADITIONAL_MUSIC_ENSEMBLE": "Ensemble de Musique traditionnelle",
-    "JAZZ_BAND": "Ensemble de Jazz",
-    "EDUCATION": "Enseignement",
-    "CHEERLEADER": "Majorettes",
-    "TROOP": "Troupe",
-    "OTHER": "Autre"
-}
-
-// Specific JS used for the Structures layout
-// > Needs to be loaded after the main.js script
-$(document).ready(function() {
-
-    const queryParameters = new URLSearchParams(window.location.search);
-
-    // Init
-    let document = $('html, body');
-    let structureFrame = $('.ot-structures-frame').first();
-    let structureFrameDetails = $('.ot-structures-frame-details').first();
-
-    // let organizationId = structureFrame.data('org-id');
-
-    let resultsPageDiv = structureFrame.find('.structures-page').first();
-    let pleaseWaitSpan = structureFrame.find('.please-wait').first();
-    let noResultSpan = structureFrame.find('.no-result').first();
-    let errorMsgSpan = structureFrame.find(".error-message").first();
-    let cardDivModel = structureFrame.find('.structure-card-model').first();
-    let paginationBar = structureFrame.find('.pagination-bar').first();
-    let paginationList = structureFrame.find('.pagination-list').first();
-    let gotoFirstPage = structureFrame.find('.goto-first-page').first();
-    let gotoLastPage = structureFrame.find('.goto-last-page').first();
-    let resultsCountMessage = structureFrame.find('.results-count-message').first();
-    let resultsCountVar = resultsCountMessage.find('.count').first();
-    let detailsSection = structureFrame.find('.structure-see').first();
-
-    let form = $("#structure-search-form");
-    let whatInput = form.find("input[name='search-query']").first();
-    let cityInput = form.find("input[name='search-city']").first();
-    let latInput = form.find("input[name='lat']").first();
-    let longInput = form.find("input[name='long']").first();
-    let practiceSelect = form.find("select[name='search-practice']").first();
-    let provinceSelect = form.find("select[name='search-province']").first();
-    let federationSelect = form.find("select[name='search-federation']").first();
-    let radiusSelect = form.find("select[name='search-radius']").first();
-    let resetButton = form.find("button.reset-search").first();
-    let submitButton = form.find("button.submit-search").first();
-
-    let organizationId = parseInt(queryParameters.get('organization-id') || structureFrame.data('organization-id'));
-    if (!organizationId) {
-        pleaseWaitSpan.hide();
-        errorMsgSpan.show();
-        throw 'Missing organization-id parameter';
-    }
-
-    // #### Instanciate and populate leaflet maps
-    let mapDiv = $('#structure-map').first();
-    let mapId = $(mapDiv).attr("id");
-
-    // Instanciate the map object  @see https://leafletjs.com/reference-1.6.0.html#map-factory
-    const mapOptions = {scrollWheelZoom: false, zoomSnap: 0.25};
-    map = L.map(mapId, mapOptions);
-    map.setView([46.71, 2.14], 6);
-    L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
-        attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
-    }).addTo(map);
-
-    var listenMapMoves = false;
-
-    var defaultsBounds = [51.03, -5.78, 41.2, 9.70];
-
-    // Set the view
-    let resetMapBounds = function () {
-        area = null;
-        bounds = L.latLngBounds(
-            L.latLng(defaultsBounds[0], defaultsBounds[1]),
-            L.latLng(defaultsBounds[2], defaultsBounds[3])
-        );
-        map.fitBounds(bounds);
-    }
-    resetMapBounds();
-
-    var clusters = null;
-
-    // Details view map
-    const structureMapOptions = {scrollWheelZoom: true, zoomSnap: 0.25};
-    let structureMap = L.map('structure-details-map', structureMapOptions);
-    L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
-        attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
-    }).addTo(structureMap);
-
-    // Call this method when a map is hidden or shown to force a re-rendering
-    function resizeMaps() {
-        map.invalidateSize();
-        structureMap.invalidateSize();
-    }
-
-
-    // #### Filters
-
-    // The current query
-    var query = {};
-    var area = null;
-
-    // Update the current query with form data
-    function updateQuery() {
-        query['what'] = whatInput.val();
-        query['lat'] = latInput.val();
-        query['long'] = longInput.val();
-        query['practice'] = practiceSelect.val();
-        query['province'] = provinceSelect.val();
-        query['federation'] = federationSelect.val();
-        query['radius'] = radiusSelect.val();
-    }
-
-    function updateArea(long1, lat1, long2, lat2) {
-        area = [long1, lat1, long2, lat2];
-    }
-
-    // Does the given structure match the current query
-    function matchCurrentQuery(structure) {
-        // Is the structure a member of the website federation?
-        if (![structure.n1Id, structure.n2Id, structure.n3Id, structure.n4Id, structure.n5Id].includes(organizationId)) {
-            return false;
-        }
-
-        // Filter by name
-        if (query['what'] && !structure.name.toLowerCase().includes(query['what'].toLowerCase())) {
-            return false;
-        }
-
-        // filter by geographical position
-        if (query['lat'] && query['long']) {
-            if (!structure.latitude || !structure.longitude) {
-                return false;
-            }
-
-            let radius = Number(query['radius']) ?? 0;
-
-            // radius is increased by 10km to approximate the city radius
-            radius += 10;
-
-            if (sphericDistance(query['lat'], query['long'], structure.latitude, structure.longitude) > radius) {
-                return false;
-            }
-        }
-
-        // filter by practice
-        if (query['practice'] && !structure.practices.includes(query['practice'])) {
-            return false;
-        }
-
-        if (query['province']) {
-            let province = query['province'];
-
-            // A leading '_' may have been added to prevent the '0' from being stripped by fluid
-            province = province.replace('_', '');
-
-            if (!structure.postalCode.startsWith(province)) {
-                return false
-            }
-        }
-        if (query['federation'] && !structure.parents.includes(Number(query['federation']))) {
-            return false;
-        }
-
-        // filter by map bounds
-        if (area !== null) {
-            if (structure.longitude < area[0] ||
-                structure.latitude < area[1] ||
-                structure.longitude > area[2] ||
-                structure.latitude > area[3]
-            ) {
-                if (structure.id == 498) {
-                    console.log(structure.longitude, structure.latitude, area);
-                    console.log(structure.longitude < area[0], structure.latitude < area[1], structure.longitude > area[2], structure.latitude > area[3])
-                }
-                return false;
-            }
-        }
-        return true;
-    }
-
-    function populatePracticeSelect() {
-        practiceSelect.children('option:not(:first)').remove();
-        let has_options = false;
-
-        for (const key in practicesFr) {
-            let option = '<option value="' + key + '">' + practicesFr[key] + '</option>';
-            practiceSelect.append(option);
-            has_options = true;
-        }
-        if (has_options) {
-            practiceSelect.prop("disabled", false);
-        }
-    }
-
-    function populateFederationsSelect() {
-        federationSelect.children('option:not(:first)').remove();
-        let has_options = false;
-
-        structures.forEach(function (structure) {
-            if (structure.n1Id === organizationId && structure.principalType.endsWith('FEDERATION')) {
-                let option = '<option value="' + structure.id + '">' + structure.name + '</option>';
-                federationSelect.append(option);
-                has_options = true;
-            }
-        })
-        if (has_options) {
-            federationSelect.prop("disabled", false);
-        }
-    }
-
-    // #### Display results
-    const itemsPerPage = 8;
-    let currentPage = 1;
-
-    updateQuery();
-
-    // on page link clicked event
-    function pageLinkClicked(e) {
-        e.preventDefault();
-        let page = $(this).data('page');
-        if (page > 0) {
-            currentPage = page;
-        }
-        refresh();
-        $('body,html').animate({scrollTop: 0},500);
-    }
-    gotoFirstPage.on('click', pageLinkClicked);
-    gotoLastPage.on('click', pageLinkClicked);
-
-    function refresh(listOnly=false) {
-
-        // Reinitialize current results
-        pleaseWaitSpan.show();
-        listenMapMoves = false;
-
-        resultsPageDiv.find('.structure-card').remove();
-        paginationList.find('.goto-page-li').remove();
-        paginationList.hide();
-        if (!listOnly && clusters !== null) {
-            map.removeLayer(clusters);
-        }
-
-        // ** Update results
-        let results = [];
-        structures.forEach(function(structure) {
-            if (matchCurrentQuery(structure)) {
-                results.push(structure)
-            }
-        });
-
-        sortKeys = function (x) {
-            return x.addressCity.toLowerCase() + x.name.toLowerCase();
-        }
-        results.sort((a, b) => sortKeys(a).localeCompare(sortKeys(b)));
-
-        // ** Show the results for the current page
-        let index = 0;
-
-        results.forEach(function(structure) {
-            if (((currentPage - 1) * itemsPerPage) <= index && index < (currentPage * itemsPerPage)) {
-                let cardDiv = $(cardDivModel).clone();
-                let practiceTagModel = cardDiv.find('.structure-practice-model').first();
-
-                cardDiv.data('id', structure.id);
-
-                if (structure.practices !== null) {
-                    let i = 1;
-                    for (const practice of structure.practices) {
-                        let tag = practiceTagModel.clone();
-
-                        if (i <= 3) {
-                            tag.text(practicesFr[practice]);
-                        } else {
-                            tag.text('+ ' + (practice.length - 3) + ' ...');
-                        }
-                        tag.removeClass('structure-practice-model')
-                        tag.addClass('structure-practice')
-                        tag.show();
-                        practiceTagModel.parent().append(tag);
-
-                        if (i > 3) { break; }
-                        i++;
-                    }
-                }
-
-                if (structure.logoId) {
-                    let poster = cardDiv.find('.structure-poster').first().children('img').first();
-                    poster.attr('src', 'https://api.opentalent.fr/app.php/_internal/secure/files/' + structure.logoId + '/0x60');
-                }
-
-                let cardTitle = cardDiv.find('.structure-name a').first();
-                cardTitle.text(structure.name);
-                cardTitle.attr('href', structure.website);
-
-                cardDiv.find('.structure-details-address').first().text(
-                    [structure.streetAddress, structure.postalCode, structure.addressCity].join(" ")
-                );
-                cardDiv.find('.structure-details-federation').first().text(structure.n1Name);
-
-                cardDiv.find('.structure-see').first().data('organization-id', structure.id)
-
-                cardDiv.show();
-                cardDiv.removeClass('structure-card-model');
-                cardDiv.addClass('structure-card');
-                cardDiv.appendTo(resultsPageDiv);
-            }
-            index++;
-        });
-
-        // ** Update results on map
-        if (!listOnly) {
-            clusters = L.markerClusterGroup();
-
-            results.forEach(function (item) {
-                if (item.longitude && item.latitude) {
-                    let marker = L.marker([item.latitude, item.longitude]);
-                    marker.bindPopup(`<b>${item.name}</b><br/>${item.postalCode} ${item.addressCity}<br/><a href="${item.website}" target="_blank">${item.website}</a>`);
-                    clusters.addLayer(marker);
-                }
-            });
-            map.addLayer(clusters);
-        }
-
-        // ** Update results count and pagination
-        let resultsCount = results.length;
-
-        resultsCountMessage.show();
-        resultsCountVar.text("" + resultsCount);
-
-        let pagesCount = Math.floor(resultsCount / itemsPerPage) + 1;
-        gotoLastPage.data("page", pagesCount);
-
-        let pageLiModel = paginationList.find('.goto-page-li-model').first();
-
-        let page_min = currentPage > 5 ? currentPage - 5 : 1;
-        let page_max = currentPage < (pagesCount - 5) ? currentPage + 5 : pagesCount;
-
-        for (let i = page_min; i <= page_max; i++) {
-            let pageLi = pageLiModel.clone();
-
-            let pageLink = pageLi.children('a').first();
-
-            pageLink.text("" + i);
-            pageLink.attr("data-page", i);
-            pageLink.on('click', pageLinkClicked)
-
-            if (i === currentPage) {
-                pageLi.addClass('current');
-            }
-            pageLi.removeClass('goto-page-li-model')
-            pageLi.addClass('goto-page-li')
-
-            pageLi.show();
-
-            pageLi.appendTo(paginationList);
-        }
-        paginationBar.show()
-        paginationList.show()
-
-        // Finalize
-        pleaseWaitSpan.hide();
-        listenMapMoves = true;
-    }
-
-    function fitMapToResults() {
-        bounds = clusters.getBounds();
-        if (bounds.isValid()) {
-            map.fitBounds(bounds);
-        }
-    }
-
-    // #### Load structures data and refresh
-    var structures;
-
-    populatePracticeSelect();
-
-    function loadStructures() {
-        structures = []
-
-        $.ajax({
-            type: 'GET',
-            url: apiGetAllUrl,
-            dataType: "json",
-            contentType: "application/json; charset=utf-8",
-            timeout : 12000,
-        })
-        .done(function(res) {
-
-            res.forEach(function(item) {
-                structure = item;
-                structure.n1Id = parseInt(structure.n1Id);
-                structure.n2Id = parseInt(structure.n2Id);
-                structure.n3Id = parseInt(structure.n3Id);
-                structure.n4Id = parseInt(structure.n4Id);
-                structure.n5Id = parseInt(structure.n5Id);
-                structure.practices = structure.practices !== null ? structure.practices.split(",") : [];
-                structures.push(structure);
-            })
-
-            populateFederationsSelect();
-            refresh();
-        })
-        .fail(function(xhr, textStatus, errorThrown) {
-            pleaseWaitSpan.hide();
-            errorMsgSpan.show();
-            throw 'Error while fetching the API data: ' + textStatus  + ' - ' + errorThrown;
-        });
-    }
-    loadStructures();
-
-
-    // #### Events
-
-    // Update query
-    form.on('submit', function(e) {
-        e.preventDefault();
-        updateQuery();
-        area = null;
-        currentPage = 1;
-        refresh();
-        if (Object.values(query).some((k) => k)) {
-            // if it's not an empty query, fit to results
-            fitMapToResults();
-        }
-    });
-
-    submitButton.on('click', function() {
-        form.submit();
-    });
-
-    $('.filters select', form).on('change', function() {
-        form.submit();
-    });
-
-    // Reset search fields
-    resetButton.on('click', function (e) {
-        e.preventDefault();
-        let form = $(this).closest('form');
-        form.find('input').each(function () {
-            $(this).val('');
-        });
-        form.find('select').each(function () {
-            $(this).val('');
-        });
-        resetMapBounds();
-        form.submit();
-    });
-
-    // Map goto commands
-    $('img[data-map-fit]').on('click', function (e) {
-        let goto = $(this).data('map-fit');
-        let corners = goto.split(";");
-        let p1 = corners[0].split(",");
-        let p2 = corners[1].split(",");
-        let bounds = L.latLngBounds(L.latLng(p1[0], p1[1]), L.latLng(p2[0], p2[1]));
-        map.fitBounds(bounds);
-    });
-
-    // Toggle structures list and map view
-    let filtersRow = form.find('.filters').first();
-    let buttonsRow = form.find('.search-buttons').first();
-
-    $('.activate-map-view').on('click', function (e) {
-        e.preventDefault();
-        if (structureFrame.hasClass('map-view')) {
-            // already in map view
-            return;
-        }
-        listenMapMoves = true;
-        structureFrame.removeClass('list-view');
-        structureFrame.addClass('map-view');
-
-        // move reset and submit buttons
-        submitButton.appendTo(buttonsRow);
-        resetButton.prependTo(buttonsRow);
-        buttonsRow.show();
-
-        resizeMaps();
-    })
-    $('.activate-list-view').on('click', function (e) {
-        e.preventDefault();
-        if (structureFrame.hasClass('list-view')) {
-            // already in list view
-            return;
-        }
-        listenMapMoves = false;
-        structureFrame.removeClass('map-view');
-        structureFrame.addClass('list-view');
-
-        // move reset and submit buttons
-        submitButton.appendTo(filtersRow);
-        resetButton.prependTo(filtersRow);
-        buttonsRow.hide();
-
-        resetButton.prependTo()
-
-
-        resetMapBounds();
-    })
-
-    // Filter results on map moves
-    map.on('zoomend moveend', function(e) {
-        if (listenMapMoves) {
-            let bounds = map.getBounds();
-            updateArea(bounds.getWest(), bounds.getSouth(), bounds.getEast(), bounds.getNorth())
-            refresh(true);
-        }
-    })
-
-    // ### Location filter
-    let resultDropdownDiv = form.find('.city-search-dropdown').first();
-    let inputName = resultDropdownDiv.siblings("input[name='search-city']").first();
-    let inputLat = resultDropdownDiv.siblings("input[name='lat']").first();
-    let inputLong = resultDropdownDiv.siblings("input[name='long']").first();
-    let resultDiv = resultDropdownDiv.find('.city-search-results').first();
-    let loadingDiv = resultDropdownDiv.find('.city-search-loading').first();
-    let noResultDiv = resultDropdownDiv.find('.city-search-no-result').first();
-    let geolocButton = form.find("button[name='search-localize']").first();
-
-    function setNewLocation(name, long, lat) {
-        inputName.val(name);
-        inputLong.val(long);
-        inputLat.val(lat);
-        inputName.css("cursor", "pointer");
-        resultDropdownDiv.hide();
-        if (radiusSelect.val() === '') {
-            radiusSelect.val('10')
-        }
-        form.submit();
-    }
-
-    function hideCityResults() {
-        resultDropdownDiv.hide();
-        // if no city was selected, clear the input
-        if (!inputLat.val()) {
-            inputName.val('');
-            resultDiv.empty();
-        }
-        inputName.css("cursor", "inherit");
-        inputName.removeClass('loading');
-    }
-
-    document.click(function() {
-        hideCityResults();
-    });
-
-    $(document).keydown(function(e) {
-        if(e.key === "Escape") {
-            hideCityResults();
-        }
-    });
-
-    inputName.click(function(e) {
-        if (resultDiv.children('.city-search-item').length > 0) {
-            resultDropdownDiv.show();
-        }
-        e.stopPropagation();
-    });
-
-    inputName.keypress(function (e) {
-        if (e.key === "Enter") {
-
-            let results = resultDiv.children('.city-search-item');
-
-            if (inputName.hasClass('loading')) {
-                // A request is currently running, enter will select the first result when the request will complete
-                inputName.addClass('enter-pressed');
-                e.preventDefault();
-            } else if (results.length > 0) {
-                // If results are displayed and no request is currently running, enter select the first result
-                setNewLocation(results[0].text(), results[0].data("x"), results[0].data("y"))
-                e.stopPropagation();
-            }
-        } else {
-            inputName.addClass('loading');
-        }
-    });
-
-    resultDiv.on('click', '.city-search-item', function (e) {
-        setNewLocation($(this).text(), $(this).data("x"), $(this).data("y"))
-        e.stopPropagation();
-    });
-
-    inputName.on('click', function(e) {
-        if ($(this).is(":focus")) {
-            $(this).val('');
-        }
-    });
-
-    // gouv.fr REST geocoding api
-    const addressApiUrl = "https://api-adresse.data.gouv.fr/search/?type=municipality&autocomplete=1&limit=5&q=";
-
-    function populateCitySearchResults() {
-
-        let query = inputName.val();
-        let url = addressApiUrl + encodeURI(query);
-
-        if (!query) {
-            resultDropdownDiv.hide();
-            return;
-        }
-
-        inputLat.val('');
-        inputLong.val('');
-        resultDropdownDiv.show();
-        if (resultDiv.children('.city-search-item').length === 0) {
-            loadingDiv.show()
-        }
-        noResultDiv.hide();
-
-        $.ajax({
-            type: 'GET',
-            url: url,
-            dataType: "json",
-            contentType: "application/json; charset=utf-8"
-        })
-        .done(function(res) {
-            console.log(res);
-            let features = res.features;
-            resultDiv.empty();
-
-            if (!features.length > 0) {
-                noResultDiv.show();
-                resultDiv.hide();
-            } else if (inputName.hasClass('enter-pressed')) {
-                // the enter key has been pressed before the request terminate
-                let f = features[0];
-                setNewLocation(
-                    f.properties.name + ' (' + f.properties.postcode + ')',
-                    f.geometry.coordinates[0],
-                    f.geometry.coordinates[1]
-                )
-                resultDiv.hide();
-            } else {
-                for (const f of features) {
-                    let x = f.geometry.coordinates[0];
-                    let y = f.geometry.coordinates[1];
-                    let name = f.properties.name;
-                    let postcode = f.properties.postcode;
-                    let span = '<div class="city-search-item" data-x="' + x + '" data-y="' + y + '">' + name + ' (' + postcode + ')</div>';
-                    resultDiv.append(span);
-                }
-                resultDiv.show();
-            }
-            inputName.removeClass('loading');
-            inputName.removeClass('enter-pressed');
-            loadingDiv.hide()
-        })
-        .fail(function(e) {
-            console.error(e);
-            loadingDiv.hide();
-        });
-    }
-
-    var runningPopulate = null;
-
-    inputName.on('input', function(e) {
-        if (runningPopulate !== null) {
-            window.clearTimeout(runningPopulate)
-        }
-        runningPopulate = window.setTimeout(populateCitySearchResults, 300);
-    });
-
-    geolocButton.on('click', function(e) {
-        if (navigator.geolocation) {
-            navigator.geolocation.getCurrentPosition(
-                function (geoloc) {
-                    setNewLocation(tr['around-me'], geoloc.coords.longitude, geoloc.coords.latitude)
-                    e.stopPropagation();
-                 },
-                function () {
-                    alert(tr['geoloc-unavailable']);
-                }
-            );
-            e.stopPropagation();
-        } else {
-            alert(tr['geoloc-unsupported']);
-        }
-    });
-
-    // Structure details
-    function formatFrenchPhoneNumber(number) {
-        const regexPhoneNumber = /\+33([1-9])(\d{2})(\d{2})(\d{2})(\d{2})$/;
-
-        if (number && number.match(regexPhoneNumber)) {
-            return number.replace(regexPhoneNumber, '0$1 $2 $3 $4 $5');
-        } else {
-            return number;
-        }
-    }
-
-    function populateDetailsView(structure) {
-
-        const structureHeader = structureFrameDetails.find('.structure-header').first();
-
-        let logo = structureHeader.find('img.logo').first();
-        let defaultLogo = structureHeader.find('img.default-logo').first();
-        if (structure.logoId) {
-            logo.attr('src', 'https://api.opentalent.fr/app.php/_internal/secure/files/' + structure.logoId + '/0x60');
-            logo.show();
-            defaultLogo.hide();
-        } else {
-            defaultLogo.show();
-            logo.hide();
-        }
-
-        let title = structureHeader.find('.structure-name').first();
-        title.text(structure.name);
-
-        let fbLink = structureHeader.find('a.facebook').first();
-        if (structure.facebook) {
-            fbLink.attr('href', structure.facebook);
-            fbLink.show();
-        } else {
-            fbLink.attr('href', '');
-            fbLink.hide();
-        }
-
-        let twitterLink = structureHeader.find('a.twitter').first();
-        if (structure.twitter) {
-            twitterLink.attr('href', structure.twitter);
-            twitterLink.show();
-        } else {
-            twitterLink.attr('href', '');
-            twitterLink.hide();
-        }
-
-        let instagramLink = structureHeader.find('a.instagram').first();
-        if (structure.instagram) {
-            instagramLink.attr('href', structure.instagram);
-            instagramLink.show();
-        } else {
-            instagramLink.attr('href', '');
-            instagramLink.hide();
-        }
-
-        let practiceTagModel = structureFrameDetails.find('.structure-practice-model').first();
-        let practiceContainer = practiceTagModel.parent();
-        practiceContainer.children('.structure-practice').remove();
-
-        if (structure.practices !== null) {
-            let i = 1;
-            for (const practice of structure.practices) {
-                let tag = practiceTagModel.clone();
-
-                if (i <= 3) {
-                    tag.text(practicesFr[practice]);
-                } else {
-                    tag.text('+ ' + (practice.length - 3) + ' ...');
-                }
-                tag.removeClass('structure-practice-model')
-                tag.addClass('structure-practice')
-                tag.show();
-                practiceContainer.append(tag);
-
-                if (i > 3) { break; }
-                i++;
-            }
-        }
-
-        let contact = structureFrameDetails.find('.contact').first();
-        contact.find('.address').first().text(
-            [structure.streetAddress, structure.postalCode, structure.addressCity].join(" ")
-        );
-
-        let phoneLink = contact.find('.phone a').first();
-        if (structure.telphone) {
-            phoneLink.text(formatFrenchPhoneNumber(structure.telphone));
-            phoneLink.attr('href', 'tel:' + structure.telphone);
-        } else {
-            phoneLink.text('');
-            phoneLink.attr('href', '');
-        }
-
-        let mailLink = contact.find('.mail a').first();
-        if (structure.email) {
-            mailLink.text(structure.email);
-            mailLink.attr('href', 'mailto:' + structure.email);
-        } else {
-            mailLink.text('');
-            mailLink.attr('href', '');
-        }
-
-        let websiteLink = contact.find('.website a').first();
-        if (structure.website) {
-            websiteLink.text(structure.website);
-            websiteLink.attr('href', structure.website);
-        } else {
-            websiteLink.text('');
-            websiteLink.attr('href', '');
-        }
-
-        // contact.find('.province').first().text('...');
-
-        let networkName = contact.find('.network').first();
-        if (structure.n1Name) {
-            networkName.text(structure.n1Name);
-        } else {
-            networkName.text('');
-        }
-
-        if (structure.longitude && structure.latitude) {
-            // clear previous markers
-            structureMap.eachLayer(function(layer) {
-                if (layer instanceof L.MarkerClusterGroup) { map.removeLayer(layer) }
-            })
-
-            // add structure position
-            let marker = L.marker([structure.latitude, structure.longitude]);
-            marker.bindPopup(`<b>${structure.name}</b><br/>${structure.postalCode} ${structure.addressCity}<br/><a href="${structure.website}" target="_blank">${structure.website}</a>`);
-            marker.addTo(structureMap);
-
-            // zoom on the newly created marker
-            var latLngs = [ marker.getLatLng() ];
-            var markerBounds = L.latLngBounds(latLngs);
-            structureMap.fitBounds(markerBounds);
-
-            // show map
-            structureFrameDetails.find('#structure-details-map').first().show();
-        }
-
-        // ux fix: don't know why, but the topbar is above the screen without this
-        structureFrameDetails.scrollTop(0);
-    }
-
-    structureFrame.on('click', '.structure-see', function(e) {
-        e.preventDefault();
-        const organizationId = $(this).data('organization-id');
-
-        structureFrame.hide();
-        structureFrameDetails.show();
-
-        $.ajax({
-            type: 'GET',
-            url: apiGetByIdUrl + '&organization-id=' + organizationId,
-            dataType: "json",
-            contentType: "application/json; charset=utf-8",
-            timeout : 5000
-        })
-        .done(function(structure) {
-            structure.practices = structure.practices !== null ? structure.practices.split(",") : [];
-            populateDetailsView(structure)
-
-            structureFrameDetails.find('.please-wait').first().hide();
-            structureFrameDetails.find('.content').first().show();
-            resizeMaps();
-        })
-        .fail(function(xhr, textStatus, errorThrown) {
-            pleaseWaitSpan.hide();
-            errorMsgSpan.show();
-            throw 'Error while fetching the API data: ' + textStatus  + ' - ' + errorThrown;
-        });
-    })
-
-    structureFrameDetails.on('click', '.go-back', function (e) {
-        e.preventDefault();
-
-        structureFrameDetails.find('.please-wait').first().show();
-        structureFrameDetails.find('.content').first().hide();
-        structureFrameDetails.hide();
-        structureFrame.show();
-        resizeMaps();
-    })
-});

File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-blue.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-blue.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-green.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-green.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-grey.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-grey.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-light-blue.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-light-blue.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-light-red.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-light-red.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-orange.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-orange.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-purple.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-purple.css.map


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-red.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/classic-red.css.map


+ 10 - 133
ot_templating/Resources/Public/assets/Classic/style/module/_structures.scss

@@ -1,140 +1,17 @@
 // Structures page
 
-$btn-background-color: $menu-background-color;
-$btn-text-color: $menu-font-color;
-$input-border-color: #bfbfbf;
-
 .ot-structures {
-  @include flex;
-  flex-direction: row;
-
-  .structure-controls {
-    order: 1;
-    flex: 1;
-  }
-
-  .structure-results {
-    order: 0;
-    flex: 1;
-  }
-
-  .structure-controls, .structure-results {
-    @include flex;
-    flex-direction: column;
-    margin: 0 1.5em;
-  }
-
-  .structure-search {
-    @include flex;
-    flex-direction: column;
-    margin-bottom: 2em;
-  }
-
-  h3 {
-    font-size: 1.2em;
-    font-weight: bold;
-  }
-
-  .structure-search form {
-    @include flex;
-    flex-direction: column;
-  }
-
-  .structure-search form input, button {
-    margin-bottom: 1em;
-    line-height: 1.4em;
-    font-size: 1.1em;
-    border: 1px solid #ccc;
-    border-radius: 4px;
-    padding: 6px 12px;
-  }
-
-  .structure-search form button {
-    border: solid 2px $content-a-color;
-    color: $content-a-color;
-  }
-
-  .structure-search form button:hover {
-    background-color: #d8edf3;
-    cursor: pointer;
-  }
-
-  #structure-map {
-    height: 400px;
+  iframe {
+    border: none;
     width: 100%;
-    align-self: flex-end;
-  }
-
-  .structure {
-    @include flex;
-    flex-direction: column;
-    border-bottom: solid 2px $otbox-header-background-color;
-    border-radius: 4px;
-    height: 200px;
-    padding: 1em;
-    justify-content: space-around;
-  }
-
-  .structure-preview {
-    @include flex;
-    flex-direction: row;
-    align-items: center;
-  }
-
-  .structure-preview .structure-poster {
-    flex: 1;
-    @include flex;
-    flex-direction: column;
-    align-items: center;
-  }
-
-  .structure-preview .structure-poster img {
-    width: auto;
     max-width: 100%;
-    min-width: 40%;
-    height: auto;
-    margin-right: 4em;
-  }
-
-  .structure-preview .structure-summary {
-    flex: 2;
-    @include flex;
-    flex-direction: column;
-  }
-
-  .structure-preview .structure-summary > span {
-    margin-bottom: 0.5em;
-  }
-
-  .structure-preview .structure-name {
-    font-size: 1.4em;
-    color: #333333;
-    font-weight: bold;
-  }
-
-  .structure-preview .structure-loc-date {
-    font-size: 1.1em;
-    color: #4d4d4d;
-    font-weight: bold;
-  }
-
-  .structure-preview .structure-description {
-    color: #4d4d4d;
-  }
-
-  .structure-see {
-    align-self: stretch;
-    padding: 0.4em 0.8em;
-    font-size: 1.1em;
-    margin-top: 0.4em;
-    @include flex;
-    flex-direction: row;
-    justify-content: center;
-    align-items: center;
-  }
-
-  .structure-see:hover {
-    text-decoration: none;
-    font-weight: bold;
+    height: 2400px;
+  }
+  @media screen and (min-width: 1100px) {
+    iframe {
+      margin-left: -10%;
+      width: 120%;
+      max-width: 120%;
+    }
   }
 }

+ 0 - 705
ot_templating/Resources/Public/assets/Classic/style/module/_structuresframe.scss

@@ -1,705 +0,0 @@
-// template structures frame
-
-$btn-background-color: $menu-background-color;
-$btn-text-color: $menu-font-color;
-$input-border-color: #bfbfbf;
-
-.ot-structures-frame, .ot-structures-frame-details {
-  @include flex;
-  font-family: Arial, serif;
-
-  header {
-    display: flex;
-    flex-direction: row;
-    justify-content: flex-start;
-    width: 100%;
-    align-items: center;
-  }
-
-  h2 {
-    font-size: 21px;
-    font-weight: 750;
-    flex: 1;
-    text-align: left;
-    color: $btn-background-color;
-  }
-
-  header a {
-    padding: 3px;
-    margin: 2px;
-    font-weight: 500;
-  }
-
-  input, select {
-    height: 36px;
-    border: solid 1px $input-border-color;
-    border-radius: 0;
-  }
-
-  .structure-col {
-    @include flex;
-    flex-direction: column;
-    flex: 1;
-    max-width: 50%;
-    padding: 12px;
-    align-items: center;
-  }
-
-  .btn {
-    background-color: $btn-background-color;
-    border-radius: 4px;
-    padding: 8px;
-    font-weight: 750;
-    color: $btn-text-color;
-    text-align: center;
-  }
-
-  .spacer {
-    flex: 1;
-  }
-}
-
-.ot-structures-frame {
-  flex-direction: row;
-  flex-wrap: wrap;
-
-  // The wrapper role is to maintain the map's height equal to its width
-  // @see https://stackoverflow.com/a/14896313/4279120
-  #structure-map-wrapper {
-    position: relative;
-    width: 100%;
-    padding-bottom: 100%;
-    float: left;
-    height: 0;
-  }
-
-  #structure-map {
-    width: 100%;
-    height: 100%;
-    position: absolute;
-    left: 0;
-  }
-
-  #structure-map a {
-    text-decoration: none;
-  }
-
-  #structure-map-bar {
-    margin: 16px 2% 6px 2%;
-    width: 100%;
-  }
-
-  #structure-map-bar .advice {
-    color: #262626;
-    font-weight: 750;
-    text-align: center;
-    font-size: 12px;
-  }
-
-  #overseas-provinces-list {
-    @include flex;
-    flex-direction: row;
-    list-style: none;
-    align-items: center;
-    justify-content: center;
-    flex-wrap: wrap;
-    padding: 0;
-    width: 100%;
-  }
-
-  #overseas-provinces-list li {
-    margin: 5px;
-    min-width: 50px;
-    width: 75px;
-    height: 75px;
-  }
-
-  #overseas-provinces-list li img {
-    border: solid 1px #000000;
-    max-width: 100%;
-    width: 100%;
-    height: 100%;
-    cursor: pointer;
-  }
-
-  .structure-search {
-    width: 100%;
-  }
-
-  .structure-search form {
-    width: 100%;
-    display: flex;
-    flex-direction: column;
-  }
-
-  .structure-search-row {
-    display: flex;
-    flex-direction: row;
-    flex-wrap: wrap;
-    margin-bottom: 8px;
-  }
-
-  .search-bar-wrapper {
-    display: flex;
-    flex-direction: row;
-    height: 30px;
-    padding: 6px 2%;
-    border: solid 1px $input-border-color;
-    margin: 6px 0;
-    max-width: 44%;
-  }
-
-  .search-bar-wrapper:not(:last-child) {
-    margin-right: auto;
-  }
-
-  .search-bar {
-    flex: 1;
-    background: none;
-    outline: none;
-    height: auto;
-    font-size: 18px;
-    border: none;
-    width: 95%;
-    min-width: 85%;
-  }
-
-  .search-bar-btn {
-    @include flex;
-    flex-direction: column;
-    justify-content: center;
-    border: none;
-    background: none;
-    width: 5%;
-    min-width: 24px;
-    padding: 5px;
-    font-size: 18px;
-    cursor: pointer;
-    min-height: 32px;
-  }
-
-  .search-bar-btn .fas {
-    color: darken($input-border-color, 20);
-  }
-
-  .city-search-dropdown {
-    min-width: 100%;
-    position: relative;
-    display: inline-block;
-    top: 10px;
-    left: -100%;
-  }
-
-  .city-search-results, .city-search-no-result, .city-search-loading {
-    position: absolute;
-    min-width: 100%;
-    background: #EEEEEE;
-    box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
-    z-index: 99;
-    top: 100%;
-  }
-
-  .city-search-loading img {
-    padding:10px;
-    width:30px;
-  }
-
-  .city-search-item, .city-search-no-result {
-    display: block;
-    padding: 12px 24px;
-    white-space: nowrap;
-  }
-
-  .city-search-item:hover {
-    background-color: #d9d9d9;
-    cursor: pointer;
-  }
-
-  .structure-search select {
-    color: $btn-background-color;
-    padding: 4px 6px;
-    margin: 3px 2%;
-    font-weight: 750;
-    width: 22%;
-    min-width: 110px;
-    font-size: 12px;
-  }
-
-  .structure-search select:first-child {
-    margin-left: 0;
-  }
-  .structure-search select:last-child {
-    margin-right: 0;
-  }
-
-  .structure-search .reset-search {
-    background: none;
-    color: $btn-background-color;
-    margin: 0 6px 6px 0;
-    cursor: pointer;
-    height: 36px;
-    border: solid 2px $btn-background-color;
-    border-radius: 0;
-  }
-
-  .structure-search .submit-search {
-    background-color: $btn-background-color;
-    color: $btn-text-color;
-    font-weight: 750;
-    margin: 0 0 6px 6px;
-    cursor: pointer;
-    height: 36px;
-    border: none;
-    border-radius: 0;
-  }
-
-  .structure-results .structures-page {
-    display: flex;
-    flex-direction: row;
-    flex-wrap: wrap;
-    justify-content: center;
-  }
-
-  .structure-card {
-    display: flex;
-    flex-direction: column;
-    width: 42%;
-    min-width: 200px;
-    border: solid 1px #cccccc;
-    border-radius: 4px;
-    padding: 12px;
-    margin: 8px 1%;
-    background-color: #f2f2f2;
-  }
-
-  .structure-poster {
-    display: flex;
-    flex-direction: row;
-    justify-content: center;
-    margin: 8px;
-    min-width: 160px;
-    height: 80px;
-  }
-
-  .structure-poster img {
-    width: auto;
-    height: auto;
-    max-width: 100%;
-  }
-
-  .structure-details {
-    display: flex;
-    flex-direction: column;
-  }
-
-  .structure-details > * {
-    margin: 4px;
-  }
-
-  .structure-practices {
-    display: flex;
-    flex-direction: row;
-    flex-wrap: wrap;
-    min-height: 18px;
-  }
-
-  .structure-practice {
-    background-color: #d9d9d9;
-    color: #262626;
-    font-size: 11px;
-    margin: 1px 4px 1px 0;
-    padding: 1px 5px 3px 5px;
-    height: 16px;
-    border-radius: 6px;
-  }
-
-  .structure-name {
-    font-size: 18px;
-    font-weight: 750;
-    width: 100%;
-    text-align: left;
-    color: $btn-background-color;
-  }
-
-  .structure-details-table td {
-    border:none;
-  }
-
-  .structure-details-entry {
-    color: #595959;
-  }
-
-  .structure-details-entry .fas {
-    color: $btn-background-color;
-  }
-
-  .structure-see {
-    width: 128px;
-    max-height: 28px;
-    padding: 4px;
-    font-weight: 500;
-    margin-top: 8px;
-  }
-
-  .structure-see:hover {
-    text-decoration: none;
-    color: white;
-  }
-
-  .results-count-message {
-    width: 100%;
-    display: flex;
-    flex-direction: row;
-    justify-content: flex-start;
-    color: #666666;
-    font-size: 0.8em;
-    padding-left: 12px;
-  }
-
-  .pagination-bar {
-    li a {
-      color: #4d4d4d;
-      font-weight: 600;
-    }
-
-    li.current a {
-      color: $btn-background-color;
-    }
-  }
-}
-
-.ot-structures-frame.list-view {
-  // List view changes
-
-  .structure-col-map {
-    display: none;
-  }
-
-  .structure-search form .search-buttons {
-  }
-
-  .search-bar-wrapper {
-    flex: 1;
-    max-width: none;
-  }
-
-  .search-bar-wrapper:not(:last-child) {
-    margin-right: 2%;
-  }
-
-  .structure-search-row.filters {
-    margin: 0 auto 12px auto;
-  }
-
-  .search-bar {
-    flex: 1;
-    max-width: none;
-  }
-
-  .filters select, .filters button {
-    height: 52px;
-    margin: 3px 0.5%;
-  }
-
-  .filters .reset-search {
-    margin-left: 0;
-  }
-
-  .filters .submit-search {
-    margin-right: 0;
-  }
-
-  .filters select {
-    width: 18.5%;
-  }
-
-  .filters button {
-    width: 10.5%;
-  }
-
-  .structure-col {
-    align-items: normal;
-  }
-
-  .structure-col-results {
-    width: 100%;
-    max-width: 100%;
-  }
-
-  .structure-card {
-    width: 95%;
-    flex-direction: row;
-  }
-
-  .structure-card .spacer {
-    flex: 0; // disable spacer in list view
-  }
-
-  .structure-details {
-    flex: 1;
-  }
-
-  .structure-see {
-    align-self: flex-end;
-  }
-}
-
-.ot-structures-frame.map-view .activate-map-view {
-  font-weight: 750;
-}
-.ot-structures-frame.list-view .activate-list-view {
-  font-weight: 750;
-}
-
-// Medium screens
-@media screen and (min-width: 700px) and (max-width: 1048px) {
-  .ot-structures-frame.map-view {
-    #overseas-provinces-list li {
-      width: 85px;
-      height: 85px;
-      margin: 5px 12px;
-    }
-
-    .structure-search select {
-      margin: 3px 2%;
-      width: 46%;
-    }
-  }
-
-  .ot-structures-frame.list-view {
-    .structure-search-row {
-      flex-wrap: nowrap;
-    }
-
-    .filters {
-      select, button {
-        width: 15%;
-        margin: 1%;
-      }
-    }
-  }
-}
-
-
-// Small screens
-@media screen and (max-width: 700px) {
-  .ot-structures-frame {
-    flex-direction: column;
-    flex-wrap: nowrap;
-
-    .structure-col {
-      max-width: none;
-
-      // prevents content to be higher than the container
-      min-width: 100px;
-      overflow: hidden;
-    }
-
-    .structure-search-row {
-      flex-direction: column;
-    }
-
-    .search-bar-wrapper {
-      width: 95%;
-      max-width: 95%;
-      margin: 3px auto;
-    }
-
-    .search-bar-wrapper input {
-      width: auto;
-    }
-
-    .structure-search select {
-      width: 95%;
-      margin: 3px auto;
-    }
-
-    .structure-card {
-      width: 100%;
-    }
-  }
-  .ot-structures-frame.list-view {
-
-    .search-bar-wrapper {
-      width: 85%;
-    }
-
-    .structure-card {
-      flex-direction: column;
-    }
-
-    .structure-search-row {
-      flex-wrap: nowrap;
-    }
-
-    .structure-search-row.filters {
-      margin: 0;
-    }
-
-    .filters {
-      select, button {
-        width: 80%;
-        margin: 5px auto;
-      }
-    }
-  }
-}
-
-.ot-structures-frame-details {
-  flex-direction: column;
-
-  .please-wait {
-    @include flex;
-    flex-direction: row;
-    width: 100%;
-    height: 100vh;
-    justify-content: center;
-    align-items: center;
-  }
-
-  .content {
-    margin: 18px 10%;
-    max-width: 80%;
-  }
-
-  header {
-    @include flex;
-    flex-direction: row;
-
-    .go-back {
-      margin: 16px;
-      padding: 4px 8px;
-      color: #737373;
-      font-weight: 700;
-    }
-
-    h2 {
-      font-size: 14px;
-      flex: 1
-    }
-  }
-
-  .structure-header {
-    @include flex;
-    flex-direction: row;
-    align-items: center;
-
-    >* {
-      margin: 12px;
-    }
-
-    .logo {
-      height: 60px;
-      width: auto;
-    }
-
-    h3 {
-      font-size: 22px;
-      color: $btn-background-color;
-      font-weight: 750;
-      flex: 1;
-    }
-
-    .social {
-      @include flex;
-      flex-direction: row;
-      align-items: center;
-    }
-
-    .social a {
-      font-size: 22px;
-      padding: 4px 6px;
-      color: #808080;
-    }
-  }
-
-  .structure-practices {
-    display: flex;
-    flex-direction: row;
-    width: 100%;
-    margin: 6px auto;
-    padding-bottom: 6px;
-    flex-wrap: wrap;
-    min-height: 18px;
-    justify-content: center;
-    border-bottom: solid 1px #a6a6a6;
-  }
-
-  .structure-practice {
-    background-color: #d9d9d9;
-    color: #262626;
-    font-size: 11px;
-    margin: 1px 4px 1px 0;
-    padding: 1px 5px 3px 5px;
-    height: 16px;
-    border-radius: 6px;
-  }
-
-  .illustration-container {
-    @include flex;
-    flex-direction: row;
-    margin: 40px 20%;
-    justify-content: center;
-
-    img {
-      max-height: 180px;
-      width: auto;
-    }
-  }
-
-  .practices-tags {
-    @include flex;
-    flex-direction: row;
-  }
-
-  .details {
-    @include flex;
-    flex-direction: row;
-    max-width: 100%;
-    color: #666666;
-
-    h4 {
-      font-size: 18px;
-      font-weight: 750;
-      border-bottom: solid 1px $btn-background-color;
-      align-self: flex-start;
-      color: #666666;
-      margin: 8px 0;
-    }
-
-    .description {
-      @include flex;
-      flex-direction: column;
-      border-right: solid 2px $btn-background-color;
-      width: 45%;
-      padding-right: 5%;
-    }
-    .contact {
-      @include flex;
-      flex-direction: column;
-      width: 45%;
-      padding-left: 5%;
-    }
-
-    .contact td {
-      background: none;
-      border: none;
-      width: 80%;
-    }
-    .contact td:first-child {
-      width: 20%;
-      color: $btn-background-color;
-    }
-  }
-
-  .spot-on-bar {
-    @include flex;
-    flex-direction: row;
-  }
-
-  #structure-details-map {
-    height: 300px;
-    margin-top: 45px;
-  }
-
-}

File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/style.css


File diff suppressed because it is too large
+ 0 - 0
ot_templating/Resources/Public/assets/Classic/style/style.css.map


+ 0 - 1
ot_templating/Resources/Public/assets/Classic/style/style.scss

@@ -93,7 +93,6 @@ $warning-font-color: #ffffff !default;
 "module/_donors-box",
 "module/_members",
 "module/_structures",
-"module/_structuresframe",
 "module/_sitemap",
 "module/_forms",
 "module/_news",

File diff suppressed because it is too large
+ 7 - 0
ot_templating/Resources/Public/assets/Modern/script/iframeResizer.min.js


+ 6 - 137
ot_templating/Resources/Public/assets/Modern/style/custom.css

@@ -1022,147 +1022,16 @@ section.news .no-news-found {
     color: #4d4d4d;
 }
 
-    /*============================
-    Structures page
-    ============================*/
-
-.ot-structures {
-    display: flex;
-    flex-direction: row;
-    width: 100%;
-}
-
-.ot-structures .structure-controls {
-    order: 1;
-}
-
-.ot-structures .structure-results {
-    order: 0;
-}
-
-.ot-structures .structure-controls, .structure-results {
-    display: flex;
-    flex-direction: column;
-    margin: 0 1.5em;
-    flex: 1;
-}
-
-.ot-structures .structure-search {
-    display: flex;
-    flex-direction: column;
-    margin-bottom: 2em;
-}
-
-.ot-structures h3 {
-    font-size: 1.2em;
-    font-weight: bold;
-}
-
-.ot-structures .structure-search form {
-    display: flex;
-    flex-direction: column;
-}
-
-.ot-structures .structure-search form input,
-.ot-structures .structure-search form button {
-    margin-bottom: 1em;
-    line-height: 1.4em;
-    font-size: 1.1em;
-    border: 1px solid #ccc;
-    border-radius: 4px;
-    padding: 6px 12px;
-}
-
-.ot-structures .structure-search form button {
-    border: solid 2px #cccccc;
-    color: #333333;
-}
-
-.ot-structures .structure-search form button:hover {
-    background-color: #d8edf3;
-    cursor: pointer;
-}
-
-.ot-structures #structure-map {
-    height: 400px;
+/*============================
+Structures page
+============================*/
+.ot-structures iframe {
+    border: none;
     width: 100%;
-    align-self: flex-end;
-}
-
-.ot-structures .structure {
-    display: flex;
-    flex-direction: column;
-    border-bottom: solid 2px #cccccc;
-    border-radius: 4px;
-    height: 200px;
-    padding: 1em;
-    justify-content: space-around;
-}
-
-.ot-structures .structure-preview {
-    display: flex;
-    flex-direction: row;
-    align-items: center;
-}
-
-.ot-structures .structure-preview .structure-poster {
-    flex: 1;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-}
-
-.ot-structures .structure-preview .structure-poster img {
-    width: auto;
     max-width: 100%;
-    min-width: 40%;
-    height: auto;
-    margin-right: 4em;
-}
-
-.ot-structures .structure-preview .structure-summary {
-    flex: 2;
-    display: flex;
-    flex-direction: column;
-}
-
-.ot-structures .structure-preview .structure-summary > span {
-    margin-bottom: 0.5em;
+    height: 2400px;
 }
 
-.ot-structures .structure-preview .structure-name {
-    font-size: 1.4em;
-    color: #333333;
-    font-weight: bold;
-}
-
-.ot-structures .structure-preview .structure-loc-date {
-    font-size: 1.1em;
-    color: #4d4d4d;
-    font-weight: bold;
-}
-
-.ot-structures .structure-preview .structure-description {
-    color: #4d4d4d;
-}
-
-.ot-structures .structure-see {
-    align-self: stretch;
-    padding: 0.4em 0.8em;
-    font-size: 1.1em;
-    margin-top: 0.4em;
-    display: flex;
-    flex-direction: row;
-    justify-content: center;
-    align-items: center;
-}
-
-.ot-structures .structure-see:hover {
-    text-decoration: none;
-    font-weight: bold;
-}
-
-
 /*============================
 Sitemap page
 ============================*/

Some files were not shown because too many files changed in this diff