User CorpusList and QueryResultList in Corpus analysis service page.

This commit is contained in:
Patrick Jentsch 2021-01-13 12:10:31 +01:00
parent fc9c1a4732
commit 0f263df9b2
2 changed files with 14 additions and 24 deletions

View File

@ -59,7 +59,7 @@
<input id="search-query-results" class="search" type="search"></input>
<label for="search-query-results">Search query result</label>
</div>
<table class="highlight responsive-table">
<table class="highlight ressource-list">
<thead>
<tr>
<th>

View File

@ -29,17 +29,16 @@
<p>Nopaque lets you create and upload as many text corpora as you want. It makes use of CQP Query Language, which allows for complex search requests with the aid of metadata and NLP tags. The results can either be displayed as text or abstract visualizations.</p>
</div>
<div class="col s12">
<div class="col s12" id="corpora">
<h2>My Corpora</h2>
<div class="card">
<div class="card-content" id="corpora">
<div class="card-content">
<div class="input-field">
<i class="material-icons prefix">search</i>
<input id="search-corpus" class="search" type="search"></input>
<label for="search-corpus">Search corpus</label>
</div>
<ul class="pagination paginationTop"></ul>
<table>
<table class="highlight ressource-list">
<thead>
<tr>
<th></th>
@ -53,7 +52,7 @@
</thead>
<tbody class="list"></tbody>
</table>
<ul class="pagination paginationBottom"></ul>
<ul class="pagination"></ul>
</div>
<div class="card-action right-align">
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.import_corpus') }}"><i class="material-icons right">import_export</i>Import Corpus</a>
@ -62,17 +61,16 @@
</div>
</div>
<div class="col s12">
<div class="col s12" id="query-results">
<h2>My query results</h2>
<div class="card">
<div class="card-content" id="query-results">
<div class="card-content">
<div class="input-field">
<i class="material-icons prefix">search</i>
<input id="search-query-results" class="search" type="search"></input>
<label for="search-query-results">Search query result</label>
</div>
<ul class="pagination paginationTop"></ul>
<table class="highlight responsive-table">
<table class="highlight ressource-list">
<thead>
<tr>
<th>
@ -83,19 +81,12 @@
<span class="sort" data-sort="corpus">Corpus</span> and<br>
<span class="sort" data-sort="query">Query</span>
</th>
<th>{# Actions #}</th>
<th></th>
</tr>
</thead>
<tbody class="list">
<tr class="show-if-only-child">
<td colspan="5">
<span class="card-title"><i class="material-icons left">folder</i>Nothing here...</span>
<p>No query results yet imported.</p>
</td>
</tr>
</tbody>
<tbody class="list"></tbody>
</table>
<ul class="pagination paginationBottom"></ul>
<ul class="pagination"></ul>
</div>
<div class="card-action right-align">
<a class="btn waves-effect waves-light" href="{{ url_for('corpora.add_query_result') }}">Add query result<i class="material-icons right">file_upload</i></a>
@ -108,9 +99,8 @@
{% block scripts %}
{{ super() }}
<script type="module">
import {RessourceList} from '../../static/js/nopaque.lists.js';
let corpusList = new RessourceList("corpora", nopaque.corporaSubscribers, "Corpus");
let queryResultList = new RessourceList("query-results", nopaque.queryResultsSubscribers, "QueryResult");
<script>
let corpusList = new CorpusList(document.querySelector('#corpora'));
let queryResultList = new QueryResultList(document.querySelector('#query-results'));
</script>
{% endblock scripts %}