mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-13 09:30:40 +00:00
Contributions update revised
This commit is contained in:
@ -3,14 +3,14 @@
|
||||
{% if request.path == url_for('.contributions') %}
|
||||
<li class="tab"><a class="active" href="{{ url_for('.contributions') }}" target="_self">Contributions Overview</a></li>
|
||||
|
||||
{% elif request.path == url_for('.add_tesseract_ocr_pipeline_model') %}
|
||||
{% elif request.path == url_for('.create_tesseract_ocr_pipeline_model') %}
|
||||
<li class="tab"><a href="{{ url_for('.contributions') }}" target="_self">Contributions Overview</a></li>
|
||||
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||
<li class="tab"><a class="active" href="{{ url_for('.add_tesseract_ocr_pipeline_model') }}" target="_self">{{ title }}</a></li>
|
||||
{% elif request.path == url_for('.add_spacy_nlp_pipeline_model') %}
|
||||
<li class="tab"><a class="active" href="{{ url_for('.create_tesseract_ocr_pipeline_model') }}" target="_self">{{ title }}</a></li>
|
||||
{% elif request.path == url_for('.create_spacy_nlp_pipeline_model') %}
|
||||
<li class="tab"><a href="{{ url_for('.contributions') }}" target="_self">Contributions Overview</a></li>
|
||||
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||
<li class="tab"><a class="active" href="{{ url_for('.add_spacy_nlp_pipeline_model') }}" target="_self">{{ title }}</a></li>
|
||||
<li class="tab"><a class="active" href="{{ url_for('.create_spacy_nlp_pipeline_model') }}" target="_self">{{ title }}</a></li>
|
||||
{% elif tesseract_ocr_pipeline_model and request.path == url_for('.tesseract_ocr_pipeline_model', tesseract_ocr_pipeline_model_id=tesseract_ocr_pipeline_model.id) %}
|
||||
<li class="tab"><a href="{{ url_for('.contributions') }}" target="_self">Contributions Overview</a></li>
|
||||
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||
|
@ -1,129 +0,0 @@
|
||||
{% extends "base.html.j2" %}
|
||||
{% import "materialize/wtf.html.j2" as wtf %}
|
||||
{% from "contributions/_breadcrumbs.html.j2" import breadcrumbs with context %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h1 id="title">{{ title }}</h1>
|
||||
|
||||
{# Tesseract OCR Models #}
|
||||
<div>
|
||||
<h3>My Tesseract OCR Pipeline Models</h3>
|
||||
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div id="tesseract-ocr-model-list" data-user-id="{{ userId }}">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Description</th>
|
||||
<th>Biblio</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if tesseract_ocr_user_models|length > 0 %}
|
||||
{% for m in tesseract_ocr_user_models %}
|
||||
<tr id="tesseract-ocr-pipeline-model-{{ m.hashid }}">
|
||||
<td>{{ m.title }}</td>
|
||||
{% if m.description == '' %}
|
||||
<td>Description is not available.</td>
|
||||
{% else %}
|
||||
<td>{{ m.description }}</td>
|
||||
{% endif %}
|
||||
<td><a href="{{ m.publisher_url }}">{{ m.publisher }}</a> ({{ m.publishing_year }}), {{ m.title }} {{ m.version}}, <a href="{{ m.publishing_url }}">{{ m.publishing_url }}</a></td>
|
||||
<td class="right-align">
|
||||
<a class="delete-button btn-floating red waves-effect waves-light" data-model-id="{{ m.hashid }}"><i class="material-icons">delete</i></a>
|
||||
<a class="edit-button btn-floating service-color darken waves-effect waves-light" data-model-id="{{ m.hashid }}"><i class="material-icons">edit</i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">No models available.</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action right-align">
|
||||
<a href="{{ url_for('contributions.add_tesseract_ocr_pipeline_model') }}" class="btn waves-effect waves-light"><i class="material-icons left">add</i>Add model file</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# spaCy NLP Models #}
|
||||
<div>
|
||||
<h3>My spaCy NLP Pipeline Models</h3>
|
||||
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div id="spacy-nlp-model-list" data-user-id="{{ userId }}" data-user-models="{{ spacy_nlp_user_models }}">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Description</th>
|
||||
<th>Biblio</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% if spacy_nlp_user_models|length > 0 %}
|
||||
{% for m in spacy_nlp_user_models %}
|
||||
<tr id="spacy_nlp-pipeline-model-{{ m.hashid }}">
|
||||
<td>{{ m.title }}</td>
|
||||
{% if m.description == '' %}
|
||||
<td>Description is not available.</td>
|
||||
{% else %}
|
||||
<td>{{ m.description }}</td>
|
||||
{% endif %}
|
||||
<td><a href="{{ m.publisher_url }}">{{ m.publisher }}</a> ({{ m.publishing_year }}), {{ m.title }} {{ m.version}}, <a href="{{ m.publishing_url }}">{{ m.publishing_url }}</a></td>
|
||||
<td class="right-align">
|
||||
<a class="delete-spacy-model-button btn-floating red waves-effect waves-light" data-model-id="{{ m.hashid }}"><i class="material-icons">delete</i></a>
|
||||
<a class="edit-spacy-model-button btn-floating service-color darken waves-effect waves-light" data-model-id="{{ m.hashid }}"><i class="material-icons">edit</i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="4">No models available.</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action right-align">
|
||||
<a href="{{ url_for('contributions.add_spacy_nlp_pipeline_model') }}" class="btn waves-effect waves-light"><i class="material-icons left">add</i>Add model file</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock page_content %}
|
||||
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
<script>
|
||||
const tesseractOCRModelList = new TesseractOCRModelList();
|
||||
tesseractOCRModelList.init();
|
||||
const spacyNLPModelList = new SpacyNLPModelList();
|
||||
spacyNLPModelList.init();
|
||||
</script>
|
||||
{% endblock scripts %}
|
51
app/templates/contributions/contributions.html.j2
Normal file
51
app/templates/contributions/contributions.html.j2
Normal file
@ -0,0 +1,51 @@
|
||||
{% extends "base.html.j2" %}
|
||||
{% import "materialize/wtf.html.j2" as wtf %}
|
||||
{% from "contributions/_breadcrumbs.html.j2" import breadcrumbs with context %}
|
||||
|
||||
{% block page_content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<h1 id="title">{{ title }}</h1>
|
||||
|
||||
{# Tesseract OCR Models #}
|
||||
<div>
|
||||
<h3>My Tesseract OCR Pipeline Models</h3>
|
||||
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="tesseract-ocr-pipeline-model-list" data-user-id="{{ current_user.hashid }}"></div>
|
||||
</div>
|
||||
<div class="card-action right-align">
|
||||
<a href="{{ url_for('.create_tesseract_ocr_pipeline_model') }}" class="btn waves-effect waves-light"><i class="material-icons left">add</i>Create</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# spaCy NLP Models #}
|
||||
<div>
|
||||
<h3>My spaCy NLP Pipeline Models</h3>
|
||||
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<div class="card-content">
|
||||
<div class="spacy-nlp-pipeline-model-list" data-user-id="{{ current_user.hashid }}"></div>
|
||||
</div>
|
||||
<div class="card-action right-align">
|
||||
<a href="{{ url_for('.create_spacy_nlp_pipeline_model') }}" class="btn waves-effect waves-light"><i class="material-icons left">add</i>Create</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock page_content %}
|
@ -27,10 +27,8 @@
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card-panel z-depth-0">
|
||||
<span class="card-title"><i class="left material-icons">layers</i>spaCy NLP Models</span>
|
||||
<p>You can add more spaCy NLP models using the form below. They will automatically appear in the list of usable models.</p>
|
||||
<p><a href="">Edit already uploaded models</a></p>
|
||||
<p><a class="modal-trigger" href="#models-modal">Information about the already existing models.</a></p>
|
||||
<span class="card-title"><i class="left material-icons">layers</i>SpaCy NLP Pipeline Model</span>
|
||||
<p>You can create a new SpaCy NLP Pipeline Model using the form below. They will automatically appear in the list of usable models on the <a href="{{ url_for('services.spacy_nlp_pipeline') }}">SpaCy NLP Pipeline</a> service page.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -39,7 +37,6 @@
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<h2>Add a model</h2>
|
||||
<div class="card">
|
||||
<form class="create-contribution-form" enctype="multipart/form-data" method="POST">
|
||||
<div class="card-content">
|
||||
@ -91,37 +88,3 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock page_content %}
|
||||
|
||||
{% block modals %}
|
||||
{{ super() }}
|
||||
<div id="models-modal" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>spaCy NLP Pipeline models</h4>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Description</th>
|
||||
<th>Biblio</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for m in spacy_nlp_pipeline_models %}
|
||||
<tr id="spacy-nlp-pipeline-model-{{ m.hashid }}">
|
||||
<td>{{ m.title }}</td>
|
||||
{% if m.description == '' %}
|
||||
<td>Description is not available.</td>
|
||||
{% else %}
|
||||
<td>{{ m.description }}</td>
|
||||
{% endif %}
|
||||
<td><a href="{{ m.publisher_url }}">{{ m.publisher }}</a> ({{ m.publishing_year }}), {{ m.title }} {{ m.version}}, <a href="{{ m.publishing_url }}">{{ m.publishing_url }}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class="modal-close waves-effect waves-light btn">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock modals %}
|
@ -27,10 +27,8 @@
|
||||
<div class="row">
|
||||
<div class="col s12">
|
||||
<div class="card-panel z-depth-0">
|
||||
<span class="card-title"><i class="left material-icons">layers</i>Tesseract OCR Models</span>
|
||||
<p>You can add more Tesseract OCR models using the form below. They will automatically appear in the list of usable models.</p>
|
||||
<p><a class="modal-trigger" href="#models-modal">Information about the already existing models.</a></p>
|
||||
<p><a href="">Edit already uploaded models</a></p>
|
||||
<span class="card-title"><i class="left material-icons">layers</i>Tesseract OCR Pipeline Model</span>
|
||||
<p>You can create a new Tesseract OCR Pipeline Model using the form below. They will automatically appear in the list of usable models on the <a href="{{ url_for('services.tesseract_ocr_pipeline') }}">Tesseract OCR Pipeline</a> service page.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -39,7 +37,6 @@
|
||||
</div>
|
||||
|
||||
<div class="col s12">
|
||||
<h2>Add a model</h2>
|
||||
<div class="card">
|
||||
<form class="create-contribution-form" enctype="multipart/form-data" method="POST">
|
||||
<div class="card-content">
|
@ -13,7 +13,7 @@
|
||||
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<form class="create-contribution-form" enctype="multipart/form-data" method="POST">
|
||||
<form method="POST">
|
||||
<div class="card-content">
|
||||
{{ form.hidden_tag() }}
|
||||
<div class="row">
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
<div class="col s12">
|
||||
<div class="card">
|
||||
<form class="create-contribution-form" enctype="multipart/form-data" method="POST">
|
||||
<form method="POST">
|
||||
<div class="card-content">
|
||||
{{ form.hidden_tag() }}
|
||||
<div class="row">
|
||||
|
Reference in New Issue
Block a user