Merge branch 'development' of gitlab.ub.uni-bielefeld.de:sfb1288inf/opaque into development

This commit is contained in:
Stephan Porada
2019-10-30 14:06:25 +01:00
6 changed files with 181 additions and 100 deletions

View File

@ -4,16 +4,17 @@
<div class="col s12 m4">
<h3 id="title">{{ corpus.title }}</h3>
<p id="description">{{ corpus.description }}</p>
<!-- Modal Strucutre -->
<div id="modal-confirm-delete" class="modal">
<div class="modal-content">
<h4>Confirm deletion</h4>
<p>Do you really want to delete the Corpus {{corpus.title}}?
All files will be permanently deleted.</p>
</div>
<div class="modal-footer">
<a href="{{ url_for('main.delete_corpus', corpus_id=corpus.id) }}" class="modal-close waves-effect waves-green btn red"><i class="material-icons left">delete</i>Delete Corpus</a>
<a href="#!" class="modal-close waves-effect waves-green btn cancel">Cancel</a>
<div class="position: relative; height: 70px;">
<div class="fixed-action-btn">
<a class="btn-floating btn-large red">
<i class="large material-icons">mode_edit</i>
</a>
<ul>
<li><a class="btn-floating red"><i class="material-icons">insert_chart</i></a></li>
<li><a class="btn-floating yellow darken-1"><i class="material-icons">format_quote</i></a></li>
<li><a class="btn-floating green"><i class="material-icons">publish</i></a></li>
<li><a class="btn-floating blue"><i class="material-icons">attach_file</i></a></li>
</ul>
</div>
</div>
</div>
@ -69,8 +70,8 @@
<td>{{ file.publishing_year }}</td>
<td class="right-align">
<a class="waves-effect waves-light btn-small"><i class="material-icons">edit</i></a>
<a class="waves-effect waves-light btn-small" href="{{ url_for('main.corpus_download', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons">file_download</i></a>
<a class="waves-effect waves-light btn-small red"><i class="material-icons">delete</i></a>
<a class="waves-effect waves-light btn-small" href="{{ url_for('main.corpus_file_download', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons">file_download</i></a>
<a class="waves-effect waves-light btn-small red" href="{{ url_for('main.corpus_file_delete', corpus_file_id=file.id, corpus_id=corpus.id) }}"><i class="material-icons">delete</i></a>
</td>
</tr>
{% endfor %}
@ -81,10 +82,11 @@
</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">
<form action="{{ url_for('main.corpus_file_new', corpus_id=corpus.id) }}" method="POST" enctype="multipart/form-data">
{{ add_corpus_file_form.hidden_tag() }}
<div class="row">
<div class="col s12 m4">
@ -138,4 +140,16 @@
</form>
</div>
</div>
<div id="modal-confirm-delete" class="modal">
<div class="modal-content">
<h4>Confirm deletion</h4>
<p>Do you really want to delete the Corpus {{corpus.title}}?
All files will be permanently deleted.</p>
</div>
<div class="modal-footer">
<a href="{{ url_for('main.corpus_delete', corpus_id=corpus.id) }}" class="modal-close waves-effect waves-green btn red"><i class="material-icons left">delete</i>Delete Corpus</a>
<a href="#!" class="modal-close waves-effect waves-green btn cancel">Cancel</a>
</div>
</div>
{% endblock %}

View File

@ -88,7 +88,7 @@
<div id="new-corpus-modal" class="modal">
<div class="modal-content">
<h4>New corpus</h4>
<form method="POST" enctype="multipart/form-data">
<form action="{{ url_for('main.corpus_new') }}" method="POST">
{{ create_corpus_form.hidden_tag() }}
<div class="row">
<div class="col s12 m4">

View File

@ -83,7 +83,7 @@
resultsElement = document.getElementById(`input-${result.job_input_id}-results`);
resultDownloadButtonElement = document.createElement("a");
resultDownloadButtonElement.classList.add("waves-effect", "waves-light", "btn-small");
resultDownloadButtonElement.href = `/jobs/${this.jobId}/download?ressource_id=${result.id}&ressource_type=result`;
resultDownloadButtonElement.href = `/jobs/${this.jobId}/results/${result.id}/download`;
resultDownloadButtonElement.innerText = result.filename.split(".").reverse()[0];
resultDownloadButtonElement.setAttribute("download", "");
resultDownloadButtonIconElement = document.createElement("i");
@ -207,7 +207,7 @@
<tr>
<td id="input-{{ input.id }}-filename">{{ input.filename }}</td>
<td id="input-{{ input.id }}-download">
<a class="waves-effect waves-light btn-small" download href="{{ url_for('main.job_download', job_id=job.id, ressource_id=input.id, ressource_type='input') }}">
<a class="waves-effect waves-light btn-small" download href="{{ url_for('main.job_input_download', job_id=job.id, job_input_id=input.id) }}">
<i class="material-icons">file_download</i>
</a>
</td>