-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Disable links in footer, if not set
- Loading branch information
Showing
2 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
Resources/Private/Fusion/Component/Molecule/FooterLinks/FooterLinks.fusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
prototype(KaufmannDigital.GDPR.CookieConsent:Component.Molecule.FooterLinks) < prototype(Neos.Fusion:Component) { | ||
settingsNode = null | ||
|
||
imprintLink = ${q(this.settingsNode).property('imprintLink')} | ||
[email protected] = Neos.Neos:ConvertUris { | ||
absolute = true | ||
} | ||
|
||
dataProtectionPolicyLink = ${q(this.settingsNode).property('dataProtectionPolicyLink')} | ||
[email protected] = Neos.Neos:ConvertUris { | ||
absolute = true | ||
} | ||
|
||
imprintLabel= ${q(this.settingsNode).property('imprintLabel')} | ||
dataProtectionPolicyLabel = ${q(this.settingsNode).property('dataProtectionPolicyLabel')} | ||
|
||
showImprint = ${this.imprintLink && this.imprintLabel} | ||
showDataProtectionPolicy= ${this.dataProtectionPolicyLink && this.dataProtectionPolicyLabel} | ||
showPipe = ${this.showImprint && this.showDataProtectionPolicy} | ||
|
||
renderer = afx` | ||
<div class="gdpr-cookieconsent-settings__content__links"> | ||
<a href={props.imprintLink} @if.condition={props.showImprint}>{props.imprintLabel}</a> | ||
<span @if.condition={props.showPipe}> | </span> | ||
<a href={props.dataProtectionPolicyLink} @if.condition={props.showDataProtectionPolicy}>{props.dataProtectionPolicyLabel}</a> | ||
</div> | ||
` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,24 +16,13 @@ prototype(KaufmannDigital.GDPR.CookieConsent:Content.CookieSettings) < prototype | |
@cache.mode = 'embed' | ||
} | ||
|
||
imprintLink = ${q(node).property('imprintLink')} | ||
[email protected] = Neos.Neos:ConvertUris { | ||
absolute = true | ||
} | ||
dataProtectionPolicyLink = ${q(node).property('dataProtectionPolicyLink')} | ||
[email protected] = Neos.Neos:ConvertUris { | ||
absolute = true | ||
} | ||
|
||
hasNecessaryGroup = ${q(node).find('[instanceof KaufmannDigital.GDPR.CookieConsent:Content.NecessarySettingGroup]').count() > 0} | ||
|
||
labels = Neos.Fusion:RawArray { | ||
acceptAll = ${q(node).property('acceptAllButtonLabel')} | ||
save = ${q(node).property('saveButtonLabel')} | ||
saveButtonLabel = ${q(node).property('saveButtonLabel')} | ||
acceptNecessaryCookiesLabel = ${q(node).property('acceptNecessaryCookiesLabel')} | ||
imprintLabel= ${q(node).property('imprintLabel')} | ||
dataProtectionPolicyLabel = ${q(node).property('dataProtectionPolicyLabel')} | ||
openIndividualSettingsLabel = ${q(node).property('openIndividualSettingsLabel')} | ||
closeIndividualSettingsLabel = ${q(node).property('closeIndividualSettingsLabel')} | ||
} | ||
|
@@ -60,13 +49,7 @@ prototype(KaufmannDigital.GDPR.CookieConsent:Content.CookieSettings) < prototype | |
<div class="gdpr-cookieconsent-settings__content__settings"> | ||
{props.individualSettings} | ||
</div> | ||
|
||
<div class="gdpr-cookieconsent-settings__content__links"> | ||
<a href={props.imprintLink}>{props.labels.imprintLabel}</a> | ||
<span> | </span> | ||
<a href={props.dataProtectionPolicyLink}>{props.labels.dataProtectionPolicyLabel}</a> | ||
</div> | ||
|
||
<KaufmannDigital.GDPR.CookieConsent:Component.Molecule.FooterLinks settingsNode={node} /> | ||
<div class="gdpr-cookieconsent-settings__content__individual-switch"> | ||
<a id="gdpr-cc-btn-individual-settings-enable">{props.labels.openIndividualSettingsLabel}</a> | ||
<a id="gdpr-cc-btn-individual-settings-disable">{props.labels.closeIndividualSettingsLabel}</a> | ||
|