Merge branch 'development'

This commit is contained in:
Patrick Jentsch
2025-09-24 15:48:48 +02:00
5 changed files with 11 additions and 11 deletions

View File

@@ -87,14 +87,14 @@ class CreateTesseractOCRPipelineJobForm(CreateJobBaseForm):
user_models = [
x for x in current_user.tesseract_ocr_pipeline_models.order_by(TesseractOCRPipelineModel.title).all()
]
models = [
public_models = [
x for x in TesseractOCRPipelineModel.query.order_by(TesseractOCRPipelineModel.title).all()
if version in x.compatible_service_versions and (x.is_public == True or x.user == current_user)
if version in x.compatible_service_versions and x.is_public == True
]
self.model.choices = {
'': [('', 'Choose your option')],
'Your models': [(x.hashid, f'{x.title} [{x.version}]') for x in user_models] if user_models else [(0, 'Nothing here yet...')],
'Public models': [(x.hashid, f'{x.title} [{x.version}]') for x in models]
'Public models': [(x.hashid, f'{x.title} [{x.version}]') for x in public_models]
}
self.model.default = ''
self.version.choices = [(x, x) for x in service_manifest['versions']]
@@ -176,14 +176,14 @@ class CreateSpacyNLPPipelineJobForm(CreateJobBaseForm):
user_models = [
x for x in current_user.spacy_nlp_pipeline_models.order_by(SpaCyNLPPipelineModel.title).all()
]
models = [
x for x in SpaCyNLPPipelineModel.query.filter(SpaCyNLPPipelineModel.user != current_user, SpaCyNLPPipelineModel.is_public == True).order_by(SpaCyNLPPipelineModel.title).all()
if version in x.compatible_service_versions
public_models = [
x for x in SpaCyNLPPipelineModel.query.order_by(SpaCyNLPPipelineModel.title).all()
if version in x.compatible_service_versions and x.is_public == True
]
self.model.choices = {
'': [('', 'Choose your option')],
'Your models': [(x.hashid, f'{x.title} [{x.version}]') for x in user_models] if user_models else [(0, 'Nothing here yet...')],
'Public models': [(x.hashid, f'{x.title} [{x.version}]') for x in models]
'Public models': [(x.hashid, f'{x.title} [{x.version}]') for x in public_models]
}
self.model.default = ''
self.version.choices = [(x, x) for x in service_manifest['versions']]

View File

@@ -33,7 +33,7 @@ nopaque.resource_lists.SpaCyNLPPipelineModelList = class SpaCyNLPPipelineModelLi
</td>
<td class="right-align">
<a class="list-action-trigger btn-floating red waves-effect waves-light" data-list-action="delete-request"><i class="material-icons">delete</i></a>
<a class="list-action-trigger btn-floating service-color darken waves-effect waves-light service-2" data-list-action="view"><i class="material-icons">send</i></a>
<a class="list-action-trigger btn-floating waves-effect waves-light service-2" data-list-action="view"><i class="material-icons">send</i></a>
</td>
</tr>
`.trim();

View File

@@ -33,7 +33,7 @@ nopaque.resource_lists.TesseractOCRPipelineModelList = class TesseractOCRPipelin
</td>
<td class="right-align">
<a class="list-action-trigger btn-floating red waves-effect waves-light" data-list-action="delete-request"><i class="material-icons">delete</i></a>
<a class="list-action-trigger btn-floating service-color darken waves-effect waves-light service-2" data-list-action="view"><i class="material-icons">send</i></a>
<a class="list-action-trigger btn-floating waves-effect waves-light service-2" data-list-action="view"><i class="material-icons">send</i></a>
</td>
</tr>
`.trim();

View File

@@ -39,7 +39,7 @@
<div class="footer-copyright">
<div class="container">
© 2024 Bielefeld University
© 2025 Bielefeld University
<a class="grey-text text-lighten-4 right" href="https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque/-/releases/{{ config.NOPAQUE_VERSION }}">Version {{ config.NOPAQUE_VERSION }}</a>
</div>
</div>

View File

@@ -90,7 +90,7 @@
{% if current_user == user %}
<div class="card-action">
<p class="right-align">
<a class="btn waves-effect waves-light" href="{{ url_for('settings.settings') }}">Edit profile</a>
<a class="btn waves-effect waves-light" href="{{ url_for('settings.index') }}">Edit profile</a>
</p>
</div>
{% endif %}