mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-21 21:40:34 +00:00
Change corpus file model to save metadata.
This commit is contained in:
@ -4,11 +4,6 @@
|
||||
<div class="col s12 m4">
|
||||
<h3 id="title">{{ corpus.title }}</h3>
|
||||
<p id="description">{{ corpus.description }}</p>
|
||||
<h2>Actions:</h2>
|
||||
<!-- Confirm deletion of job with modal dialogue
|
||||
Modal Trigger-->
|
||||
<a href="#modal-confirm-delete" class="waves-effect waves-light btn red modal-trigger"><i class="material-icons left">delete</i>Delete Corpus</a>
|
||||
<a href="{{ url_for('main.corpus_analysis', corpus_id=corpus.id) }}" class="waves-effect waves-light btn "><i class="material-icons left">help</i>Analyse</a>
|
||||
<!-- Modal Strucutre -->
|
||||
<div id="modal-confirm-delete" class="modal">
|
||||
<div class="modal-content">
|
||||
@ -39,7 +34,7 @@
|
||||
<a href="{{ url_for('main.corpus_analysis', corpus_id=corpus.id) }}" class="waves-effect waves-light btn">
|
||||
<i class="material-icons left">help</i>Analyse
|
||||
</a>
|
||||
<a href="" class="waves-effect waves-light btn">
|
||||
<a data-target="add-corpus-file-modal" class="waves-effect waves-light btn modal-trigger">
|
||||
<i class="material-icons left">add</i>Add corpus file
|
||||
</a>
|
||||
<a href="#modal-confirm-delete" class="waves-effect waves-light btn red modal-trigger right">
|
||||
@ -61,33 +56,76 @@
|
||||
<th>Filename</th>
|
||||
<th>Author</th>
|
||||
<th>Title</th>
|
||||
<th>Publishing year</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for file in corpus.files %}
|
||||
<tr>
|
||||
<td>Harry Potter.vrt</td>
|
||||
<td>Stephan Porada</td>
|
||||
<td>Utopias</td>
|
||||
<td>{{ file.filename }}</td>
|
||||
<td>{{ file.author }}</td>
|
||||
<td>{{ file.title }}</td>
|
||||
<td>{{ file.publishing_year }}</td>
|
||||
<td class="right-align">
|
||||
<a class="waves-effect waves-light btn-small" download="" href="/jobs/1/download?ressource_id=1&ressource_type=input"><i class="material-icons">edit</i></a>
|
||||
<a class="waves-effect waves-light btn-small" download="" href="/jobs/1/download?ressource_id=1&ressource_type=input"><i class="material-icons">file_download</i></a>
|
||||
<a class="waves-effect waves-light btn-small red" download="" href="/jobs/1/download?ressource_id=1&ressource_type=input"><i class="material-icons">delete</i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Harry Potter.vrt</td>
|
||||
<td>Stephan Porada</td>
|
||||
<td>Utopias</td>
|
||||
<td class="right-align">
|
||||
<a class="waves-effect waves-light btn-small" download="" href="/jobs/1/download?ressource_id=1&ressource_type=input"><i class="material-icons">edit</i></a>
|
||||
<a class="waves-effect waves-light btn-small" download="" href="/jobs/1/download?ressource_id=1&ressource_type=input"><i class="material-icons">file_download</i></a>
|
||||
<a class="waves-effect waves-light btn-small red" download="" href="/jobs/1/download?ressource_id=1&ressource_type=input"><i class="material-icons">delete</i></a>
|
||||
<a class="waves-effect waves-light btn-small"><i class="material-icons">edit</i></a>
|
||||
<a class="waves-effect waves-light btn-small"><i class="material-icons">file_download</i></a>
|
||||
<a class="waves-effect waves-light btn-small red"><i class="material-icons">delete</i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="add-corpus-file-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Add corpus file</h4>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
{{ add_corpus_file_form.hidden_tag() }}
|
||||
<div class="row">
|
||||
<div class="col s12 m8">
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">person</i>
|
||||
{{ add_corpus_file_form.author(data_length='64') }}
|
||||
{{ add_corpus_file_form.author.label }}
|
||||
{% for error in add_corpus_file_form.author.errors %}
|
||||
<span class="helper-text red-text">{{ error }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12 m4">
|
||||
<div class="input-field">
|
||||
<i class="material-icons prefix">title</i>
|
||||
{{ add_corpus_file_form.title(data_length='64') }}
|
||||
{{ add_corpus_file_form.title.label }}
|
||||
{% for error in add_corpus_file_form.title.errors %}
|
||||
<span class="helper-text red-text">{{ error }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col s12">
|
||||
<div class="file-field input-field">
|
||||
<div class="btn">
|
||||
<span>{{ add_corpus_file_form.files.label.text }}</span>
|
||||
{{ add_corpus_file_form.files(accept='.vrt') }}
|
||||
</div>
|
||||
<div class="file-path-wrapper">
|
||||
<input class="file-path validate" type="text">
|
||||
</div>
|
||||
{% for error in add_corpus_file_form.files.errors %}
|
||||
<span class="helper-text red-text">{{ error }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
{{ add_corpus_file_form.submit(class='btn') }}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user