Move contributions to dashboard

This commit is contained in:
Patrick Jentsch 2023-03-14 14:25:05 +01:00
parent 2efc9533ec
commit 4c97929b1b
7 changed files with 48 additions and 50 deletions

View File

@ -5,3 +5,4 @@ bp = Blueprint('contributions', __name__)
from . import routes
from . import spacy_nlp_pipeline_models
from . import tesseract_ocr_pipeline_models
from . import transkribus_htr_pipeline_models

View File

@ -1,4 +1,4 @@
from flask import render_template
from flask import redirect, url_for
from flask_breadcrumbs import register_breadcrumb
from flask_login import login_required
from . import bp
@ -8,7 +8,4 @@ from . import bp
@register_breadcrumb(bp, '.', '<i class="material-icons left">new_label</i>Contributions')
@login_required
def contributions():
return render_template(
'contributions/contributions.html.j2',
title='Contributions'
)
return redirect(url_for('main.dashboard', _anchor='contributions'))

View File

@ -0,0 +1,2 @@
from .. import bp
from . import routes

View File

@ -0,0 +1,9 @@
from flask import abort
from flask_login import login_required
from . import bp
@bp.route('/transkribus_htr_pipeline_models')
@login_required
def transkribus_htr_pipeline_models():
return abort(503)

View File

@ -25,7 +25,7 @@
<li><a href="{{ url_for('main.dashboard') }}"><i class="material-icons">dashboard</i>Dashboard</a></li>
<li><a href="{{ url_for('main.dashboard', _anchor='corpora') }}" style="padding-left: 47px;"><i class="nopaque-icons">I</i>My Corpora</a></li>
<li><a href="{{ url_for('main.dashboard', _anchor='jobs') }}" style="padding-left: 47px;"><i class="nopaque-icons">J</i>My Jobs</a></li>
<li><a href="{{ url_for('contributions.contributions') }}"><i class="material-icons">new_label</i>Contribute</a></li>
<li><a href="{{ url_for('main.dashboard', _anchor='contributions') }}" style="padding-left: 47px;"><i class="material-icons">new_label</i>My Contributions</a></li>
<li class="social-area-color-base social-area-color-border-darken" style="border-left: 10px solid; margin-top: 5px;"><a href="{{ url_for('main.social_area') }}"><i class="material-icons">group</i>Social Area</a></li>
<li><div class="divider"></div></li>
<li><a class="subheader">Processes & Services</a></li>

View File

@ -1,44 +0,0 @@
{% extends "base.html.j2" %}
{% import "materialize/wtf.html.j2" as wtf %}
{% block page_content %}
<div class="container">
<div class="row">
<div class="col s12">
<h1 id="title">{{ title }}</h1>
</div>
<div class="col s4">
<div class="card extension-selector hoverable service-color" data-service="tesseract-ocr-pipeline">
<a href="{{ url_for('.tesseract_ocr_pipeline_models') }}" style="position: absolute; width: 100%; height: 100%;"></a>
<div class="card-content">
<span class="card-title" data-service="tesseract-ocr-pipeline">Tesseract OCR Pipeline Models</span>
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
</div>
</div>
</div>
<div class="col s4">
<div class="card extension-selector hoverable service-color" data-service="spacy-nlp-pipeline">
<a href="{{ url_for('.spacy_nlp_pipeline_models') }}" style="position: absolute; width: 100%; height: 100%;"></a>
<div class="card-content">
<span class="card-title">SpaCy NLP Pipeline Models</span>
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
</div>
</div>
</div>
<!--
<div class="col s4">
<div class="card extension-selector hoverable service-color" data-service="transkribus-htr-pipeline">
<a href="" style="position: absolute; width: 100%; height: 100%;"></a>
<div class="card-content">
<span class="card-title">Transkribus HTR Pipeline Models</span>
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
</div>
</div>
</div>
-->
</div>
</div>
{% endblock page_content %}

View File

@ -41,6 +41,39 @@
</div>
</div>
</div>
<div class="col s12" id="contributions">
<h3>My Contributions</h3>
<div class="col s4">
<div class="card extension-selector hoverable service-color" data-service="tesseract-ocr-pipeline">
<a href="{{ url_for('contributions.tesseract_ocr_pipeline_models') }}" style="position: absolute; width: 100%; height: 100%;"></a>
<div class="card-content">
<span class="card-title" data-service="tesseract-ocr-pipeline">Tesseract OCR Pipeline Models</span>
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
</div>
</div>
</div>
<div class="col s4">
<div class="card extension-selector hoverable service-color" data-service="spacy-nlp-pipeline">
<a href="{{ url_for('contributions.spacy_nlp_pipeline_models') }}" style="position: absolute; width: 100%; height: 100%;"></a>
<div class="card-content">
<span class="card-title">SpaCy NLP Pipeline Models</span>
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
</div>
</div>
</div>
<div class="col s4">
<div class="card extension-selector hoverable service-color" data-service="transkribus-htr-pipeline">
<a href="{{ url_for('contributions.transkribus_htr_pipeline_models') }}" style="position: absolute; width: 100%; height: 100%;"></a>
<div class="card-content">
<span class="card-title">Transkribus HTR Pipeline Models</span>
<p>Here you can see and edit the models that you have created. You can also create new models.</p>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock page_content %}