Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHRAS-3558 : Fix footer links with Sphynx macro #329

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 6 additions & 39 deletions _templates/phraseanet/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,16 @@ <h3>{{ _('Navigation') }}</h3>
<div class="languages">

{%- if language == 'fr' %}
<a href="/{{ version }}/en/"><span>Anglais</span></a>
<a href="/{{ version }}/fr/"><span>Français</span></a>
<a href="{{ pathto('/', 1) }}en/"><span>Anglais</span></a>
<a href="{{ pathto('/', 1) }}fr/"><span>Français</span></a>
<a id="cookie-management" href="#"><span>Préférences des cookies</span></a>
<a href="/{{ version }}/fr/PolitiqueDeConfidentialite.html"><span>Politique de confidentialité</span></a>
<a href="{{ pathto('/', 1) }}fr/PolitiqueDeConfidentialite.html"><span>Politique de confidentialité</span></a>
{%- endif %}
{%- if language == 'en' %}
<a href="/{{ version }}/en/"><span>English</span></a>
<a href="/{{ version }}/fr/"><span>French</span></a>
<a href="{{ pathto('/', 1) }}en/"><span>English</span></a>
<a href="{{ pathto('/', 1) }}fr/"><span>French</span></a>
<a id="cookie-management" href="#"><span>Cookie policy</span></a>
<a href="/{{ version }}/en/PrivacyPolicy.html"><span>Privacy policy</span></a>
<a href="{{ pathto('/', 1) }}en/PrivacyPolicy.html"><span>Privacy policy</span></a>
{%- endif %}

</div>
Expand Down Expand Up @@ -318,44 +318,11 @@ <h3>{{ _('Navigation') }}</h3>
<script type="text/javascript">
$(document).ready(function()
{
/**
* Remove "/4.1/", "/4.0/", etc. url prefix from all links for local test
*/
let removePrefixNumberURL = function()
{
if( (window.location.port === '4041') )
{
console.log('Port detected:',window.location.port,'. Remove prefix version in url.');
let anchorList = document.querySelectorAll('a');

for(let i in anchorList)
{
/** {Element} anchor */
let anchor = anchorList[i];

if(anchor.href !== undefined)
{
anchor.href = anchor.href.replace('/3.5/', '/');
anchor.href = anchor.href.replace('/3.6/', '/');
anchor.href = anchor.href.replace('/3.7/', '/');
anchor.href = anchor.href.replace('/3.8/', '/');
anchor.href = anchor.href.replace('/4.0/', '/');
anchor.href = anchor.href.replace('/4.1/', '/');
}
}
}
}

if(window.console)
console.log('loaded');
$('#navigation li a').wrapInner('<span>');

removePrefixNumberURL();

});
</script>



</body>
</html>