...
 
Commits (3)
......@@ -9,44 +9,46 @@
</template>
<template name="pricePolicyContent">
<div class="price-policy {{cssClasses}}">
<div class="price-policy-content">
<div class="icon-text">
<div class="icon-text-icon">
<i class="fa fa-info fa-fw" aria-hidden="true"></i>
</div>
<div class="icon-text-text">
{{mf 'pricePolicy.disclaimer' "Education should be open to everyone, that's why Openki only allows suggested/orientation prices."}}
</div>
</div>
<div class="price-policy-actions">
<div class="price-policy-action">
<a href="{{pricePolicyLink}}">
<div class="icon-text">
<div class="icon-text-icon">
<i class="fa fa-fw fa-book" aria-hidden="true"></i>
</div>
<div class="icon-text-text">
{{mf 'pricePolicy.moreAboutPricePolicy' 'Read our price policy'}}
</div>
</div>
</a>
{{#if pricePolicyEnabled}}
<div class="price-policy {{cssClasses}}">
<div class="price-policy-content">
<div class="icon-text">
<div class="icon-text-icon">
<i class="fa fa-info fa-fw" aria-hidden="true"></i>
</div>
<div class="icon-text-text">
{{mf 'pricePolicy.disclaimer' "Education should be open to everyone, that's why Openki only allows suggested/orientation prices."}}
</div>
</div>
{{#if dismissable}}
<div class="price-policy-actions">
<div class="price-policy-action">
<button type="button" class="js-hide-price-policy btn-link">
<a href="{{pricePolicyLink}}">
<div class="icon-text">
<div class="icon-text-icon">
<i class="fa fa-fw fa-ban" aria-hidden="true"></i>
<i class="fa fa-fw fa-book" aria-hidden="true"></i>
</div>
<div class="icon-text-text">
{{mf 'pricePolicy.dontShowAnymore' "Don't show this anymore"}}
{{mf 'pricePolicy.moreAboutPricePolicy' 'Read our price policy'}}
</div>
</div>
</button>
</a>
</div>
{{/if}}
{{#if dismissable}}
<div class="price-policy-action">
<button type="button" class="js-hide-price-policy btn-link">
<div class="icon-text">
<div class="icon-text-icon">
<i class="fa fa-fw fa-ban" aria-hidden="true"></i>
</div>
<div class="icon-text-text">
{{mf 'pricePolicy.dontShowAnymore' "Don't show this anymore"}}
</div>
</div>
</button>
</div>
{{/if}}
</div>
</div>
</div>
</div>
{{/if}}
</template>
......@@ -34,6 +34,20 @@ Template.pricePolicyContent.helpers({
return classes.join(' ');
},
/**
* Checks if price-policy is enabled for this instance.
* Its only disabled if you set the pricePolicyEnabled-var
* explicitly to false.
*/
pricePolicyEnabled() {
const pricePolicyEnabled = Meteor.settings.public.pricePolicyEnabled;
if (pricePolicyEnabled === false) {
return false;
}
// price policy setting is not set, is ambiguos, or is set explicitly to true.
return true;
},
pricePolicyLink() {
const link = '/FAQ';
let locale = Session.get('locale');
......
......@@ -7,7 +7,8 @@
"siteStage": "DEV",
"headerLogo": { "src": "OpenkiLogo_quadratisch_2kanal_alpha.png", "alt": "Openki Logo" },
"discussionLogo": { "src": "OpenkiLogo_quadratisch_2kanal_alpha.png", "alt": "Openki Logo" },
"ogLogo": { "src": "openki_logo_2018.png"}
"ogLogo": { "src": "openki_logo_2018.png"},
"pricePolicyEnabled": true
},
"siteEmail": "[email protected]"
, "reporter": { "sender": "[email protected]", "recipient": "[email protected]"}
......