mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 01:05:42 +00:00
Rework corpora package
This commit is contained in:
parent
554702130c
commit
4052991b08
@ -9,21 +9,22 @@ class AddCorpusFileForm(FlaskForm):
|
|||||||
'''
|
'''
|
||||||
Form to add a .vrt corpus file to the current corpus.
|
Form to add a .vrt corpus file to the current corpus.
|
||||||
'''
|
'''
|
||||||
address = StringField('Adress', validators=[Length(0, 255)])
|
# Required fields
|
||||||
author = StringField('Author', validators=[DataRequired(), Length(1, 255)])
|
author = StringField('Author', validators=[DataRequired(), Length(1, 255)])
|
||||||
|
file = FileField('File', validators=[DataRequired()])
|
||||||
|
title = StringField('Title', validators=[DataRequired(), Length(1, 255)])
|
||||||
|
# Optional fields
|
||||||
|
address = StringField('Adress', validators=[Length(0, 255)])
|
||||||
booktitle = StringField('Booktitle', validators=[Length(0, 255)])
|
booktitle = StringField('Booktitle', validators=[Length(0, 255)])
|
||||||
chapter = StringField('Chapter', validators=[Length(0, 255)])
|
chapter = StringField('Chapter', validators=[Length(0, 255)])
|
||||||
editor = StringField('Editor', validators=[Length(0, 255)])
|
editor = StringField('Editor', validators=[Length(0, 255)])
|
||||||
file = FileField('File', validators=[DataRequired()])
|
|
||||||
institution = StringField('Institution', validators=[Length(0, 255)])
|
institution = StringField('Institution', validators=[Length(0, 255)])
|
||||||
journal = StringField('Journal', validators=[Length(0, 255)])
|
journal = StringField('Journal', validators=[Length(0, 255)])
|
||||||
pages = StringField('Pages', validators=[Length(0, 255)])
|
pages = StringField('Pages', validators=[Length(0, 255)])
|
||||||
publisher = StringField('Publisher', validators=[Length(0, 255)])
|
publisher = StringField('Publisher', validators=[Length(0, 255)])
|
||||||
publishing_year = IntegerField('Publishing year',
|
publishing_year = IntegerField('Publishing year')
|
||||||
validators=[DataRequired()])
|
|
||||||
school = StringField('School', validators=[Length(0, 255)])
|
school = StringField('School', validators=[Length(0, 255)])
|
||||||
submit = SubmitField()
|
submit = SubmitField()
|
||||||
title = StringField('Title', validators=[DataRequired(), Length(1, 255)])
|
|
||||||
|
|
||||||
def __init__(self, corpus, *args, **kwargs):
|
def __init__(self, corpus, *args, **kwargs):
|
||||||
super(AddCorpusFileForm, self).__init__(*args, **kwargs)
|
super(AddCorpusFileForm, self).__init__(*args, **kwargs)
|
||||||
@ -43,8 +44,11 @@ class EditCorpusFileForm(FlaskForm):
|
|||||||
'''
|
'''
|
||||||
Form to edit meta data of one corpus file.
|
Form to edit meta data of one corpus file.
|
||||||
'''
|
'''
|
||||||
address = StringField('Adress', validators=[Length(0, 255)])
|
# Required fields
|
||||||
author = StringField('Author', validators=[DataRequired(), Length(1, 255)])
|
author = StringField('Author', validators=[DataRequired(), Length(1, 255)])
|
||||||
|
title = StringField('Title', validators=[DataRequired(), Length(1, 255)])
|
||||||
|
# Optional fields
|
||||||
|
address = StringField('Adress', validators=[Length(0, 255)])
|
||||||
booktitle = StringField('Booktitle', validators=[Length(0, 255)])
|
booktitle = StringField('Booktitle', validators=[Length(0, 255)])
|
||||||
chapter = StringField('Chapter', validators=[Length(0, 255)])
|
chapter = StringField('Chapter', validators=[Length(0, 255)])
|
||||||
editor = StringField('Editor', validators=[Length(0, 255)])
|
editor = StringField('Editor', validators=[Length(0, 255)])
|
||||||
@ -52,11 +56,9 @@ class EditCorpusFileForm(FlaskForm):
|
|||||||
journal = StringField('Journal', validators=[Length(0, 255)])
|
journal = StringField('Journal', validators=[Length(0, 255)])
|
||||||
pages = StringField('Pages', validators=[Length(0, 255)])
|
pages = StringField('Pages', validators=[Length(0, 255)])
|
||||||
publisher = StringField('Publisher', validators=[Length(0, 255)])
|
publisher = StringField('Publisher', validators=[Length(0, 255)])
|
||||||
publishing_year = IntegerField('Publishing year',
|
publishing_year = IntegerField('Publishing year')
|
||||||
validators=[DataRequired()])
|
|
||||||
school = StringField('School', validators=[Length(0, 255)])
|
school = StringField('School', validators=[Length(0, 255)])
|
||||||
submit = SubmitField()
|
submit = SubmitField()
|
||||||
title = StringField('Title', validators=[DataRequired(), Length(1, 255)])
|
|
||||||
|
|
||||||
|
|
||||||
class AddCorpusForm(FlaskForm):
|
class AddCorpusForm(FlaskForm):
|
||||||
|
@ -77,6 +77,7 @@ def analyse_corpus(corpus_id):
|
|||||||
prefix='inspect-display-options-form')
|
prefix='inspect-display-options-form')
|
||||||
return render_template(
|
return render_template(
|
||||||
'corpora/analyse_corpus.html.j2',
|
'corpora/analyse_corpus.html.j2',
|
||||||
|
corpus=corpus,
|
||||||
corpus_id=corpus_id,
|
corpus_id=corpus_id,
|
||||||
display_options_form=display_options_form,
|
display_options_form=display_options_form,
|
||||||
query_form=query_form,
|
query_form=query_form,
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
.tab .material-icons {
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
/* add custom bold class */
|
/* add custom bold class */
|
||||||
.bold {
|
.bold {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -85,7 +85,6 @@ RessourceList.dataMappers = {
|
|||||||
author: corpus_file.author,
|
author: corpus_file.author,
|
||||||
filename: corpus_file.filename,
|
filename: corpus_file.filename,
|
||||||
link: `${corpus_file.corpus_id}/files/${corpus_file.id}`,
|
link: `${corpus_file.corpus_id}/files/${corpus_file.id}`,
|
||||||
publishing_year: corpus_file.publishing_year,
|
|
||||||
title: corpus_file.title,
|
title: corpus_file.title,
|
||||||
title1: corpus_file.title,
|
title1: corpus_file.title,
|
||||||
"delete-link": `/corpora/${corpus_file.corpus_id}/files/${corpus_file.id}/delete`,
|
"delete-link": `/corpora/${corpus_file.corpus_id}/files/${corpus_file.id}/delete`,
|
||||||
@ -239,7 +238,6 @@ RessourceList.options = {
|
|||||||
<td class="filename" style="word-break: break-word;"></td>
|
<td class="filename" style="word-break: break-word;"></td>
|
||||||
<td class="author" style="word-break: break-word;"></td>
|
<td class="author" style="word-break: break-word;"></td>
|
||||||
<td class="title" style="word-break: break-word;"></td>
|
<td class="title" style="word-break: break-word;"></td>
|
||||||
<td class="publishing_year" style="word-break: break-word;"></td>
|
|
||||||
<td>
|
<td>
|
||||||
<div class="right-align">
|
<div class="right-align">
|
||||||
<a class="btn-floating modal-trigger red tooltipped waves-effect waves-light delete-modal-trigger" data-position="top" data-tooltip="Delete">
|
<a class="btn-floating modal-trigger red tooltipped waves-effect waves-light delete-modal-trigger" data-position="top" data-tooltip="Delete">
|
||||||
@ -267,7 +265,6 @@ RessourceList.options = {
|
|||||||
valueNames: [
|
valueNames: [
|
||||||
"author",
|
"author",
|
||||||
"filename",
|
"filename",
|
||||||
"publishing_year",
|
|
||||||
"title",
|
"title",
|
||||||
"title1",
|
"title1",
|
||||||
{name: "delete-link", attr: "href"},
|
{name: "delete-link", attr: "href"},
|
||||||
|
@ -1,29 +1,53 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
|
{% set scheme_primary_color = colors.corpus_analysis_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.corpus_analysis %}
|
||||||
|
|
||||||
|
{% block nav_content %}
|
||||||
|
<ul class="tabs tabs-transparent">
|
||||||
|
<li class="tab"><a href="{{ url_for('main.dashboard', _anchor='corpora') }}" target="_self">My Corpora</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a class="active" href="{{ url_for('corpora.add_corpus') }}" target="_self">Add</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endblock nav_content %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12 m4">
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<p class="hide-on-small-only"> </p>
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
<p>Fill out the following form to add a corpus to your corpora.</p>
|
<p>Fill out the following form to add a corpus to your corpora.</p>
|
||||||
<a class="waves-effect waves-light btn" href="{{ url_for('main.dashboard') }}"><i class="material-icons left">arrow_back</i>Back to dashboard</a>
|
<a class="waves-effect waves-light btn" href="{{ url_for('main.dashboard') }}"><i class="material-icons left">arrow_back</i>Back to dashboard</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
{{ add_corpus_form.hidden_tag() }}
|
{{ add_corpus_form.hidden_tag() }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 m4">
|
<div class="col s12 m4">
|
||||||
{{ M.render_field(add_corpus_form.title, data_length='32', material_icon='title') }}
|
{{ wtf.render_field(add_corpus_form.title, data_length='32', material_icon='title') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m8">
|
||||||
{{ M.render_field(add_corpus_form.description, data_length='255', material_icon='description') }}
|
{{ wtf.render_field(add_corpus_form.description, data_length='255', material_icon='description') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(add_corpus_form.submit, material_icon='send') }}
|
{{ wtf.render_field(add_corpus_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,41 +1,56 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
|
{% set scheme_primary_color = colors.corpus_analysis_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.corpus_analysis %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
|
||||||
|
|
||||||
|
{% block nav_content %}
|
||||||
|
<ul class="tabs tabs-transparent">
|
||||||
|
<li class="tab"><a href="{{ url_for('main.dashboard', _anchor='corpora') }}" target="_self">My Corpora</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a href="{{ url_for('corpora.corpus', corpus_id=corpus.id) }}" target="_self">{{ corpus.title }}</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a href="{{ url_for('corpora.corpus', corpus_id=corpus.id, _anchor='corpus-files') }}" target="_self">Corpus files</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a class="active" href="{{ url_for('corpora.add_corpus_file', corpus_id=corpus.id) }}" target="_self">Add</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endblock nav_content %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12 m4">
|
<div class="container">
|
||||||
<h3>{{ corpus.title }}</h3>
|
<div class="row">
|
||||||
<p>
|
<div class="col s12">
|
||||||
Fill out the following form to add a corpus file in verticalized text
|
<p> </p>
|
||||||
format (.vrt).
|
<h1 id="title">{{ title }}</h1>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
|
||||||
<strong>Do not use the .stand-off.vrt file!</strong>
|
|
||||||
</p>
|
|
||||||
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.corpus', corpus_id=corpus.id) }}"><i class="material-icons left">arrow_back</i>Back to corpus</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m4">
|
||||||
|
<p>Fill out the following form to add a corpus file in verticalized text format (.vrt).</p>
|
||||||
|
<p><b>Do not use the .stand-off.vrt file!</b></p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m8">
|
||||||
<form class="nopaque-submit-form" data-progress-modal="progress-modal">
|
<form class="nopaque-submit-form" data-progress-modal="progress-modal">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">Required metadata</span>
|
|
||||||
{{ add_corpus_file_form.hidden_tag() }}
|
{{ add_corpus_file_form.hidden_tag() }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 m4">
|
<div class="col s12 m4">
|
||||||
{{ M.render_field(add_corpus_file_form.author, data_length='255', material_icon='person') }}
|
{{ wtf.render_field(add_corpus_file_form.author, data_length='255', material_icon='person') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 m4">
|
<div class="col s12 m4">
|
||||||
{{ M.render_field(add_corpus_file_form.title, data_length='255', material_icon='title') }}
|
{{ wtf.render_field(add_corpus_file_form.title, data_length='255', material_icon='title') }}
|
||||||
</div>
|
|
||||||
<div class="col s12 m4">
|
|
||||||
{{ M.render_field(add_corpus_file_form.publishing_year, material_icon='access_time') }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
{{ M.render_field(add_corpus_file_form.file, accept='.vrt', placeholder='Choose your .vrt file') }}
|
{{ wtf.render_field(add_corpus_file_form.file, accept='.vrt', placeholder='Choose your .vrt file') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(add_corpus_file_form.submit, material_icon='send') }}
|
{{ wtf.render_field(add_corpus_file_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
@ -44,8 +59,8 @@
|
|||||||
<div class="collapsible-header"><i class="material-icons">add</i>Add additional metadata</div>
|
<div class="collapsible-header"><i class="material-icons">add</i>Add additional metadata</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
{% for field in add_corpus_file_form
|
{% for field in add_corpus_file_form
|
||||||
if field.short_name not in ['author', 'csrf_token', 'file', 'publishing_year', 'submit', 'title'] %}
|
if field.short_name not in ['author', 'csrf_token', 'file', 'submit', 'title'] %}
|
||||||
{{ M.render_field(field, data_length='255', material_icon=field.label.text[0:1]) }}
|
{{ wtf.render_field(field, data_length='255', material_icon=field.label.text[0:1]) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@ -66,6 +81,8 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress-modal" class="modal">
|
<div id="progress-modal" class="modal">
|
||||||
|
@ -1,12 +1,26 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
{% set headline = ' ' %}
|
{% set scheme_primary_color = colors.corpus_analysis_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.corpus_analysis %}
|
||||||
|
|
||||||
{% set full_width = True %}
|
{% block nav_content %}
|
||||||
|
<ul class="tabs tabs-transparent">
|
||||||
|
<li class="tab"><a href="{{ url_for('main.dashboard', _anchor='corpora') }}" target="_self">My Corpora</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a href="{{ url_for('corpora.corpus', corpus_id=corpus.id) }}" target="_self">{{ corpus.title }}</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a href="{{ url_for('corpora.analyse_corpus', corpus_id=corpus.id) }}" target="_self">Corpus Analysis</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endblock nav_content %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
{{ Macros.insert_color_scheme(corpus_analysis_color_darken) }}
|
<div class="row">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
|
<p class="hide-on-small-only"> </p>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content" style="padding-top: 5px;
|
<div class="card-content" style="padding-top: 5px;
|
||||||
padding-bottom: 0px;">
|
padding-bottom: 0px;">
|
||||||
@ -27,7 +41,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 m2 center-align" style="margin-top: 1.75em;">
|
<div class="col s12 m2 center-align" style="margin-top: 1.75em;">
|
||||||
{{ M.render_field(query_form.submit, material_icon='send',
|
{{ wtf.render_field(query_form.submit, material_icon='send',
|
||||||
style='width:100%;') }}
|
style='width:100%;') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -35,10 +49,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- entire results div/card -->
|
<!-- entire results div/card -->
|
||||||
<div class="col s12" id="query-display">
|
<div class="col s12" id="query-display">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content" id="result-list" style="overflow: hidden;">
|
<div class="card-content" id="result-list" style="overflow: hidden;">
|
||||||
<div id="interactions-menu" class="row hide"
|
<div id="interactions-menu" class="row hide"
|
||||||
@ -54,6 +68,7 @@
|
|||||||
{% include 'tables/query_results.html.j2' %}
|
{% include 'tables/query_results.html.j2' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Scroll to top element -->
|
<!-- Scroll to top element -->
|
||||||
@ -65,7 +80,10 @@
|
|||||||
{% include 'modals/export_query_results.html.j2' %}
|
{% include 'modals/export_query_results.html.j2' %}
|
||||||
{% include 'modals/context_modal.html.j2' %}
|
{% include 'modals/context_modal.html.j2' %}
|
||||||
{% include 'modals/show_corpus_files.html.j2' %}
|
{% include 'modals/show_corpus_files.html.j2' %}
|
||||||
|
{% endblock page_content %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{ super() }}
|
||||||
<!-- import modules -->
|
<!-- import modules -->
|
||||||
<script type="module">
|
<script type="module">
|
||||||
/**
|
/**
|
||||||
|
@ -1,9 +1,29 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
|
||||||
|
{% set scheme_primary_color = colors.corpus_analysis_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.corpus_analysis %}
|
||||||
|
|
||||||
|
{% block nav_content %}
|
||||||
|
<ul class="tabs tabs-transparent">
|
||||||
|
<li class="tab"><a href="{{ url_for('main.dashboard', _anchor='corpora') }}" target="_self">My Corpora</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a class="active" href="{{ url_for('corpora.corpus', corpus_id=corpus.id) }}" target="_self">{{ corpus.title }}</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endblock nav_content %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12 m4">
|
<div class="container">
|
||||||
<h3 id="title">{{ corpus.title }}</h3>
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<p class="hide-on-small-only"> </p>
|
||||||
|
<h1 id="title">{{ corpus.title }}</h1>
|
||||||
<p id="description">{{ corpus.description }}</p>
|
<p id="description">{{ corpus.description }}</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
<div class="active preloader-wrapper small hide" id="progress-indicator">
|
<div class="active preloader-wrapper small hide" id="progress-indicator">
|
||||||
<div class="spinner-layer spinner-blue-only">
|
<div class="spinner-layer spinner-blue-only">
|
||||||
<div class="circle-clipper left">
|
<div class="circle-clipper left">
|
||||||
@ -18,9 +38,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span class="chip status white-text hide" id="status"></span>
|
<span class="chip status white-text hide" id="status"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">Chronometrics</span>
|
<span class="card-title">Chronometrics</span>
|
||||||
@ -53,14 +73,14 @@
|
|||||||
<a data-target="delete-corpus-modal" class="btn modal-trigger red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
|
<a data-target="delete-corpus-modal" class="btn modal-trigger red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12"></div>
|
<div class="col s12"></div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content" id="corpus-files" style="overflow: hidden;">
|
<div class="card-content" id="corpus-files" style="overflow: hidden;">
|
||||||
<span class="card-title">Files</span>
|
<span class="card-title" id="files">Corpus files</span>
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
<i class="material-icons prefix">search</i>
|
<i class="material-icons prefix">search</i>
|
||||||
<input id="search-results" class="search" type="search"></input>
|
<input id="search-results" class="search" type="search"></input>
|
||||||
@ -73,7 +93,6 @@
|
|||||||
<th class="sort" data-sort="filename">Filename</th>
|
<th class="sort" data-sort="filename">Filename</th>
|
||||||
<th class="sort" data-sort="author">Author</th>
|
<th class="sort" data-sort="author">Author</th>
|
||||||
<th class="sort" data-sort="title">Title</th>
|
<th class="sort" data-sort="title">Title</th>
|
||||||
<th class="sort" data-sort="publishing_year">Publishing year</th>
|
|
||||||
<th>{# Actions #}</th>
|
<th>{# Actions #}</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -93,9 +112,10 @@
|
|||||||
<a href="{{ url_for('corpora.add_corpus_file', corpus_id=corpus.id) }}" class="btn waves-effect waves-light"><i class="material-icons left">add</i>Add corpus file</a>
|
<a href="{{ url_for('corpora.add_corpus_file', corpus_id=corpus.id) }}" class="btn waves-effect waves-light"><i class="material-icons left">add</i>Add corpus file</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Modals -->
|
<!-- Modals -->
|
||||||
<div id="delete-corpus-modal" class="modal">
|
<div id="delete-corpus-modal" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -107,7 +127,10 @@
|
|||||||
<a href="{{ url_for('corpora.delete_corpus', corpus_id=corpus.id) }}" class="btn modal-close red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
|
<a href="{{ url_for('corpora.delete_corpus', corpus_id=corpus.id) }}" class="btn modal-close red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock page_content %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{ super() }}
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import {RessourceList} from '../../static/js/nopaque.lists.js';
|
import {RessourceList} from '../../static/js/nopaque.lists.js';
|
||||||
class InformationUpdater {
|
class InformationUpdater {
|
||||||
@ -193,14 +216,10 @@
|
|||||||
var informationUpdater = new InformationUpdater({{ corpus.id }}, false);
|
var informationUpdater = new InformationUpdater({{ corpus.id }}, false);
|
||||||
{% else %}
|
{% else %}
|
||||||
var informationUpdater = new InformationUpdater({{ corpus.id }}, true);
|
var informationUpdater = new InformationUpdater({{ corpus.id }}, true);
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
nopaque.socket.emit("foreign_user_data_stream_init", {{ corpus.user_id }});
|
nopaque.socket.emit("foreign_user_data_stream_init", {{ corpus.user_id }});
|
||||||
});
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
let corpusFilesList = new RessourceList("corpus-files", null, "CorpusFile");
|
let corpusFilesList = new RessourceList("corpus-files", null, "CorpusFile");
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
corpusFilesList._add({{ corpus_files|tojson|safe }});
|
corpusFilesList._add({{ corpus_files|tojson|safe }});
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock scripts %}
|
||||||
|
@ -1,31 +1,48 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
|
{% set scheme_primary_color = colors.corpus_analysis_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.corpus_analysis %}
|
||||||
|
|
||||||
|
{% block nav_content %}
|
||||||
|
<ul class="tabs tabs-transparent">
|
||||||
|
<li class="tab"><a href="{{ url_for('main.dashboard', _anchor='corpora') }}" target="_self">My Corpora</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a href="{{ url_for('corpora.corpus', corpus_id=corpus_file.corpus.id) }}" target="_self">{{ corpus_file.corpus.title }}</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a href="{{ url_for('corpora.corpus', corpus_id=corpus_file.corpus.id, _anchor='corpus-files') }}" target="_self">Corpus files</a></li>
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
<li class="tab"><a class="active" href="{{ url_for('corpora.corpus_file', corpus_id=corpus_file.corpus.id, corpus_file_id=corpus_file.id) }}" target="_self">{{ corpus_file.author }}: {{ corpus_file.title }}</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endblock nav_content %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12 m4">
|
<div class="container">
|
||||||
<h3 id="title">...</h3>
|
<div class="row">
|
||||||
<p id="description">Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et</p>
|
<div class="col s12">
|
||||||
<a class="btn waves-effect waves-light" href="{{ url_for('corpora.corpus', corpus_id=corpus.id) }}"><i class="material-icons left">arrow_back</i>Back to corpus</a>
|
<p class="hide-on-small-only"> </p>
|
||||||
</div>
|
<h1 id="title">{{ corpus_file.author }}: {{ corpus_file.title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
{{ edit_corpus_file_form.hidden_tag() }}
|
{{ edit_corpus_file_form.hidden_tag() }}
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 m4">
|
<div class="col s12 m6">
|
||||||
{{ M.render_field(edit_corpus_file_form.author, data_length='255', material_icon='person') }}
|
{{ wtf.render_field(edit_corpus_file_form.author, data_length='255', material_icon='person') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 m4">
|
<div class="col s12 m6">
|
||||||
{{ M.render_field(edit_corpus_file_form.title, data_length='255', material_icon='title') }}
|
{{ wtf.render_field(edit_corpus_file_form.title, data_length='255', material_icon='title') }}
|
||||||
</div>
|
|
||||||
<div class="col s12 m4">
|
|
||||||
{{ M.render_field(edit_corpus_file_form.publishing_year, material_icon='access_time') }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(edit_corpus_file_form.submit, material_icon='send') }}
|
{{ wtf.render_field(edit_corpus_file_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br>
|
<br>
|
||||||
@ -34,12 +51,14 @@
|
|||||||
<div class="collapsible-header"><i class="material-icons">edit</i>Edit additional metadata</div>
|
<div class="collapsible-header"><i class="material-icons">edit</i>Edit additional metadata</div>
|
||||||
<div class="collapsible-body">
|
<div class="collapsible-body">
|
||||||
{% for field in edit_corpus_file_form
|
{% for field in edit_corpus_file_form
|
||||||
if field.short_name not in ['author', 'csrf_token', 'publishing_year', 'submit', 'title'] %}
|
if field.short_name not in ['author', 'csrf_token', 'submit', 'title'] %}
|
||||||
{{ M.render_field(field, data_length='255', material_icon=field.label.text[0:1]) }}
|
{{ wtf.render_field(field, data_length='255', material_icon=field.label.text[0:1]) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<ul class="tabs tabs-transparent">
|
<ul class="tabs tabs-transparent">
|
||||||
<li class="tab disabled"><i class="material-icons left" style="line-height: 48px;">explore</i>Roadmap</li>
|
<li class="tab disabled"><a><i class="material-icons left">explore</i>Roadmap</a></li>
|
||||||
<li class="tab"><a{%if request.path == url_for('services.service', service='file-setup') %} class="active"{% endif %} href="{{ url_for('services.service', service='file-setup') }}" target="_self">File setup</a></li>
|
<li class="tab"><a{%if request.path == url_for('services.service', service='file-setup') %} class="active"{% endif %} href="{{ url_for('services.service', service='file-setup') }}" target="_self">File setup</a></li>
|
||||||
<li class="tab disabled"><i class="material-icons" style="line-height: 48px;">navigate_next</i></li>
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
<li class="tab"><a{%if request.path == url_for('services.service', service='ocr') %} class="active"{% endif %} href="{{ url_for('services.service', service='ocr') }}" target="_self">OCR</a></li>
|
<li class="tab"><a{%if request.path == url_for('services.service', service='ocr') %} class="active"{% endif %} href="{{ url_for('services.service', service='ocr') }}" target="_self">OCR</a></li>
|
||||||
<li class="tab disabled"><i class="material-icons" style="line-height: 48px;">navigate_next</i></li>
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
<li class="tab"><a{%if request.path == url_for('services.service', service='nlp') %} class="active"{% endif %} href="{{ url_for('services.service', service='nlp') }}" target="_self">NLP</a></li>
|
<li class="tab"><a{%if request.path == url_for('services.service', service='nlp') %} class="active"{% endif %} href="{{ url_for('services.service', service='nlp') }}" target="_self">NLP</a></li>
|
||||||
<li class="tab disabled"><i class="material-icons" style="line-height: 48px;">navigate_next</i></li>
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
<li class="tab"><a{%if request.path == url_for('services.service', service='corpus_analysis') %} class="active"{% endif %} href="{{ url_for('services.service', service='corpus_analysis') }}" target="_self">Corpus Analysis</a></li>
|
<li class="tab"><a{%if request.path == url_for('services.service', service='corpus_analysis') %} class="active"{% endif %} href="{{ url_for('services.service', service='corpus_analysis') }}" target="_self">Corpus Analysis</a></li>
|
||||||
</ul>
|
</ul>
|
@ -5,7 +5,7 @@
|
|||||||
{% set scheme_secondary_color = colors.corpus_analysis %}
|
{% set scheme_secondary_color = colors.corpus_analysis %}
|
||||||
|
|
||||||
{% block nav_content %}
|
{% block nav_content %}
|
||||||
{% include 'services/_nav_content.html.j2' %}
|
{% include 'services/_roadmap.html.j2' %}
|
||||||
{% endblock nav_content %}
|
{% endblock nav_content %}
|
||||||
|
|
||||||
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
|
{% block main_attribs %} class="corpus-analysis-color lighten"{% endblock main_attribs %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{% set scheme_secondary_color = colors.file_setup %}
|
{% set scheme_secondary_color = colors.file_setup %}
|
||||||
|
|
||||||
{% block nav_content %}
|
{% block nav_content %}
|
||||||
{% include 'services/_nav_content.html.j2' %}
|
{% include 'services/_roadmap.html.j2' %}
|
||||||
{% endblock nav_content %}
|
{% endblock nav_content %}
|
||||||
|
|
||||||
{% block main_attribs %} class="file-setup-color lighten"{% endblock main_attribs %}
|
{% block main_attribs %} class="file-setup-color lighten"{% endblock main_attribs %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{% set scheme_secondary_color = colors.nlp %}
|
{% set scheme_secondary_color = colors.nlp %}
|
||||||
|
|
||||||
{% block nav_content %}
|
{% block nav_content %}
|
||||||
{% include 'services/_nav_content.html.j2' %}
|
{% include 'services/_roadmap.html.j2' %}
|
||||||
{% endblock nav_content %}
|
{% endblock nav_content %}
|
||||||
|
|
||||||
{% block main_attribs %} class="nlp-color lighten"{% endblock main_attribs %}
|
{% block main_attribs %} class="nlp-color lighten"{% endblock main_attribs %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{% set scheme_secondary_color = colors.ocr %}
|
{% set scheme_secondary_color = colors.ocr %}
|
||||||
|
|
||||||
{% block nav_content %}
|
{% block nav_content %}
|
||||||
{% include 'services/_nav_content.html.j2' %}
|
{% include 'services/_roadmap.html.j2' %}
|
||||||
{% endblock nav_content %}
|
{% endblock nav_content %}
|
||||||
|
|
||||||
{% block main_attribs %} class="ocr-color lighten"{% endblock main_attribs %}
|
{% block main_attribs %} class="ocr-color lighten"{% endblock main_attribs %}
|
||||||
|
Loading…
Reference in New Issue
Block a user