Skip to content

Commit

Permalink
refactor: update to Pimcore 6.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Gerig committed May 17, 2021
1 parent 67f7dd5 commit ad4de64
Show file tree
Hide file tree
Showing 55 changed files with 5,788 additions and 8,296 deletions.
10 changes: 8 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ module.exports = {

env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},

parserOptions: { sourceType: 'module' },
parser: 'babel-eslint',

parserOptions: {
ecmaVersion: 8,
sourceType: 'module',
},

extends: [
'eslint:recommended',
'airbnb-base'
],

globals: { 'VERSION': true },
globals: { VERSION: true },

rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
Expand Down
2 changes: 1 addition & 1 deletion .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
ignoreFiles: ['**/vendor/**/*', '**/pimcore/**/*'],
ignoreFiles: ['**/node_modules/**/*', '**/vendor/**/*', '**/web/**/*'],
rules: {
'block-no-empty': true,
'color-no-invalid-hex': true,
Expand Down
674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

2 changes: 0 additions & 2 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/

use AppBundle\AppBundle;
use CoreShop\Bundle\SEOBundle\CoreShopSEOBundle;
use Pimcore\HttpKernel\BundleCollection\BundleCollection;
use Pimcore\Kernel;
use Symfony\WebpackEncoreBundle\WebpackEncoreBundle;
Expand All @@ -30,7 +29,6 @@ public function registerBundlesToCollection(BundleCollection $collection): void
{
$collection->addBundles([
new AppBundle(),
new CoreShopSEOBundle(),
new WebpackEncoreBundle(),
]);
}
Expand Down
12 changes: 5 additions & 7 deletions app/Resources/EmailizrBundle/views/layout.html.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{% spaceless %}
{% set lang = app.request.locale|slice(0, 2) %}
{% apply spaceless %}
{{ emailizr_style_collector.add(kernelPublicDir ~ asset('build/css/email.css')) }}
{% emailizr_inline_style %}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ lang }}" xml:lang="{{ lang }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width">
Expand All @@ -28,10 +29,7 @@
<td class="float-center" align="center" valign="top">
<center>
{% include 'Email/Partials/header.html.twig' %}

{% block content %}
{% endblock %}

{% block content %}{% endblock %}
{% include 'Email/Partials/footer.html.twig' %}
</center>
</td>
Expand All @@ -44,4 +42,4 @@
{% end_emailizr_inky %}
</html>
{% end_emailizr_inline_style %}
{% endspaceless %}
{% endapply %}

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions app/Resources/LuceneSearchBundle/views/List/error.html.twig

This file was deleted.

61 changes: 0 additions & 61 deletions app/Resources/LuceneSearchBundle/views/List/result.html.twig

This file was deleted.

51 changes: 44 additions & 7 deletions app/Resources/views/Default/legals.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

{% set legalsBlock = pimcore_block('legalsBlock') %}

{% set name = pimcore_website_config('name', null, app.request.locale) %}
{% set address = pimcore_website_config('address', null, app.request.locale) %}
{% set zipCity = pimcore_website_config('zipCity', null, app.request.locale) %}

{% block content %}

<div class="uk-section uk-section-default">
Expand All @@ -15,14 +19,12 @@
{% set itemText = pimcore_wysiwyg('itemText') %}

{% if editmode or not itemTitle.empty %}
<div class="uk-panel {% if legalsBlock.count != loop.index %}uk-margin-large-bottom{% endif %}">
<div class="uk-panel uk-margin-large-bottom">
{% if loop.first %}
<h1 {% if scrollSpyNav is not empty and scrollSpyNav[loop.index0] is defined %}id="{{ scrollSpyNav[loop.index0].id }}"{% endif %}>
{{ itemTitle|raw }}
</h1>
<h1>{{ itemTitle|raw }}</h1>
{% else %}
<hr class="uk-margin-large" />
<h2 {% if scrollSpyNav is not empty and scrollSpyNav[loop.index0] is defined %}id="{{ scrollSpyNav[loop.index0].id }}"{% endif %} class="uk-h1">
<h2 {% if not itemTitle.empty %}id="{{ itemTitle.data|kebab }}"{% endif %} class="uk-h3">
{{ itemTitle|raw }}
</h2>
{% endif %}
Expand All @@ -34,17 +36,52 @@
{% endif %}
{% endfor %}

{% if imprint is not empty %}
<div class="uk-panel uk-margin-large-bottom">
<hr class="uk-margin-large" />
<h2 id="publisher" class="uk-h3">{{ 'app.legals.imprint.publisher'|trans }}</h2>
<address class="uk-margin-remove-last-child">
<p>
<span class="uk-text-bold">{{ name }}</span><br />
{{ address }}<br />
{{ zipCity }}
</p>
</address>
</div>

<div class="uk-panel">
<hr class="uk-margin-large" />
<h2 id="conception-coding" class="uk-h3">{{ 'app.legals.imprint.conception_coding'|trans }}</h2>
<address class="uk-margin-remove-last-child">
<p>
<a href="{{ imprint.website }}" target="_blank" rel="noreferrer noopener" class="uk-text-bold">{{ imprint.name }}</a><br />
{{ imprint.street }}
{{ imprint.zip ~ ' ' ~ imprint.town }}
</p>
<p>
<a href="{{ imprint.phone|tel }}">{{ imprint.phone }}</a>
<a href="mailto: {{ imprint.email|obfuscateEmail }}">{{ imprint.email|obfuscateEmail }}</a>
</p>
</address>
</div>
{% endif %}

</div>

{% if scrollSpyNav is not empty %}
<div class="uk-width-auto uk-visible@l">
<div class="uk-width-medium">
<div class="tm-sidebar" data-uk-sticky="offset: 160; bottom: true">
<div class="tm-sidebar uk-sticky" data-uk-sticky="offset: 160; bottom: true">

<ul class="uk-nav uk-nav-default" data-uk-scrollspy-nav="closest: li; scroll: true; offset: 160">
{% for item in scrollSpyNav %}
<li><a href="#{{ item.id }}">{{ item.data }}</a></li>
{% endfor %}

{% if imprint is not empty %}
<li><a href="#publisher">{{ 'app.legals.imprint.publisher'|trans }}</a></li>
<li><a href="#conception-coding">{{ 'app.legals.imprint.conception_coding'|trans }}</a></li>
{% endif %}
</ul>

</div>
Expand All @@ -56,4 +93,4 @@
</div>
</div>

{% endblock %}
{% endblock %}
8 changes: 2 additions & 6 deletions app/Resources/views/Layout/flash-messages.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
{% for message in messages %}
<div class="uk-alert uk-alert-{{ type }}" data-uk-alert>
<a class="uk-alert-close" data-uk-close></a>
<div class="uk-container uk-container-large">
<p class="uk-alert-message uk-text-large">
{{ message|trans|raw }}
</p>
</div>
<p>{{ message|raw }}</p>
</div>
{% endfor %}
{% endfor %}
{% endfor %}
33 changes: 18 additions & 15 deletions app/Resources/views/Layout/footer.html.twig
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{% set name = pimcore_website_config('name') %}
{% set address = pimcore_website_config('address') %}
{% set zipCity = pimcore_website_config('zipCity') %}
{% set email = pimcore_website_config('email') %}
{% set phone = pimcore_website_config('phone') %}
{% set googleMapsQuery = pimcore_website_config('google-maps-query') %}

{% set imprint = document.property('imprintPage') %}

<div class="uk-section uk-section-secondary">
<div class="uk-container">

<div class="uk-flex-middle uk-grid-margin uk-grid uk-grid-stack" data-uk-grid>
<div class="uk-width-1-1@m uk-first-column">
<div class="uk-margin-small uk-text-center ">
<img width="100" height="25" src="{{ asset('build/images/logo.svg') }}" alt="{{ pimcore_website_config('name') }}">
<img width="100" height="25" src="{{ asset('build/images/logo.svg') }}" alt="{{ name }}">
</div>
</div>
</div>
Expand All @@ -13,32 +22,26 @@
<div class="uk-width-expand@s uk-first-column">
<h3 class="uk-text-center">Visit Us</h3>
<div class="uk-margin uk-text-center">
<a href="https://google.com/maps?q={{ pimcore_website_config('google-maps-query') }}"
<a href="https://google.com/maps?q={{ googleMapsQuery }}"
class="uk-link-reset" target="_blank" rel="noopener nofollow">
{{ pimcore_website_config('address') }}<br />
{{ pimcore_website_config('zipCity') }}
{{ address }}<br />
{{ zipCity }}
</a>
</div>
</div>
<div class="uk-width-expand@s">
<h3 class="uk-margin-remove-top uk-text-center">Contact</h3>
<div class="uk-margin uk-text-center">
<a class="uk-link-reset" href="mailto:{{ pimcore_website_config('email')|obfuscateEmail }}">
{{ pimcore_website_config('email')|obfuscateEmail }}
</a><br />
<a class="uk-link-reset" href="tel:{{ pimcore_website_config('phone')|replace({ ' ': '' }) }}">
{{ pimcore_website_config('phone') }}
</a>
<a class="uk-link-reset" href="mailto:{{ email|obfuscateEmail }}">{{ email|obfuscateEmail }}</a><br />
<a class="uk-link-reset" href="{{ phone|tel }}">{{ phone }}</a>
</div>
</div>
{% if document.getProperty('imprintPage') is instanceof('\\Pimcore\\Model\\Document\\Page') %}
{% set imprint = document.getProperty('imprintPage') %}

{% if imprint is document_page %}
<div class="uk-width-expand@s">
<h3 class="uk-text-center">Legals</h3>
<div class="uk-margin uk-text-center">
<a href="{{ imprint.getFullPath() }}">{{ imprint.getProperty('navigation_name') }}</a><br/>
&copy; {{ pimcore_website_config('name') }}
<a href="{{ imprint.fullPath }}">{{ imprint.property('navigation_name') }}</a><br />
&copy; {{ name }}
</div>
</div>
{% endif %}
Expand Down
11 changes: 1 addition & 10 deletions app/Resources/views/Layout/header.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,6 @@

<div class="uk-navbar-right">

<div class="uk-visible@s">
<div>
<a class="uk-navbar-toggle" href="#" data-uk-search-icon></a>
<div class="uk-drop" data-uk-drop="mode: click; pos: left-center; offset: 0">
{% include 'Navigation/search.html.twig' %}
</div>
</div>
</div>

{% include 'Navigation/language.html.twig' %}

<div class="uk-hidden@s">
Expand All @@ -46,4 +37,4 @@
</div>

{# Flash Messages #}
{% include 'Layout/flash-messages.html.twig' %}
{% include 'Layout/flash-messages.html.twig' %}
Loading

0 comments on commit ad4de64

Please sign in to comment.