nopaque/app/templates/main/social_area.html.j2

65 lines
1.8 KiB
Plaintext
Raw Normal View History

{% extends "base.html.j2" %}
2024-05-04 12:41:40 +00:00
{% import "wtf.html.j2" as wtf %}
{% block page_content %}
<div class="container">
<div class="row">
<div class="col s12">
<h1 id="title">{{ title }}</h1>
2024-11-11 12:38:47 +00:00
<p>Here you can network with your team and other users. You can find corpora that are public and request them or just see what other users are working on.</p>
</div>
2023-03-16 08:58:56 +00:00
<div class="col s12" id="public-users">
2024-11-11 12:38:47 +00:00
<h2>Public Users</h2>
<p>Find other users and see what corpora they have made public.</p>
2024-11-11 12:38:47 +00:00
</div>
<div class="col s12">
<div class="card">
<div class="card-content">
2023-10-25 14:21:30 +00:00
<div id="public-user-list"></div>
</div>
</div>
</div>
2023-03-16 08:58:56 +00:00
<div class="col s12" id="public-corpora">
2024-11-11 12:38:47 +00:00
<h2>Public Corpora</h2>
<p>Find public corpora.</p>
2024-11-11 12:38:47 +00:00
</div>
<div class="col s12">
<div class="card">
<div class="card-content">
2023-10-25 14:21:30 +00:00
<div id="public-corpus-list"></div>
</div>
</div>
</div>
</div>
</div>
{% endblock page_content %}
{% block scripts %}
{{ super() }}
<script>
2023-10-25 14:21:30 +00:00
let publicUserListElement = document.querySelector('#public-user-list');
let publicUserList = new nopaque.resource_lists.PublicUserList(publicUserListElement);
2023-10-25 14:21:30 +00:00
publicUserList.add(
[
{% for user in users %}
{{ user.to_json_serializeable(relationships=True, filter_by_privacy_settings=True)|tojson }},
{% endfor %}
]
);
2023-10-25 14:21:30 +00:00
let publicCorpusListElement = document.querySelector('#public-corpus-list');
let publicCorpusList = new nopaque.resource_lists.PublicCorpusList(publicCorpusListElement);
publicCorpusList.add(
[
{% for corpus in corpora %}
2023-06-06 13:39:47 +00:00
{{ corpus.to_json_serializeable(backrefs=True, relationships=True)|tojson }},
{% endfor %}
]
);
</script>
{% endblock scripts %}