PHRAS-2997 Rename properties

This commit is contained in:
Harrys Ravalomanana
2020-03-24 18:25:31 +04:00
parent 8e03128544
commit 49ce33ceef
5 changed files with 11 additions and 9 deletions

View File

@@ -102,8 +102,8 @@ class RegistryFormManipulator
'keywords' => null,
'description' => null,
'analytics' => null,
'mamoto-url' => null,
'mamoto-id' => null,
'matomo-analytics-url' => null,
'matomo-analytics-id' => null,
'allow-indexation' => true,
'home-presentation-mode' => 'GALLERIA',
'default-subdef-url-ttl' => 7200,

View File

@@ -38,10 +38,10 @@ class GeneralFormType extends AbstractType
$builder->add('analytics', 'text', [
'label' => 'Google Analytics identifier',
]);
$builder->add('matomo-url', 'text', [
$builder->add('matomo-analytics-url', 'text', [
'label' => 'Matomo Analytics url',
]);
$builder->add('matomo-id', 'text', [
$builder->add('matomo-analytics-id', 'text', [
'label' => 'Matomo Analytics identifier',
]);
$builder->add('allow-indexation', 'checkbox', [

View File

@@ -25,6 +25,6 @@
</div>
</div>
{% include 'common/analytics.html.twig' %}
{% include 'common/mamoto_analytics.html.twig' %}
{% include 'common/matomo_analytics.html.twig' %}
</body>
</html>

View File

@@ -1,14 +1,14 @@
{% if app['conf'].get(['registry', 'general', 'matomo-url']) != '' %}
{% if app['conf'].get(['registry', 'general', 'matomo-id']) != '' %}
{% if app['conf'].get(['registry', 'general', 'matomo-analytics-url']) != '' %}
{% if app['conf'].get(['registry', 'general', 'matomo-analytics-id']) != '' %}
<!-- Matomo -->
<script type="text/javascript">
var _paq = window._paq || [];
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//{{ app['conf'].get(['registry', 'general', 'matomo-url']) }}/";
var u="//{{ app['conf'].get(['registry', 'general', 'matomo-analytics-url']) }}/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', {{ app['conf'].get(['registry', 'general', 'matomo-id']) }}]);
_paq.push(['setSiteId', {{ app['conf'].get(['registry', 'general', 'matomo-analytics-id']) }}]);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();

View File

@@ -193,6 +193,8 @@ registry:
keywords: ''
description: ''
analytics: ''
matomo-analytics-url: ''
matomo-analytics-id: ''
allow-indexation: true
home-presentation-mode: COOLIRIS
modules: