Merge branch 'development' into public-corpus

This commit is contained in:
Inga Kirschnick
2023-02-09 11:54:58 +01:00
5 changed files with 301 additions and 182 deletions

View File

@ -67,7 +67,9 @@
followingUserList.add({{ following_users|tojson }}); #}
corpusFollowingRequest.addEventListener('click', () => {
if ({{ current_user.is_following_corpus(corpus)|tojson }}) {
corpusFollowingRequest.innerHTML = '<i class="material-icons left">add</i>Unfollow Corpus';
if ("{{ current_user.is_following_corpus(corpus) }}" === "False") {
corpusFollowingRequest.lastChild.textContent = 'Unfollow Corpus';
return new Promise((resolve, reject) => {
fetch(`/corpora/{{ corpus.hashid }}/unfollow`, {method: 'POST', headers: {Accept: 'application/json'}})
.then(