mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 17:25:44 +00:00
165 lines
6.1 KiB
Django/Jinja
165 lines
6.1 KiB
Django/Jinja
{% extends "base.html.j2" %}
|
||
{% from "services/_breadcrumbs.html.j2" import breadcrumbs with context %}
|
||
{% import "materialize/wtf.html.j2" as wtf %}
|
||
|
||
{% block main_attribs %} class="service-scheme" data-service="ocr"{% endblock main_attribs %}
|
||
|
||
{% block page_content %}
|
||
<div class="container">
|
||
<div class="row">
|
||
<div class="col s12">
|
||
<h1 id="title">{{ title }}</h1>
|
||
</div>
|
||
|
||
<div class="col s12 m3 push-m9">
|
||
<div class="center-align">
|
||
<p class="hide-on-small-only"> </p>
|
||
<p class="hide-on-small-only"> </p>
|
||
<a class="btn-floating btn-large btn-scale-x2 waves-effect waves-light">
|
||
<i class="nopaque-icons service-color darken service-icon" data-service="ocr"></i>
|
||
</a>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col s12 m9 pull-m3">
|
||
<div class="card service-color-border border-darken" data-service="ocr" style="border-top: 10px solid;">
|
||
<div class="card-content">
|
||
<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>OCR</span>
|
||
<p>In this process, nopaque converts your image data – like photos or scans – into text data. This step enables you to proceed with the computational analysis of your documents.</p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="col s12">
|
||
<h2>Submit a job</h2>
|
||
<div class="card">
|
||
<form class="nopaque-upload-form" data-progress-modal="progress-modal">
|
||
<div class="card-content">
|
||
{{ form.hidden_tag() }}
|
||
<div class="row">
|
||
<div class="col s12 l4">
|
||
{{ wtf.render_field(form.title, data_length='32', material_icon='title') }}
|
||
</div>
|
||
<div class="col s12 l8">
|
||
{{ wtf.render_field(form.description, data_length='255', material_icon='description') }}
|
||
</div>
|
||
<div class="col s12 l5">
|
||
{{ wtf.render_field(form.files, accept='application/pdf', color=ocr_color_darken, placeholder='Choose your .pdf files') }}
|
||
</div>
|
||
<div class="col s12 l4">
|
||
{{ wtf.render_field(form.language, material_icon='language') }}
|
||
</div>
|
||
<div class="col s12 l3">
|
||
{{ wtf.render_field(form.version, material_icon='apps') }}
|
||
</div>
|
||
<div class="col s12">
|
||
<span class="card-title">Preprocessing</span>
|
||
</div>
|
||
<div class="col s9">
|
||
<p>{{ form.binarization.label.text }}</p>
|
||
<p class="light">Based on a brightness threshold pixels are converted into either black or white. It is useful to reduce noise in images. (<b>longer duration</b>)</p>
|
||
</div>
|
||
<div class="col s3 right-align">
|
||
<div class="switch">
|
||
<label>
|
||
{{ form.binarization() }}
|
||
<span class="lever"></span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="col s12"><p> </p></div>
|
||
<div class="col s12 divider"></div>
|
||
<div class="col s12"><p> </p></div>
|
||
<div class="col s9">
|
||
<p>Page range</p>
|
||
<p class="light"></p>
|
||
</div>
|
||
<div class="col s3 right-align">
|
||
<div class="switch">
|
||
<label>
|
||
<input disabled type="checkbox">
|
||
<span class="lever"></span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="col s12"><p> </p></div>
|
||
<div class="col s12 divider"></div>
|
||
<div class="col s12"><p> </p></div>
|
||
<div class="col s9">
|
||
<p>Page rotation</p>
|
||
<p class="light"></p>
|
||
</div>
|
||
<div class="col s3 right-align">
|
||
<div class="switch">
|
||
<label>
|
||
<input disabled type="checkbox">
|
||
<span class="lever"></span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<div class="col s12"><p> </p></div>
|
||
<div class="col s12 divider"></div>
|
||
<div class="col s12"><p> </p></div>
|
||
<div class="col s9">
|
||
<p>Page split</p>
|
||
<p class="light"></p>
|
||
</div>
|
||
<div class="col s3 right-align">
|
||
<div class="switch">
|
||
<label>
|
||
<input disabled type="checkbox">
|
||
<span class="lever"></span>
|
||
</label>
|
||
</div>
|
||
</div>
|
||
<!--
|
||
Seperate each setting with the following
|
||
<div class="col s12"><p> </p></div>
|
||
<div class="col s12 divider"></div>
|
||
<div class="col s12"><p> </p></div>
|
||
-->
|
||
</div>
|
||
</div>
|
||
<div class="card-action right-align">
|
||
{{ wtf.render_field(form.submit, color=ocr_color_darken, material_icon='send') }}
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{% endblock page_content %}
|
||
|
||
{% block modals %}
|
||
{{ super() }}
|
||
<div id="progress-modal" class="modal">
|
||
<div class="modal-content">
|
||
<h4><i class="material-icons left">file_upload</i>Uploading files...</h4>
|
||
<div class="progress">
|
||
<div class="determinate" style="width: 0%"></div>
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<a href="#!" class="modal-close waves-effect waves-light btn red abort-request">Cancel</a>
|
||
</div>
|
||
</div>
|
||
{% endblock modals %}
|
||
|
||
{% block scripts %}
|
||
{{ super() }}
|
||
<script>
|
||
let versionField = document.querySelector('#add-job-form-version');
|
||
versionField.addEventListener('change', (event) => {
|
||
let url = new URL(window.location.href);
|
||
url.search = `?version=${event.target.value}`;
|
||
window.location.href = url.toString();
|
||
});
|
||
</script>
|
||
{% endblock scripts %}
|