mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-26 03:14:19 +00:00
65 lines
1.8 KiB
Django/Jinja
65 lines
1.8 KiB
Django/Jinja
{% extends "base.html.j2" %}
|
|
{% import "wtf.html.j2" as wtf %}
|
|
|
|
{% block page_content %}
|
|
<div class="container">
|
|
<div class="row">
|
|
<div class="col s12">
|
|
<h1 id="title">{{ title }}</h1>
|
|
<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>
|
|
|
|
<div class="col s12" id="public-users">
|
|
<h2>Public Users</h2>
|
|
<p>Find other users and see what corpora they have made public.</p>
|
|
</div>
|
|
|
|
<div class="col s12">
|
|
<div class="card">
|
|
<div class="card-content">
|
|
<div id="public-user-list"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col s12" id="public-corpora">
|
|
<h2>Public Corpora</h2>
|
|
<p>Find public corpora.</p>
|
|
</div>
|
|
|
|
<div class="col s12">
|
|
<div class="card">
|
|
<div class="card-content">
|
|
<div id="public-corpus-list"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock page_content %}
|
|
|
|
{% block scripts %}
|
|
{{ super() }}
|
|
<script>
|
|
let publicUserListElement = document.querySelector('#public-user-list');
|
|
let publicUserList = new nopaque.resource_lists.PublicUserList(publicUserListElement);
|
|
publicUserList.add(
|
|
[
|
|
{% for user in users %}
|
|
{{ user.to_json_serializeable(relationships=True, filter_by_privacy_settings=True)|tojson }},
|
|
{% endfor %}
|
|
]
|
|
);
|
|
|
|
let publicCorpusListElement = document.querySelector('#public-corpus-list');
|
|
let publicCorpusList = new nopaque.resource_lists.PublicCorpusList(publicCorpusListElement);
|
|
publicCorpusList.add(
|
|
[
|
|
{% for corpus in corpora %}
|
|
{{ corpus.to_json_serializeable(backrefs=True, relationships=True)|tojson }},
|
|
{% endfor %}
|
|
]
|
|
);
|
|
</script>
|
|
{% endblock scripts %}
|