mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
20 lines
899 B
Plaintext
20 lines
899 B
Plaintext
|
let publicInformationBadge = document.querySelector('#public-information-badge');
|
||
|
if ("{{ user.id }}" == "{{ current_user.hashid }}") {
|
||
|
if ("{{ user.is_public }}" == "True") {
|
||
|
publicInformationBadge.dataset.badgeCaption = 'Your profile is public';
|
||
|
publicInformationBadge.classList.add('green');
|
||
|
publicInformationBadge.classList.remove('red');
|
||
|
} else {
|
||
|
publicInformationBadge.dataset.badgeCaption = 'Your profile is private';
|
||
|
publicInformationBadge.classList.add('red');
|
||
|
publicInformationBadge.classList.remove('green');
|
||
|
}
|
||
|
} else {
|
||
|
publicInformationBadge.remove();
|
||
|
}
|
||
|
|
||
|
let followedCorpusList = new FollowedCorpusList(document.querySelector('.followed-corpus-list'));
|
||
|
followedCorpusList.add({{ followed_corpora|tojson }});
|
||
|
let publicCorpusList = new PublicCorpusList(document.querySelector('.public-corpus-list'));
|
||
|
publicCorpusList.add({{ own_public_corpora|tojson }});
|