Merge pull request #10733 from CredoReference/feature/EDX-21

Don't render unconfigured marketing links in CMS footer.
This commit is contained in:
Andy Armstrong
2015-12-03 16:59:47 -05:00
4 changed files with 71 additions and 10 deletions

View File

@@ -11,16 +11,22 @@ from django.core.urlresolvers import reverse
<p>&copy; ${settings.COPYRIGHT_YEAR} <a data-rel="edx.org" href="${marketing_link('ROOT')}" rel="external">${settings.PLATFORM_NAME}</a>.</p>
</div>
<nav class="nav-peripheral">
<ol>
<li class="nav-item nav-peripheral-tos">
<a data-rel="edx.org" href="${marketing_link('TOS')}">${_("Terms of Service")}</a>
</li>
<li class="nav-item nav-peripheral-pp">
<a data-rel="edx.org" href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a>
</li>
</ol>
</nav>
% if is_any_marketing_link_set(['TOS', 'PRIVACY']):
<nav class="nav-peripheral">
<ol>
% if is_marketing_link_set('TOS'):
<li class="nav-item nav-peripheral-tos">
<a data-rel="edx.org" href="${marketing_link('TOS')}">${_("Terms of Service")}</a>
</li>
% endif
% if is_marketing_link_set('PRIVACY'):
<li class="nav-item nav-peripheral-pp">
<a data-rel="edx.org" href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a>
</li>
% endif
</ol>
</nav>
% endif
</div>
<div class="footer-content-secondary" aria-label="{_('Legal')}">