mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-25 02:44:18 +00:00
Merge branch 'template-rework' into development
This commit is contained in:
commit
5cc6a9ab93
3
.env.tpl
3
.env.tpl
@ -99,8 +99,9 @@ NOPAQUE_ADMIN_EMAIL_ADRESS=
|
|||||||
# CHOOSE ONE: development, production, testing
|
# CHOOSE ONE: development, production, testing
|
||||||
# NOPAQUE_CONFIG=
|
# NOPAQUE_CONFIG=
|
||||||
|
|
||||||
|
# DEFAULT: None
|
||||||
# EXAMPLE: contact.nopaque@example.com
|
# EXAMPLE: contact.nopaque@example.com
|
||||||
NOPAQUE_CONTACT_EMAIL_ADRESS=
|
# NOPAQUE_CONTACT_EMAIL_ADRESS=
|
||||||
|
|
||||||
# DEFAULT: /mnt/nopaque
|
# DEFAULT: /mnt/nopaque
|
||||||
# NOTE: This must be a network share and it must be available on all Docker Swarm nodes
|
# NOTE: This must be a network share and it must be available on all Docker Swarm nodes
|
||||||
|
@ -11,7 +11,7 @@ services:
|
|||||||
- db
|
- db
|
||||||
- mq
|
- mq
|
||||||
env_file: .env
|
env_file: .env
|
||||||
image: nopaque/web
|
image: nopaque:development
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- "${NOPAQUE_DATA_DIR:-/mnt/nopaque}:${NOPAQUE_DATA_DIR:-/mnt/nopaque}"
|
- "${NOPAQUE_DATA_DIR:-/mnt/nopaque}:${NOPAQUE_DATA_DIR:-/mnt/nopaque}"
|
||||||
@ -27,7 +27,7 @@ services:
|
|||||||
- db
|
- db
|
||||||
- nopaque
|
- nopaque
|
||||||
env_file: .env
|
env_file: .env
|
||||||
image: nopaque/daemon
|
image: nopaqued:development
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
|
@ -28,22 +28,23 @@ def create_app(config_name):
|
|||||||
socketio.init_app(
|
socketio.init_app(
|
||||||
app, message_queue=config[config_name].SOCKETIO_MESSAGE_QUEUE_URI)
|
app, message_queue=config[config_name].SOCKETIO_MESSAGE_QUEUE_URI)
|
||||||
|
|
||||||
|
with app.app_context():
|
||||||
from . import events
|
from . import events
|
||||||
from .admin import admin as admin_blueprint
|
from .admin import admin as admin_blueprint
|
||||||
app.register_blueprint(admin_blueprint, url_prefix='/admin')
|
|
||||||
from .auth import auth as auth_blueprint
|
from .auth import auth as auth_blueprint
|
||||||
app.register_blueprint(auth_blueprint, url_prefix='/auth')
|
|
||||||
from .corpora import corpora as corpora_blueprint
|
from .corpora import corpora as corpora_blueprint
|
||||||
app.register_blueprint(corpora_blueprint, url_prefix='/corpora')
|
|
||||||
from .errors import errors as errors_blueprint
|
from .errors import errors as errors_blueprint
|
||||||
app.register_blueprint(errors_blueprint)
|
|
||||||
from .jobs import jobs as jobs_blueprint
|
from .jobs import jobs as jobs_blueprint
|
||||||
app.register_blueprint(jobs_blueprint, url_prefix='/jobs')
|
|
||||||
from .main import main as main_blueprint
|
from .main import main as main_blueprint
|
||||||
app.register_blueprint(main_blueprint)
|
|
||||||
from .profile import profile as profile_blueprint
|
|
||||||
app.register_blueprint(profile_blueprint, url_prefix='/profile')
|
|
||||||
from .services import services as services_blueprint
|
from .services import services as services_blueprint
|
||||||
|
from .settings import settings as settings_blueprint
|
||||||
|
app.register_blueprint(admin_blueprint, url_prefix='/admin')
|
||||||
|
app.register_blueprint(auth_blueprint, url_prefix='/auth')
|
||||||
|
app.register_blueprint(corpora_blueprint, url_prefix='/corpora')
|
||||||
|
app.register_blueprint(errors_blueprint)
|
||||||
|
app.register_blueprint(jobs_blueprint, url_prefix='/jobs')
|
||||||
|
app.register_blueprint(main_blueprint)
|
||||||
app.register_blueprint(services_blueprint, url_prefix='/services')
|
app.register_blueprint(services_blueprint, url_prefix='/services')
|
||||||
|
app.register_blueprint(settings_blueprint, url_prefix='/settings')
|
||||||
|
|
||||||
return app
|
return app
|
||||||
|
@ -1,36 +1,15 @@
|
|||||||
from flask_wtf import FlaskForm
|
from flask_login import current_user
|
||||||
from wtforms import (BooleanField, SelectField, StringField, SubmitField,
|
from wtforms import BooleanField, SelectField
|
||||||
ValidationError)
|
from ..models import Role
|
||||||
from wtforms.validators import DataRequired, Email, Length, Regexp
|
from ..settings.forms import EditGeneralSettingsForm
|
||||||
from ..models import Role, User
|
|
||||||
|
|
||||||
|
|
||||||
class EditUserForm(FlaskForm):
|
class EditGeneralSettingsAdminForm(EditGeneralSettingsForm):
|
||||||
email = StringField('Email',
|
|
||||||
validators=[DataRequired(), Length(1, 64), Email()])
|
|
||||||
username = StringField('Username',
|
|
||||||
validators=[DataRequired(), Length(1, 64),
|
|
||||||
Regexp('^[A-Za-z][A-Za-z0-9_.]*$', 0,
|
|
||||||
'Usernames must have only '
|
|
||||||
'letters, numbers, dots or '
|
|
||||||
'underscores')])
|
|
||||||
confirmed = BooleanField('Confirmed')
|
confirmed = BooleanField('Confirmed')
|
||||||
role = SelectField('Role', coerce=int)
|
role = SelectField('Role', coerce=int)
|
||||||
name = StringField('Real name', validators=[Length(0, 64)])
|
|
||||||
submit = SubmitField('Update Profile')
|
|
||||||
|
|
||||||
def __init__(self, user, *args, **kwargs):
|
def __init__(self, user=current_user, *args, **kwargs):
|
||||||
super(EditUserForm, self).__init__(*args, **kwargs)
|
super().__init__(*args, user=user, **kwargs)
|
||||||
self.role.choices = [(role.id, role.name)
|
self.role.choices = [(role.id, role.name)
|
||||||
for role in Role.query.order_by(Role.name).all()]
|
for role in Role.query.order_by(Role.name).all()]
|
||||||
self.user = user
|
self.user = user
|
||||||
|
|
||||||
def validate_email(self, field):
|
|
||||||
if field.data != self.user.email and \
|
|
||||||
User.query.filter_by(email=field.data).first():
|
|
||||||
raise ValidationError('Email already registered.')
|
|
||||||
|
|
||||||
def validate_username(self, field):
|
|
||||||
if field.data != self.user.username and \
|
|
||||||
User.query.filter_by(username=field.data).first():
|
|
||||||
raise ValidationError('Username already in use.')
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
from flask import flash, redirect, render_template, url_for
|
from flask import flash, redirect, render_template, url_for
|
||||||
from flask_login import login_required
|
from flask_login import current_user, login_required
|
||||||
from . import admin
|
from . import admin
|
||||||
from .forms import EditUserForm
|
from .forms import EditGeneralSettingsAdminForm
|
||||||
from .. import db
|
from .. import db
|
||||||
from ..decorators import admin_required
|
from ..decorators import admin_required
|
||||||
from ..models import Role, User
|
from ..models import Role, User
|
||||||
from ..profile import tasks as profile_tasks
|
from ..settings import tasks as settings_tasks
|
||||||
|
|
||||||
|
|
||||||
@admin.route('/')
|
@admin.route('/users')
|
||||||
@login_required
|
@login_required
|
||||||
@admin_required
|
@admin_required
|
||||||
def index():
|
def users():
|
||||||
users = User.query.all()
|
users = User.query.all()
|
||||||
users = [dict(username=u.username,
|
users = [dict(username=u.username,
|
||||||
email=u.email,
|
email=u.email,
|
||||||
@ -19,48 +19,49 @@ def index():
|
|||||||
confirmed=u.confirmed,
|
confirmed=u.confirmed,
|
||||||
id=u.id)
|
id=u.id)
|
||||||
for u in users]
|
for u in users]
|
||||||
return render_template('admin/index.html.j2',
|
return render_template('admin/users.html.j2', title='Users', users=users)
|
||||||
title='Administration tools',
|
|
||||||
users=users)
|
|
||||||
|
|
||||||
|
|
||||||
@admin.route('/user/<int:user_id>')
|
@admin.route('/users/<int:user_id>')
|
||||||
@login_required
|
@login_required
|
||||||
@admin_required
|
@admin_required
|
||||||
def user(user_id):
|
def user(user_id):
|
||||||
user = User.query.get_or_404(user_id)
|
user = User.query.get_or_404(user_id)
|
||||||
return render_template('admin/user.html.j2', title='Administration: User',
|
return render_template('admin/user.html.j2', title='User', user=user)
|
||||||
user=user)
|
|
||||||
|
|
||||||
|
|
||||||
@admin.route('/user/<int:user_id>/delete')
|
@admin.route('/users/<int:user_id>/delete')
|
||||||
@login_required
|
@login_required
|
||||||
@admin_required
|
@admin_required
|
||||||
def delete_user(user_id):
|
def delete_user(user_id):
|
||||||
profile_tasks.delete_user(user_id)
|
settings_tasks.delete_user(user_id)
|
||||||
flash('User has been deleted!')
|
flash('User has been deleted!')
|
||||||
return redirect(url_for('admin.index'))
|
return redirect(url_for('.users'))
|
||||||
|
|
||||||
|
|
||||||
@admin.route('/user/<int:user_id>/edit', methods=['GET', 'POST'])
|
@admin.route('/users/<int:user_id>/edit_general_settings',
|
||||||
|
methods=['GET', 'POST'])
|
||||||
@login_required
|
@login_required
|
||||||
@admin_required
|
@admin_required
|
||||||
def edit_user(user_id):
|
def edit_general_settings(user_id):
|
||||||
user = User.query.get_or_404(user_id)
|
user = User.query.get_or_404(user_id)
|
||||||
edit_user_form = EditUserForm(user=user)
|
form = EditGeneralSettingsAdminForm(user=user)
|
||||||
if edit_user_form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
user.email = edit_user_form.email.data
|
user.setting_dark_mode = form.dark_mode.data
|
||||||
user.username = edit_user_form.username.data
|
user.email = form.email.data
|
||||||
user.confirmed = edit_user_form.confirmed.data
|
user.username = form.username.data
|
||||||
user.role = Role.query.get(edit_user_form.role.data)
|
user.confirmed = form.confirmed.data
|
||||||
|
user.role = Role.query.get(form.role.data)
|
||||||
db.session.add(user)
|
db.session.add(user)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash('The profile has been updated.')
|
flash('The profile has been updated.')
|
||||||
return redirect(url_for('admin.edit_user', user_id=user.id))
|
return redirect(url_for('admin.edit_general_settings', user_id=user.id))
|
||||||
edit_user_form.email.data = user.email
|
form.confirmed.data = user.confirmed
|
||||||
edit_user_form.username.data = user.username
|
form.dark_mode.data = user.setting_dark_mode
|
||||||
edit_user_form.confirmed.data = user.confirmed
|
form.email.data = user.email
|
||||||
edit_user_form.role.data = user.role_id
|
form.role.data = user.role_id
|
||||||
return render_template('admin/edit_user.html.j2',
|
form.username.data = user.username
|
||||||
edit_user_form=edit_user_form,
|
return render_template('admin/edit_general_settings.html.j2',
|
||||||
title='Administration: Edit user', user=user)
|
form=form,
|
||||||
|
title='General settings',
|
||||||
|
user=user)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
from flask import current_app
|
||||||
from ..models import User
|
from ..models import User
|
||||||
from flask_wtf import FlaskForm
|
from flask_wtf import FlaskForm
|
||||||
from wtforms import (BooleanField, PasswordField, StringField, SubmitField,
|
from wtforms import (BooleanField, PasswordField, StringField, SubmitField,
|
||||||
@ -17,9 +18,9 @@ class RegistrationForm(FlaskForm):
|
|||||||
username = StringField(
|
username = StringField(
|
||||||
'Username',
|
'Username',
|
||||||
validators=[DataRequired(), Length(1, 64),
|
validators=[DataRequired(), Length(1, 64),
|
||||||
Regexp('^[A-Za-z][A-Za-z0-9_.]*$', 0,
|
Regexp(current_app.config['ALLOWED_USERNAME_REGEX'],
|
||||||
'Usernames must have only letters, numbers, dots '
|
message='Usernames must have only letters, numbers,'
|
||||||
'or underscores')]
|
' dots or underscores')]
|
||||||
)
|
)
|
||||||
password = PasswordField(
|
password = PasswordField(
|
||||||
'Password',
|
'Password',
|
||||||
|
@ -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):
|
||||||
|
@ -51,8 +51,7 @@ def corpus(corpus_id):
|
|||||||
title=corpus_file.title,
|
title=corpus_file.title,
|
||||||
publishing_year=corpus_file.publishing_year,
|
publishing_year=corpus_file.publishing_year,
|
||||||
corpus_id=corpus.id,
|
corpus_id=corpus.id,
|
||||||
id=corpus_file.id
|
id=corpus_file.id)
|
||||||
)
|
|
||||||
for corpus_file in corpus.files]
|
for corpus_file in corpus.files]
|
||||||
return render_template('corpora/corpus.html.j2',
|
return render_template('corpora/corpus.html.j2',
|
||||||
corpus=corpus,
|
corpus=corpus,
|
||||||
@ -78,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,52 +0,0 @@
|
|||||||
from flask_wtf import FlaskForm
|
|
||||||
from wtforms import (BooleanField, PasswordField, SelectField, StringField,
|
|
||||||
SubmitField, ValidationError)
|
|
||||||
from wtforms.validators import DataRequired, Email, EqualTo
|
|
||||||
|
|
||||||
|
|
||||||
class EditEmailForm(FlaskForm):
|
|
||||||
email = StringField('New email', validators=[Email(), DataRequired()])
|
|
||||||
save_email = SubmitField('Save email')
|
|
||||||
|
|
||||||
|
|
||||||
class EditGeneralSettingsForm(FlaskForm):
|
|
||||||
dark_mode = BooleanField('Dark mode')
|
|
||||||
job_status_mail_notifications = SelectField(
|
|
||||||
'Job status mail notifications',
|
|
||||||
choices=[('', 'Choose your option'),
|
|
||||||
('all', 'Notify on all status changes'),
|
|
||||||
('end', 'Notify only when a job ended'),
|
|
||||||
('none', 'No status update notifications')],
|
|
||||||
validators=[DataRequired()])
|
|
||||||
job_status_site_notifications = SelectField(
|
|
||||||
'Job status site notifications',
|
|
||||||
choices=[('', 'Choose your option'),
|
|
||||||
('all', 'Notify on all status changes'),
|
|
||||||
('end', 'Notify only when a job ended'),
|
|
||||||
('none', 'No status update notifications')],
|
|
||||||
validators=[DataRequired()])
|
|
||||||
save_settings = SubmitField('Save settings')
|
|
||||||
|
|
||||||
|
|
||||||
class EditPasswordForm(FlaskForm):
|
|
||||||
current_password = PasswordField('Current password',
|
|
||||||
validators=[DataRequired()])
|
|
||||||
password = PasswordField(
|
|
||||||
'New password',
|
|
||||||
validators=[DataRequired(), EqualTo('password_confirmation',
|
|
||||||
message='Passwords must match.')]
|
|
||||||
)
|
|
||||||
password_confirmation = PasswordField(
|
|
||||||
'Password confirmation',
|
|
||||||
validators=[DataRequired(),
|
|
||||||
EqualTo('password', message='Passwords must match.')]
|
|
||||||
)
|
|
||||||
save_password = SubmitField('Save password')
|
|
||||||
|
|
||||||
def __init__(self, user, *args, **kwargs):
|
|
||||||
super(EditPasswordForm, self).__init__(*args, **kwargs)
|
|
||||||
self.user = user
|
|
||||||
|
|
||||||
def validate_current_password(self, field):
|
|
||||||
if not self.user.verify_password(field.data):
|
|
||||||
raise ValidationError('Invalid password.')
|
|
@ -1,69 +0,0 @@
|
|||||||
from flask import flash, redirect, render_template, url_for
|
|
||||||
from flask_login import current_user, login_required, logout_user
|
|
||||||
from . import profile
|
|
||||||
from . import tasks
|
|
||||||
from .forms import EditEmailForm, EditGeneralSettingsForm, EditPasswordForm
|
|
||||||
from .. import db
|
|
||||||
|
|
||||||
|
|
||||||
@profile.route('/settings', methods=['GET', 'POST'])
|
|
||||||
@login_required
|
|
||||||
def settings():
|
|
||||||
edit_email_form = EditEmailForm(prefix='edit-email-form')
|
|
||||||
edit_general_settings_form = EditGeneralSettingsForm(
|
|
||||||
prefix='edit-general-settings-form')
|
|
||||||
edit_password_form = EditPasswordForm(prefix='edit-password-form',
|
|
||||||
user=current_user)
|
|
||||||
# Check if edit_email_form is submitted and valid
|
|
||||||
if (edit_email_form.save_email.data
|
|
||||||
and edit_email_form.validate_on_submit()):
|
|
||||||
db.session.add(current_user)
|
|
||||||
db.session.commit()
|
|
||||||
flash('Your email address has been updated.')
|
|
||||||
return redirect(url_for('profile.settings'))
|
|
||||||
# Check if edit_settings_form is submitted and valid
|
|
||||||
if (edit_general_settings_form.save_settings.data
|
|
||||||
and edit_general_settings_form.validate_on_submit()):
|
|
||||||
current_user.setting_dark_mode = \
|
|
||||||
edit_general_settings_form.dark_mode.data
|
|
||||||
current_user.setting_job_status_mail_notifications = \
|
|
||||||
edit_general_settings_form.job_status_mail_notifications.data
|
|
||||||
current_user.setting_job_status_site_notifications = \
|
|
||||||
edit_general_settings_form.job_status_site_notifications.data
|
|
||||||
db.session.add(current_user)
|
|
||||||
db.session.commit()
|
|
||||||
flash('Your settings have been updated.')
|
|
||||||
return redirect(url_for('profile.settings'))
|
|
||||||
# Check if edit_password_form is submitted and valid
|
|
||||||
if (edit_password_form.save_password.data
|
|
||||||
and edit_password_form.validate_on_submit()):
|
|
||||||
current_user.password = edit_password_form.password.data
|
|
||||||
db.session.add(current_user)
|
|
||||||
db.session.commit()
|
|
||||||
flash('Your password has been updated.')
|
|
||||||
return redirect(url_for('profile.settings'))
|
|
||||||
# If no form is submitted or valid, fill out fields with current values
|
|
||||||
edit_email_form.email.data = current_user.email
|
|
||||||
edit_general_settings_form.dark_mode.data = current_user.setting_dark_mode
|
|
||||||
edit_general_settings_form.job_status_site_notifications.data = \
|
|
||||||
current_user.setting_job_status_site_notifications
|
|
||||||
edit_general_settings_form.job_status_mail_notifications.data = \
|
|
||||||
current_user.setting_job_status_mail_notifications
|
|
||||||
return render_template(
|
|
||||||
'profile/settings.html.j2',
|
|
||||||
edit_email_form=edit_email_form,
|
|
||||||
edit_password_form=edit_password_form,
|
|
||||||
edit_general_settings_form=edit_general_settings_form,
|
|
||||||
title='Settings')
|
|
||||||
|
|
||||||
|
|
||||||
@profile.route('/delete', methods=['GET', 'POST'])
|
|
||||||
@login_required
|
|
||||||
def delete():
|
|
||||||
"""
|
|
||||||
View to delete yourslef and all associated data.
|
|
||||||
"""
|
|
||||||
tasks.delete_user(current_user.id)
|
|
||||||
logout_user()
|
|
||||||
flash('Your account has been deleted!')
|
|
||||||
return redirect(url_for('main.index'))
|
|
@ -1,5 +1,5 @@
|
|||||||
from flask import Blueprint
|
from flask import Blueprint
|
||||||
|
|
||||||
|
|
||||||
profile = Blueprint('profile', __name__)
|
settings = Blueprint('settings', __name__)
|
||||||
from . import views # noqa
|
from . import views # noqa
|
78
web/app/settings/forms.py
Normal file
78
web/app/settings/forms.py
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
from flask import current_app
|
||||||
|
from flask_login import current_user
|
||||||
|
from flask_wtf import FlaskForm
|
||||||
|
from wtforms import (BooleanField, PasswordField, SelectField, StringField,
|
||||||
|
SubmitField, ValidationError)
|
||||||
|
from wtforms.validators import DataRequired, Email, EqualTo, Length, Regexp
|
||||||
|
from ..models import User
|
||||||
|
|
||||||
|
|
||||||
|
class ChangePasswordForm(FlaskForm):
|
||||||
|
password = PasswordField('Old password', validators=[DataRequired()])
|
||||||
|
new_password = PasswordField(
|
||||||
|
'New password',
|
||||||
|
validators=[DataRequired(), EqualTo('password_confirmation',
|
||||||
|
message='Passwords must match.')]
|
||||||
|
)
|
||||||
|
new_password2 = PasswordField(
|
||||||
|
'Confirm new password', validators=[DataRequired()])
|
||||||
|
submit = SubmitField('Change password')
|
||||||
|
|
||||||
|
def __init__(self, user=current_user, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
self.user = user
|
||||||
|
|
||||||
|
def validate_current_password(self, field):
|
||||||
|
if not self.user.verify_password(field.data):
|
||||||
|
raise ValidationError('Invalid password.')
|
||||||
|
|
||||||
|
|
||||||
|
class EditGeneralSettingsForm(FlaskForm):
|
||||||
|
dark_mode = BooleanField('Dark mode')
|
||||||
|
email = StringField('E-Mail',
|
||||||
|
validators=[DataRequired(), Length(1, 254), Email()])
|
||||||
|
username = StringField(
|
||||||
|
'Benutzername',
|
||||||
|
validators=[DataRequired(),
|
||||||
|
Length(1, 64),
|
||||||
|
Regexp(current_app.config['ALLOWED_USERNAME_REGEX'],
|
||||||
|
message='Usernames must have only letters, numbers,'
|
||||||
|
' dots or underscores')]
|
||||||
|
)
|
||||||
|
submit = SubmitField('Submit')
|
||||||
|
|
||||||
|
def __init__(self, user=current_user, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
self.user = user
|
||||||
|
|
||||||
|
def validate_email(self, field):
|
||||||
|
if (field.data != self.user.email
|
||||||
|
and User.query.filter_by(email=field.data).first()):
|
||||||
|
raise ValidationError('Email already registered.')
|
||||||
|
|
||||||
|
def validate_username(self, field):
|
||||||
|
if (field.data != self.user.username
|
||||||
|
and User.query.filter_by(username=field.data).first()):
|
||||||
|
raise ValidationError('Username already in use.')
|
||||||
|
|
||||||
|
|
||||||
|
class EditNotificationSettingsForm(FlaskForm):
|
||||||
|
job_status_mail_notifications = SelectField(
|
||||||
|
'Job status mail notifications',
|
||||||
|
choices=[('', 'Choose your option'),
|
||||||
|
('all', 'Notify on all status changes'),
|
||||||
|
('end', 'Notify only when a job ended'),
|
||||||
|
('none', 'No status update notifications')],
|
||||||
|
validators=[DataRequired()])
|
||||||
|
job_status_site_notifications = SelectField(
|
||||||
|
'Job status site notifications',
|
||||||
|
choices=[('', 'Choose your option'),
|
||||||
|
('all', 'Notify on all status changes'),
|
||||||
|
('end', 'Notify only when a job ended'),
|
||||||
|
('none', 'No status update notifications')],
|
||||||
|
validators=[DataRequired()])
|
||||||
|
submit = SubmitField('Save settings')
|
||||||
|
|
||||||
|
def __init__(self, user=current_user, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
self.user = user
|
80
web/app/settings/views.py
Normal file
80
web/app/settings/views.py
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
from flask import current_app, flash, redirect, render_template, url_for
|
||||||
|
from flask_login import current_user, login_required, logout_user
|
||||||
|
from . import settings, tasks
|
||||||
|
from .forms import (ChangePasswordForm, EditGeneralSettingsForm,
|
||||||
|
EditNotificationSettingsForm)
|
||||||
|
from .. import db
|
||||||
|
from ..decorators import admin_required
|
||||||
|
from ..models import Role, User
|
||||||
|
import os
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
|
@settings.route('/')
|
||||||
|
@login_required
|
||||||
|
def index():
|
||||||
|
return redirect(url_for('.edit_general_settings'))
|
||||||
|
|
||||||
|
|
||||||
|
@settings.route('/change_password', methods=['GET', 'POST'])
|
||||||
|
@login_required
|
||||||
|
def change_password():
|
||||||
|
form = ChangePasswordForm()
|
||||||
|
if form.validate_on_submit():
|
||||||
|
current_user.password = form.new_password.data
|
||||||
|
db.session.commit()
|
||||||
|
flash('Your password has been updated.')
|
||||||
|
return redirect(url_for('.change_password'))
|
||||||
|
return render_template('settings/change_password.html.j2',
|
||||||
|
form=form,
|
||||||
|
title='Change password')
|
||||||
|
|
||||||
|
|
||||||
|
@settings.route('/edit_general_settings', methods=['GET', 'POST'])
|
||||||
|
@login_required
|
||||||
|
def edit_general_settings():
|
||||||
|
form = EditGeneralSettingsForm()
|
||||||
|
if form.validate_on_submit():
|
||||||
|
current_user.email = form.email.data
|
||||||
|
current_user.setting_dark_mode = form.dark_mode.data
|
||||||
|
current_user.username = form.username.data
|
||||||
|
db.session.commit()
|
||||||
|
flash('Your changes have been saved.')
|
||||||
|
form.dark_mode.data = current_user.setting_dark_mode
|
||||||
|
form.email.data = current_user.email
|
||||||
|
form.username.data = current_user.username
|
||||||
|
return render_template('settings/edit_general_settings.html.j2',
|
||||||
|
form=form,
|
||||||
|
title='General settings')
|
||||||
|
|
||||||
|
|
||||||
|
@settings.route('/edit_notification_settings', methods=['GET', 'POST'])
|
||||||
|
@login_required
|
||||||
|
def edit_notification_settings():
|
||||||
|
form = EditNotificationSettingsForm()
|
||||||
|
if form.validate_on_submit():
|
||||||
|
current_user.setting_job_status_mail_notifications = \
|
||||||
|
form.job_status_mail_notifications.data
|
||||||
|
current_user.setting_job_status_site_notifications = \
|
||||||
|
form.job_status_site_notifications.data
|
||||||
|
db.session.commit()
|
||||||
|
flash('Your changes have been saved.')
|
||||||
|
form.job_status_mail_notifications.data = \
|
||||||
|
current_user.setting_job_status_mail_notifications
|
||||||
|
form.job_status_site_notifications.data = \
|
||||||
|
current_user.setting_job_status_site_notifications
|
||||||
|
return render_template('settings/edit_notification_settings.html.j2',
|
||||||
|
form=form,
|
||||||
|
title='Notification settings')
|
||||||
|
|
||||||
|
|
||||||
|
@settings.route('/delete')
|
||||||
|
@login_required
|
||||||
|
def delete():
|
||||||
|
"""
|
||||||
|
View to delete current_user and all associated data.
|
||||||
|
"""
|
||||||
|
tasks.delete_user(current_user.id)
|
||||||
|
logout_user()
|
||||||
|
flash('Your account has been deleted!')
|
||||||
|
return redirect(url_for('main.index'))
|
@ -1 +0,0 @@
|
|||||||
@font-face{font-family:'Material Icons';font-style:normal;font-weight:400;src:url(../fonts/material_design_icons/MaterialIcons-Regular.eot);src:local('Material Icons'),local('MaterialIcons-Regular'),url(../fonts/material_design_icons/MaterialIcons-Regular.ttf) format('truetype'),url(../fonts/material_design_icons/MaterialIconsOutlined-Regular.otf) format('opentype'),url(../fonts/material_design_icons/MaterialIconsRound-Regular.otf) format('opentype'),url(../fonts/material_design_icons/MaterialIconsSharp-Regular.otf) format('opentype'),url(../fonts/material_design_icons/MaterialIconsTwoTone-Regular.otf) format('opentype')}.material-icons{font-family:'Material Icons';font-weight:400;font-style:normal;font-size:24px;display:inline-block;line-height:1;text-transform:none;letter-spacing:normal;word-wrap:normal;white-space:nowrap;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:'liga'}
|
|
12
web/app/static/css/materialize.sidenav-fixed.css
Normal file
12
web/app/static/css/materialize.sidenav-fixed.css
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/*
|
||||||
|
* The sidenav-fixed class is used which causes the sidenav to be fixed and open
|
||||||
|
* on large screens and hides to the regular functionality on smaller screens.
|
||||||
|
* In order to prevent the sidenav to overlap the content, the content (in our
|
||||||
|
* case header, main and footer) gets an offset equal to the width of the
|
||||||
|
* sidenav.
|
||||||
|
*/
|
||||||
|
@media only screen and (min-width : 993px) {
|
||||||
|
header, main, footer {padding-left: 300px;}
|
||||||
|
.modal:not(.bottom-sheet) {left: 300px;}
|
||||||
|
.navbar-fixed > nav {width: calc(100% - 300px)}
|
||||||
|
}
|
13
web/app/static/css/materialize.sticky-footer.css
Normal file
13
web/app/static/css/materialize.sticky-footer.css
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* Force the footer to always stay on the bottom of the page regardless of how
|
||||||
|
* little content is on the page.
|
||||||
|
*/
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
min-height: 100vh;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
flex: 1 0 auto;
|
||||||
|
}
|
@ -1,19 +1,7 @@
|
|||||||
/*
|
.tab .material-icons {
|
||||||
* ### Start sticky footer ###
|
line-height: inherit;
|
||||||
* Force the footer to always stay on the bottom of the page regardless of how
|
|
||||||
* little content is on the page.
|
|
||||||
*/
|
|
||||||
body {
|
|
||||||
display: flex;
|
|
||||||
min-height: 100vh;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
|
||||||
flex: 1 0 auto;
|
|
||||||
}
|
|
||||||
/* ### End sticky footer ### */
|
|
||||||
|
|
||||||
/* add custom bold class */
|
/* add custom bold class */
|
||||||
.bold {
|
.bold {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -4,12 +4,8 @@
|
|||||||
*/
|
*/
|
||||||
var nopaque = {};
|
var nopaque = {};
|
||||||
|
|
||||||
// nopaque ressources
|
|
||||||
nopaque.socket = undefined;
|
|
||||||
|
|
||||||
// User data
|
// User data
|
||||||
nopaque.user = {};
|
nopaque.user = {};
|
||||||
nopaque.user.isAuthenticated = undefined;
|
|
||||||
nopaque.user.settings = {};
|
nopaque.user.settings = {};
|
||||||
nopaque.user.settings.darkMode = undefined;
|
nopaque.user.settings.darkMode = undefined;
|
||||||
nopaque.corporaSubscribers = [];
|
nopaque.corporaSubscribers = [];
|
||||||
@ -25,14 +21,10 @@ nopaque.foreignCorporaSubscribers = [];
|
|||||||
nopaque.foreignJobsSubscribers = [];
|
nopaque.foreignJobsSubscribers = [];
|
||||||
nopaque.foreignQueryResultsSubscribers = [];
|
nopaque.foreignQueryResultsSubscribers = [];
|
||||||
|
|
||||||
nopaque.flashedMessages = undefined;
|
|
||||||
|
|
||||||
// nopaque functions
|
// nopaque functions
|
||||||
nopaque.socket = {};
|
nopaque.socket = io({transports: ['websocket']});
|
||||||
nopaque.socket.init = function() {
|
// Add event handlers
|
||||||
nopaque.socket = io({transports: ['websocket']});
|
nopaque.socket.on("user_data_stream_init", function(msg) {
|
||||||
// Add event handlers
|
|
||||||
nopaque.socket.on("user_data_stream_init", function(msg) {
|
|
||||||
nopaque.user = JSON.parse(msg);
|
nopaque.user = JSON.parse(msg);
|
||||||
for (let subscriber of nopaque.corporaSubscribers) {
|
for (let subscriber of nopaque.corporaSubscribers) {
|
||||||
subscriber._init(nopaque.user.corpora);
|
subscriber._init(nopaque.user.corpora);
|
||||||
@ -43,9 +35,9 @@ nopaque.socket.init = function() {
|
|||||||
for (let subscriber of nopaque.queryResultsSubscribers) {
|
for (let subscriber of nopaque.queryResultsSubscribers) {
|
||||||
subscriber._init(nopaque.user.query_results);
|
subscriber._init(nopaque.user.query_results);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
nopaque.socket.on("user_data_stream_update", function(msg) {
|
nopaque.socket.on("user_data_stream_update", function(msg) {
|
||||||
var patch;
|
var patch;
|
||||||
|
|
||||||
patch = JSON.parse(msg);
|
patch = JSON.parse(msg);
|
||||||
@ -72,9 +64,9 @@ nopaque.socket.init = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
nopaque.socket.on("foreign_user_data_stream_init", function(msg) {
|
nopaque.socket.on("foreign_user_data_stream_init", function(msg) {
|
||||||
nopaque.foreignUser = JSON.parse(msg);
|
nopaque.foreignUser = JSON.parse(msg);
|
||||||
for (let subscriber of nopaque.foreignCorporaSubscribers) {
|
for (let subscriber of nopaque.foreignCorporaSubscribers) {
|
||||||
subscriber._init(nopaque.foreignUser.corpora);
|
subscriber._init(nopaque.foreignUser.corpora);
|
||||||
@ -85,9 +77,9 @@ nopaque.socket.init = function() {
|
|||||||
for (let subscriber of nopaque.foreignQueryResultsSubscribers) {
|
for (let subscriber of nopaque.foreignQueryResultsSubscribers) {
|
||||||
subscriber._init(nopaque.foreignUser.query_results);
|
subscriber._init(nopaque.foreignUser.query_results);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
nopaque.socket.on("foreign_user_data_stream_update", function(msg) {
|
nopaque.socket.on("foreign_user_data_stream_update", function(msg) {
|
||||||
var patch;
|
var patch;
|
||||||
|
|
||||||
patch = JSON.parse(msg);
|
patch = JSON.parse(msg);
|
||||||
@ -98,8 +90,7 @@ nopaque.socket.init = function() {
|
|||||||
for (let subscriber of nopaque.foreignCorporaSubscribers) {subscriber._update(corpora_patch);}
|
for (let subscriber of nopaque.foreignCorporaSubscribers) {subscriber._update(corpora_patch);}
|
||||||
for (let subscriber of nopaque.foreignJobsSubscribers) {subscriber._update(jobs_patch);}
|
for (let subscriber of nopaque.foreignJobsSubscribers) {subscriber._update(jobs_patch);}
|
||||||
for (let subscriber of nopaque.foreignQueryResultsSubscribers) {subscriber._update(query_results_patch);}
|
for (let subscriber of nopaque.foreignQueryResultsSubscribers) {subscriber._update(query_results_patch);}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
nopaque.Forms = {};
|
nopaque.Forms = {};
|
||||||
nopaque.Forms.init = function() {
|
nopaque.Forms.init = function() {
|
||||||
@ -173,32 +164,10 @@ nopaque.Forms.init = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nopaque.Navigation = {};
|
|
||||||
nopaque.Navigation.init = function() {
|
|
||||||
/* ### Initialize sidenav-main ### */
|
|
||||||
for (let entry of document.querySelectorAll("#sidenav-main a")) {
|
|
||||||
if (entry.href === window.location.href) {
|
|
||||||
entry.parentNode.classList.add("active");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
nopaque.flash = function(message, category) {
|
||||||
nopaque.flash = function() {
|
let toast;
|
||||||
var classes, toast, toastActionElement;
|
let toastActionElement;
|
||||||
|
|
||||||
switch (arguments.length) {
|
|
||||||
case 1:
|
|
||||||
category = "message";
|
|
||||||
message = arguments[0];
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
message = arguments[0];
|
|
||||||
category = arguments[1];
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
console.error("Usage: nopaque.flash(message) or nopaque.flash(message, category)")
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (category) {
|
switch (category) {
|
||||||
case "corpus":
|
case "corpus":
|
||||||
@ -219,27 +188,5 @@ nopaque.flash = function() {
|
|||||||
<i class="material-icons">close</i>
|
<i class="material-icons">close</i>
|
||||||
</button>`});
|
</button>`});
|
||||||
toastActionElement = toast.el.querySelector('.toast-action[data-action="close"]');
|
toastActionElement = toast.el.querySelector('.toast-action[data-action="close"]');
|
||||||
if (toastActionElement) {
|
toastActionElement.addEventListener('click', () => {toast.dismiss();});
|
||||||
toastActionElement.addEventListener('click', function() {
|
|
||||||
toast.dismiss();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
|
||||||
// Disable all option elements with no value
|
|
||||||
for (let optionElement of document.querySelectorAll('option[value=""]')) {
|
|
||||||
optionElement.disabled = true;
|
|
||||||
}
|
|
||||||
M.AutoInit();
|
|
||||||
M.CharacterCounter.init(document.querySelectorAll('input[data-length][type="text"]'));
|
|
||||||
M.Dropdown.init(document.querySelectorAll('#nav-notifications, #nav-account'),
|
|
||||||
{alignment: 'right', constrainWidth: false, coverTrigger: false});
|
|
||||||
nopaque.Forms.init();
|
|
||||||
nopaque.Navigation.init();
|
|
||||||
while (nopaque.flashedMessages.length) {
|
|
||||||
flashedMessage = nopaque.flashedMessages.shift();
|
|
||||||
nopaque.flash(flashedMessage[1], flashedMessage[0]);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
@ -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`,
|
||||||
@ -131,11 +130,11 @@ RessourceList.dataMappers = {
|
|||||||
confirmed: user.confirmed,
|
confirmed: user.confirmed,
|
||||||
email: user.email,
|
email: user.email,
|
||||||
id: user.id,
|
id: user.id,
|
||||||
link: `user/${user.id}`,
|
link: `users/${user.id}`,
|
||||||
role_id: user.role_id,
|
role_id: user.role_id,
|
||||||
username: user.username,
|
username: user.username,
|
||||||
username2: user.username,
|
username2: user.username,
|
||||||
"delete-link": `/admin/user/${user.id}/delete`,
|
"delete-link": `/admin/users/${user.id}/delete`,
|
||||||
"delete-modal": `delete-user-${user.id}-modal`,
|
"delete-modal": `delete-user-${user.id}-modal`,
|
||||||
"delete-modal-trigger": `delete-user-${user.id}-modal`,
|
"delete-modal-trigger": `delete-user-${user.id}-modal`,
|
||||||
}),
|
}),
|
||||||
@ -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"},
|
||||||
|
15
web/app/templates/_colors.html.j2
Normal file
15
web/app/templates/_colors.html.j2
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{% set colors = {'primary': '#00426f',
|
||||||
|
'secondary': '#1A5C89',
|
||||||
|
'footer': '#b1b3b4',
|
||||||
|
'corpus_analysis': '#aa9cc9',
|
||||||
|
'corpus_analysis_darken': '#6b3f89',
|
||||||
|
'corpus_analysis_lighten': '#ebe8f6',
|
||||||
|
'file_setup': '#d5dc95',
|
||||||
|
'file_setup_darken': '#a1b300',
|
||||||
|
'file_setup_lighten': '#f2f3e1',
|
||||||
|
'nlp': '#98acd2',
|
||||||
|
'nlp_darken': '#0064a3',
|
||||||
|
'nlp_lighten': '#e5e8f5',
|
||||||
|
'ocr': '#a9d8c8',
|
||||||
|
'ocr_darken': '#00a58b',
|
||||||
|
'ocr_lighten': '#e7f4f1'} %}
|
70
web/app/templates/admin/edit_general_settings.html.j2
Normal file
70
web/app/templates/admin/edit_general_settings.html.j2
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
{% extends "nopaque.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">Edit user</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
|
<h2>{{ user.username }}</h2>
|
||||||
|
<p>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 justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
|
||||||
|
<a class="waves-effect waves-light btn" href="{{ url_for('.user', user_id=user.id) }}"><i class="material-icons left">arrow_back</i>Back to user administration</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m8">
|
||||||
|
<div class="card">
|
||||||
|
<form method="POST">
|
||||||
|
<div class="card-content">
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
{{ wtf.render_field(form.username, data_length='64', material_icon='account_circle') }}
|
||||||
|
{{ wtf.render_field(form.email, class_='validate', material_icon='email', type='email') }}
|
||||||
|
{{ wtf.render_field(form.role, material_icon='swap_vert') }}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12"><p> </p></div>
|
||||||
|
<div class="col s1">
|
||||||
|
<p><i class="material-icons">brightness_3</i></p>
|
||||||
|
</div>
|
||||||
|
<div class="col s8">
|
||||||
|
<p>{{ form.dark_mode.label.text }}</p>
|
||||||
|
<p class="light">Enable dark mode to ease your eyes.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col s3 right-align">
|
||||||
|
<div class="switch">
|
||||||
|
<label>
|
||||||
|
{{ form.dark_mode() }}
|
||||||
|
<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 s1">
|
||||||
|
<p><i class="material-icons">check</i></p>
|
||||||
|
</div>
|
||||||
|
<div class="col s8">
|
||||||
|
<p>{{ form.confirmed.label.text }}</p>
|
||||||
|
<p class="light">Change confirmation status manually.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col s3 right-align">
|
||||||
|
<div class="switch">
|
||||||
|
<label>
|
||||||
|
{{ form.confirmed() }}
|
||||||
|
<span class="lever"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-action right-align">
|
||||||
|
{{ wtf.render_field(form.submit, material_icon='send') }}
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
@ -1,27 +0,0 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
|
||||||
<div class="col s12 m4">
|
|
||||||
<h3 id="title">{{ user.username }}</h3>
|
|
||||||
<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 justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
|
|
||||||
<a class="waves-effect waves-light btn" href="{{ url_for('admin.user', user_id=user.id) }}"><i class="material-icons left">arrow_back</i>Back to user administration</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col s12 m8">
|
|
||||||
<div class="card">
|
|
||||||
<form method="POST">
|
|
||||||
<div class="card-content">
|
|
||||||
{{ edit_user_form.hidden_tag() }}
|
|
||||||
{{ M.render_field(edit_user_form.username, data_length='64', material_icon='account_circle') }}
|
|
||||||
{{ M.render_field(edit_user_form.email, class_='validate', material_icon='email', type='email') }}
|
|
||||||
{{ M.render_field(edit_user_form.role, material_icon='swap_vert') }}
|
|
||||||
{{ M.render_field(edit_user_form.confirmed, material_icon='check') }}
|
|
||||||
</div>
|
|
||||||
<div class="card-action right-align">
|
|
||||||
{{ M.render_field(edit_user_form.submit, material_icon='send') }}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
@ -1,42 +0,0 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
|
||||||
|
|
||||||
{% set full_width = True %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
|
||||||
<div class="col s12">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-content" id="users">
|
|
||||||
<span class="card-title">User list</span>
|
|
||||||
<div class="input-field">
|
|
||||||
<i class="material-icons prefix">search</i>
|
|
||||||
<input id="search-user" class="search" type="search"></input>
|
|
||||||
<label for="search-user">Search user</label>
|
|
||||||
</div>
|
|
||||||
<ul class="pagination paginationTop"></ul>
|
|
||||||
<table class="highlight responsive-table">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="sort" data-sort="username">Username</th>
|
|
||||||
<th class="sort" data-sort="email">Email</th>
|
|
||||||
<th class="sort" data-sort="role_id">Role</th>
|
|
||||||
<th class="sort" data-sort="confirmed">Confirmed Status</th>
|
|
||||||
<th class="sort" data-sort="id">Id</th>
|
|
||||||
<th>{# Actions #}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="list">
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<ul class="pagination paginationBottom"></ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script type="module">
|
|
||||||
import {RessourceList} from '../../static/js/nopaque.lists.js';
|
|
||||||
let userList = new RessourceList('users', null, "User", RessourceList.options.extended);
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
userList._add({{ users|tojson|safe }});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
|
@ -1,13 +1,19 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12 m4">
|
<div class="container">
|
||||||
<h3 id="title">{{ user.username }}</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 justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
|
<div class="col s12">
|
||||||
<a class="waves-effect waves-light btn" href="{{ url_for('admin.index') }}"><i class="material-icons left">arrow_back</i>Back to admin board</a>
|
<h1 id="title">{{ title }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m4">
|
||||||
|
<h2>{{ user.username }}</h2>
|
||||||
|
<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 justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
|
||||||
|
<a class="waves-effect waves-light btn" href="{{ url_for('.users') }}"><i class="material-icons left">arrow_back</i>Back to Users</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m8">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">User information</span>
|
<span class="card-title">User information</span>
|
||||||
@ -24,11 +30,11 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
<a href="{{ url_for('admin.edit_user', user_id=user.id) }}" class="waves-effect waves-light btn"><i class="material-icons left">edit</i>Edit</a>
|
<a href="{{ url_for('.edit_general_settings', user_id=user.id) }}" class="waves-effect waves-light btn"><i class="material-icons left">edit</i>Edit</a>
|
||||||
<a data-target="delete-user-modal" class="waves-effect waves-light btn red modal-trigger"><i class="material-icons left">delete</i>Delete</a>
|
<a data-target="delete-user-modal" class="waves-effect waves-light btn red modal-trigger"><i class="material-icons left">delete</i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 l6">
|
<div class="col s12 l6">
|
||||||
<h3>Corpora</h3>
|
<h3>Corpora</h3>
|
||||||
@ -92,21 +98,23 @@
|
|||||||
<!-- Modals -->
|
<!-- Modals -->
|
||||||
<div id="delete-user-modal" class="modal">
|
<div id="delete-user-modal" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>Confirm user deletion</h4>
|
<h3>Delete user</h3>
|
||||||
<p>Do you really want to delete the user {{ user.username }}? All associated data will be permanently deleted!</p>
|
<p>Do you really want to delete the user {{ user.username }}? All associated data will be permanently deleted!</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<a href="#!" class="modal-close waves-effect waves-light btn">Cancel</a>
|
<a href="#!" class="modal-close waves-effect waves-light btn">Cancel</a>
|
||||||
<a href="{{ url_for('admin.delete_user', user_id=user.id) }}" class="modal-close waves-effect waves-light btn red"><i class="material-icons left">delete</i>Delete</a>
|
<a href="{{ url_for('.delete_user', user_id=user.id) }}" class="modal-close waves-effect waves-light btn red"><i class="material-icons left">delete</i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="module">
|
|
||||||
import {RessourceList} from '../../static/js/nopaque.lists.js';
|
|
||||||
let corpusList = new RessourceList("corpora", nopaque.foreignCorporaSubscribers, "Corpus");
|
|
||||||
let jobList = new RessourceList("jobs", nopaque.foreignJobsSubscribers, "Job");
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
|
||||||
nopaque.socket.emit("foreign_user_data_stream_init", {{ user.id }});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{ super() }}
|
||||||
|
<script type="module">
|
||||||
|
import {RessourceList} from '{{ url_for('static', filename='js/nopaque.lists.js') }}';
|
||||||
|
let corpusList = new RessourceList("corpora", nopaque.foreignCorporaSubscribers, "Corpus");
|
||||||
|
let jobList = new RessourceList("jobs", nopaque.foreignJobsSubscribers, "Job");
|
||||||
|
nopaque.socket.emit("foreign_user_data_stream_init", {{ user.id }});
|
||||||
|
</script>
|
||||||
|
{% endblock scripts %}
|
||||||
|
48
web/app/templates/admin/users.html.j2
Normal file
48
web/app/templates/admin/users.html.j2
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{% extends "nopaque.html.j2" %}
|
||||||
|
|
||||||
|
{% block page_content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12">
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-content" id="users">
|
||||||
|
<div class="input-field">
|
||||||
|
<i class="material-icons prefix">search</i>
|
||||||
|
<input id="search-user" class="search" type="text"></input>
|
||||||
|
<label for="search-user">Search user</label>
|
||||||
|
</div>
|
||||||
|
<ul class="pagination paginationTop"></ul>
|
||||||
|
<table class="highlight responsive-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="sort" data-sort="username">Username</th>
|
||||||
|
<th class="sort" data-sort="email">Email</th>
|
||||||
|
<th class="sort" data-sort="role_id">Role</th>
|
||||||
|
<th class="sort" data-sort="confirmed">Confirmed Status</th>
|
||||||
|
<th class="sort" data-sort="id">Id</th>
|
||||||
|
<th>{# Actions #}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody class="list">
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<ul class="pagination paginationBottom"></ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{ super() }}
|
||||||
|
<script type="module">
|
||||||
|
import {RessourceList} from '{{ url_for('static', filename='js/nopaque.lists.js') }}';
|
||||||
|
let userList = new RessourceList('users', null, "User", RessourceList.options.extended);
|
||||||
|
userList._add({{ users|tojson}});
|
||||||
|
</script>
|
||||||
|
{% endblock scripts %}
|
@ -1,8 +1,8 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
{% set headline = ' ' %}
|
{% block styles %}
|
||||||
|
{{ super() }}
|
||||||
{% block page_content %}
|
|
||||||
<style>
|
<style>
|
||||||
main {
|
main {
|
||||||
background-image: url("{{ url_for('static', filename='images/parallax_lq/04_german_text_book_paper.jpg') }}");
|
background-image: url("{{ url_for('static', filename='images/parallax_lq/04_german_text_book_paper.jpg') }}");
|
||||||
@ -10,39 +10,45 @@
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
{% endblock styles %}
|
||||||
|
|
||||||
<div class="col s12 m4">
|
{% block page_content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12 m4">
|
||||||
<div class="card medium">
|
<div class="card medium">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<h2>Log in</h2>
|
<h1 id="title">{{ title }}</h1>
|
||||||
<p>Want to boost your research and get going? nopaque is free and no download is needed. Register now!</p>
|
<p>Want to boost your research and get going? nopaque is free and no download is needed. Register now!</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
<a class="btn" href="{{ url_for('auth.register') }}"><i class="material-icons left">person_add</i>Register</a>
|
<a class="btn" href="{{ url_for('.register') }}"><i class="material-icons left">person_add</i>Register</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m8">
|
||||||
<div class="card medium">
|
<div class="card medium">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
{{ login_form.hidden_tag() }}
|
{{ login_form.hidden_tag() }}
|
||||||
{{ M.render_field(login_form.user, material_icon='person') }}
|
{{ wtf.render_field(login_form.user, material_icon='person') }}
|
||||||
{{ M.render_field(login_form.password, material_icon='vpn_key') }}
|
{{ wtf.render_field(login_form.password, material_icon='vpn_key') }}
|
||||||
<div class="row" style="margin-bottom: 0;">
|
<div class="row" style="margin-bottom: 0;">
|
||||||
<div class="col s6 left-align">
|
<div class="col s6 left-align">
|
||||||
<a href="{{ url_for('auth.reset_password_request') }}">Forgot your password?</a>
|
<a href="{{ url_for('.reset_password_request') }}">Forgot your password?</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s6 right-align">
|
<div class="col s6 right-align">
|
||||||
{{ M.render_field(login_form.remember_me) }}
|
{{ wtf.render_field(login_form.remember_me) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(login_form.submit, material_icon='send') }}
|
{{ wtf.render_field(login_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
{% set headline = ' ' %}
|
{% block styles %}
|
||||||
|
{{ super() }}
|
||||||
{% block page_content %}
|
|
||||||
<style>
|
<style>
|
||||||
main {
|
main {
|
||||||
background-image: url("{{ url_for('static', filename='images/parallax_lq/02_concept_document_focus_letter.jpg') }}");
|
background-image: url("{{ url_for('static', filename='images/parallax_lq/02_concept_document_focus_letter.jpg') }}");
|
||||||
@ -10,32 +10,38 @@
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
{% endblock styles %}
|
||||||
|
|
||||||
<div class="col s12 m4">
|
{% block page_content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12 m4">
|
||||||
<div class="card medium">
|
<div class="card medium">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<h2>Register</h2>
|
<h1 id="title">{{ title }}</h1>
|
||||||
<p>Simply enter a username and password to receive your registration email. After that you can start right away.</p>
|
<p>Simply enter a username and password to receive your registration email. After that you can start right away.</p>
|
||||||
<p>It goes without saying that the <a href="{{ url_for('main.privacy_policy') }}">General Data Protection Regulation</a> applies, only necessary data is stored.</p>
|
<p>It goes without saying that the <a href="{{ url_for('main.privacy_policy') }}">General Data Protection Regulation</a> applies, only necessary data is stored.</p>
|
||||||
<p>Please also read our <a href="{{ url_for('main.terms_of_use') }}">terms of use</a> before signing up for nopaque!</p>
|
<p>Please also read our <a href="{{ url_for('main.terms_of_use') }}">terms of use</a> before signing up for nopaque!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m8">
|
||||||
<div class="card medium">
|
<div class="card medium">
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
{{ registration_form.hidden_tag() }}
|
{{ registration_form.hidden_tag() }}
|
||||||
{{ M.render_field(registration_form.username, data_length='64', material_icon='person') }}
|
{{ wtf.render_field(registration_form.username, data_length='64', material_icon='person') }}
|
||||||
{{ M.render_field(registration_form.password, data_length='128', material_icon='vpn_key') }}
|
{{ wtf.render_field(registration_form.password, data_length='128', material_icon='vpn_key') }}
|
||||||
{{ M.render_field(registration_form.password_confirmation, data_length='128', material_icon='vpn_key') }}
|
{{ wtf.render_field(registration_form.password_confirmation, data_length='128', material_icon='vpn_key') }}
|
||||||
{{ M.render_field(registration_form.email, class_='validate', material_icon='email', type='email') }}
|
{{ wtf.render_field(registration_form.email, class_='validate', material_icon='email', type='email') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(registration_form.submit, material_icon='send') }}
|
{{ wtf.render_field(registration_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,23 +1,31 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12 m4">
|
<div class="container">
|
||||||
<h3>Lorem ipsum</h3>
|
<div class="row">
|
||||||
<p>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 justo duo dolores et ea rebum. Stet clita kasd gubergren,</p>
|
<div class="col s12">
|
||||||
</div>
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m4">
|
||||||
|
<p>Enter a new password and confirm it! After that, the entered password is your new one!</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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">
|
||||||
{{ reset_password_form.hidden_tag() }}
|
{{ reset_password_form.hidden_tag() }}
|
||||||
{{ M.render_field(reset_password_form.password, data_length='128') }}
|
{{ wtf.render_field(reset_password_form.password, data_length='128') }}
|
||||||
{{ M.render_field(reset_password_form.password_confirmation, data_length='128') }}
|
{{ wtf.render_field(reset_password_form.password_confirmation, data_length='128') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(reset_password_form.submit, material_icon='send') }}
|
{{ wtf.render_field(reset_password_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,21 +1,30 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12 m4">
|
<div class="container">
|
||||||
<p>After entering your email address you will receive instructions on how to reset your password.</p>
|
<div class="row">
|
||||||
</div>
|
<div class="col s12">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m4">
|
||||||
|
<p>After entering your email address you will receive instructions on how to reset your password.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<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">
|
||||||
{{ reset_password_request_form.hidden_tag() }}
|
{{ reset_password_request_form.hidden_tag() }}
|
||||||
{{ M.render_field(reset_password_request_form.email, class_='validate', material_icon='email', type='email') }}
|
{{ wtf.render_field(reset_password_request_form.email, class_='validate', material_icon='email', type='email') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(reset_password_request_form.submit, material_icon='send') }}
|
{{ wtf.render_field(reset_password_request_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,20 +1,25 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
|
||||||
{% block title %}Opaque - Confirm your account{% endblock %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="page-header">
|
<div class="container">
|
||||||
<h1>
|
<div class="row">
|
||||||
Hello, {{ current_user.username }}!
|
<div class="col s12">
|
||||||
</h1>
|
<h1 id="title">{{ title }}</h1>
|
||||||
<h3>You have not confirmed your account yet.</h3>
|
</div>
|
||||||
<p>
|
|
||||||
Before you can access this site you need to confirm your account.
|
<div class="col s12">
|
||||||
Check your inbox, you should have received an email with a confirmation link.
|
<div class="card">
|
||||||
</p>
|
<div class="card-content">
|
||||||
<p>
|
<span class="card-title">Hello, {{ current_user.username }}!</span>
|
||||||
Need another confirmation email?
|
<p><b>You have not confirmed your account yet.</b></p>
|
||||||
<a href="{{ url_for('auth.resend_confirmation') }}">Click here</a>
|
<p>Before you can access this site you need to confirm your account. Check your inbox, you should have received an email with a confirmation link.</p>
|
||||||
</p>
|
<p>Need another confirmation email? Click the button below!</p>
|
||||||
|
</div>
|
||||||
|
<div class="card-action right-align">
|
||||||
|
<a class="btn" href="{{ url_for('.resend_confirmation') }}">Resend confirmation mail</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,29 +1,44 @@
|
|||||||
{% 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 page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12 m4">
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<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,43 @@
|
|||||||
{% 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 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
|
<h1 id="title">{{ title }}</h1>
|
||||||
format (.vrt).
|
</div>
|
||||||
</p>
|
|
||||||
<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 +46,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 +68,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,15 @@
|
|||||||
{% 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 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">
|
||||||
<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 +30,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 +38,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 +57,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 +69,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,20 @@
|
|||||||
{% 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 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">
|
||||||
|
<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 +29,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 +64,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 +84,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 +103,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 +118,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 +207,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,35 @@
|
|||||||
{% 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 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>
|
<h1 id="title">{{ corpus_file.author }}: {{ corpus_file.title }}</h1>
|
||||||
</div>
|
</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 +38,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,14 +1,15 @@
|
|||||||
<!-- HTML to allow the user to change how the results are being displayed.-->
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
|
||||||
|
<!-- HTML to allow the user to change how the results are being displayed.-->
|
||||||
<div class="col s12 m3 l2" id="display">
|
<div class="col s12 m3 l2" id="display">
|
||||||
<h6 style="margin-top: 0px;">Display</h6>
|
<h6 style="margin-top: 0px;">Display</h6>
|
||||||
<div class="divider" style="margin-bottom: 10px;"></div>
|
<div class="divider" style="margin-bottom: 10px;"></div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<form id="display-options-form">
|
<form id="display-options-form">
|
||||||
{{ M.render_field(display_options_form.results_per_page,
|
{{ wtf.render_field(display_options_form.results_per_page,
|
||||||
material_icon='format_list_numbered') }}
|
material_icon='format_list_numbered') }}
|
||||||
{{ M.render_field(display_options_form.result_context,
|
{{ wtf.render_field(display_options_form.result_context,
|
||||||
material_icon='short_text') }}
|
material_icon='short_text') }}
|
||||||
<div class="col s12" style="line-height: 38px;">
|
<div class="col s12" style="line-height: 38px;">
|
||||||
<div class="col s8">
|
<div class="col s8">
|
||||||
@ -27,4 +28,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,33 +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 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">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
<p>Fill out the following form to upload and view your exported query data from the corpus analsis.</p>
|
<p>Fill out the following form to upload and view your exported query data from the corpus analsis.</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">
|
||||||
<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">
|
||||||
{{ add_query_result_form.hidden_tag() }}
|
{{ add_query_result_form.hidden_tag() }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 m4">
|
<div class="col s12 m4">
|
||||||
{{ M.render_field(add_query_result_form.title, data_length='32', material_icon='title') }}
|
{{ wtf.render_field(add_query_result_form.title, data_length='32', material_icon='title') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 m8">
|
<div class="col s12 m8">
|
||||||
{{ M.render_field(add_query_result_form.description, data_length='255', material_icon='description') }}
|
{{ wtf.render_field(add_query_result_form.description, data_length='255', material_icon='description') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
{{ M.render_field(add_query_result_form.file, accept='.json', placeholder='Choose your .json file') }}
|
{{ wtf.render_field(add_query_result_form.file, accept='.json', placeholder='Choose your .json file') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(add_query_result_form.submit, material_icon='send') }}
|
{{ wtf.render_field(add_query_result_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress-modal" class="modal">
|
<div id="progress-modal" class="modal">
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
|
||||||
{% set headline = ' ' %}
|
{% set scheme_primary_color = colors.corpus_analysis_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.corpus_analysis %}
|
||||||
|
|
||||||
{% set full_width = True %}
|
{% 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">
|
||||||
<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,10 +29,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 class="row" id="interactions-menu">
|
<div class="row" id="interactions-menu">
|
||||||
@ -48,17 +50,21 @@
|
|||||||
{% include 'tables/query_results.html.j2' %}
|
{% include 'tables/query_results.html.j2' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Scroll to top element -->
|
{# Import modals #}
|
||||||
{% include 'corpora/interactions/scroll_to_top.html.j2' %}
|
|
||||||
|
|
||||||
<!-- Modals -->
|
|
||||||
{% include 'modals/show_metadata.html.j2' %}
|
{% include 'modals/show_metadata.html.j2' %}
|
||||||
{% include 'modals/show_corpus_files.html.j2' %}
|
{% include 'modals/show_corpus_files.html.j2' %}
|
||||||
{% include 'modals/context_modal.html.j2' %}
|
{% include 'modals/context_modal.html.j2' %}
|
||||||
|
|
||||||
|
<!-- Scroll to top element -->
|
||||||
|
{% include 'corpora/interactions/scroll_to_top.html.j2' %}
|
||||||
|
{% endblock page_content %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{ super() }}
|
||||||
<script type="module">
|
<script type="module">
|
||||||
/**
|
/**
|
||||||
* First Phase:
|
* First Phase:
|
||||||
@ -117,56 +123,55 @@ import {
|
|||||||
* Second Phase:
|
* Second Phase:
|
||||||
* Asynchronus and event driven code.
|
* Asynchronus and event driven code.
|
||||||
*/
|
*/
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
/**
|
||||||
/**
|
|
||||||
* Initializing the results object as a model holding all the data of a
|
* Initializing the results object as a model holding all the data of a
|
||||||
* query. Also holds the metadata of one query and results data.
|
* query. Also holds the metadata of one query and results data.
|
||||||
* After that initialize the ResultsList object as the View handeling the
|
* After that initialize the ResultsList object as the View handeling the
|
||||||
* representation of the data for the user.
|
* representation of the data for the user.
|
||||||
*/
|
*/
|
||||||
let results = new Results();
|
let results = new Results();
|
||||||
let resultsList = new ResultsList('result-list', ResultsList.options);
|
let resultsList = new ResultsList('result-list', ResultsList.options);
|
||||||
// Import results data from json file.
|
// Import results data from json file.
|
||||||
const resultsJson = {{ query_result_file_content|tojson|safe }};
|
const resultsJson = {{ query_result_file_content|tojson|safe }};
|
||||||
// Import metadata from DB passed to this view
|
// Import metadata from DB passed to this view
|
||||||
const metaDataJson = {{ query_metadata|tojson|safe }};
|
const metaDataJson = {{ query_metadata|tojson|safe }};
|
||||||
// Initialize the client with dynamicMode set to false.
|
// Initialize the client with dynamicMode set to false.
|
||||||
const client = new Client({'logging': true,
|
const client = new Client({'logging': true,
|
||||||
'dynamicMode': false,
|
'dynamicMode': false,
|
||||||
'fullContext': metaDataJson.fullContext});
|
'fullContext': metaDataJson.fullContext});
|
||||||
/**
|
/**
|
||||||
* Register needed listeners and their callbacks. But we will
|
* Register needed listeners and their callbacks. But we will
|
||||||
* just call the attached callbacks manually. Because dynamicMode is false.
|
* just call the attached callbacks manually. Because dynamicMode is false.
|
||||||
*/
|
*/
|
||||||
const listenForQueryStatus = new ClientEventListener('corpus_analysis_query',
|
const listenForQueryStatus = new ClientEventListener('corpus_analysis_query',
|
||||||
recieveQueryStatus);
|
recieveQueryStatus);
|
||||||
const queryStatusCallback = new ListenerCallback('corpus_analysis_query',
|
const queryStatusCallback = new ListenerCallback('corpus_analysis_query',
|
||||||
prepareQueryData,
|
prepareQueryData,
|
||||||
[client, results]);
|
[client, results]);
|
||||||
listenForQueryStatus.setCallbacks([queryStatusCallback]);
|
listenForQueryStatus.setCallbacks([queryStatusCallback]);
|
||||||
const listenForQueryData = new ClientEventListener('corpus_analysis_query_results',
|
const listenForQueryData = new ClientEventListener('corpus_analysis_query_results',
|
||||||
recieveQueryData);
|
recieveQueryData);
|
||||||
const queryDataCallback = new ListenerCallback('corpus_analysis_query_results',
|
const queryDataCallback = new ListenerCallback('corpus_analysis_query_results',
|
||||||
saveQueryData,
|
saveQueryData,
|
||||||
[client, results]);
|
[client, results]);
|
||||||
listenForQueryData.setCallbacks([queryDataCallback]);
|
listenForQueryData.setCallbacks([queryDataCallback]);
|
||||||
// Set the event listeners
|
// Set the event listeners
|
||||||
client.setSocketEventListeners([
|
client.setSocketEventListeners([
|
||||||
listenForQueryStatus,
|
listenForQueryStatus,
|
||||||
listenForQueryData,
|
listenForQueryData,
|
||||||
]);
|
]);
|
||||||
/**
|
/**
|
||||||
* Register resultsList listeners listening to notification events emitted by
|
* Register resultsList listeners listening to notification events emitted by
|
||||||
* the Client class.
|
* the Client class.
|
||||||
*/
|
*/
|
||||||
const listenForClientNotification = new ViewEventListener('notify-view',
|
const listenForClientNotification = new ViewEventListener('notify-view',
|
||||||
recieveClientNotification);
|
recieveClientNotification);
|
||||||
/**
|
/**
|
||||||
* Register vanilla Javascript events to the resultList listening for button
|
* Register vanilla Javascript events to the resultList listening for button
|
||||||
* clicks etc. done by the user.
|
* clicks etc. done by the user.
|
||||||
* Get all needed HTMLElements for those event listeners before.
|
* Get all needed HTMLElements for those event listeners before.
|
||||||
*/
|
*/
|
||||||
resultsList.getHTMLElements([
|
resultsList.getHTMLElements([
|
||||||
'.add-btn',
|
'.add-btn',
|
||||||
'.pagination',
|
'.pagination',
|
||||||
'#display-options-form-expert_mode',
|
'#display-options-form-expert_mode',
|
||||||
@ -196,28 +201,28 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
],
|
],
|
||||||
'#sub-results-create',
|
'#sub-results-create',
|
||||||
'#sub-results-export',
|
'#sub-results-export',
|
||||||
]);
|
]);
|
||||||
let args = [resultsList, results, client];
|
let args = [resultsList, results, client];
|
||||||
const listenForPageNavigation = new ViewEventListener('page-navigation',
|
const listenForPageNavigation = new ViewEventListener('page-navigation',
|
||||||
pageNavigation,
|
pageNavigation,
|
||||||
args);
|
args);
|
||||||
const listenForExpertModeSwitch = new ViewEventListener('expert-mode',
|
const listenForExpertModeSwitch = new ViewEventListener('expert-mode',
|
||||||
expertModeSwitch,
|
expertModeSwitch,
|
||||||
args);
|
args);
|
||||||
const listenForActionButtons = new ViewEventListener('action-buttons',
|
const listenForActionButtons = new ViewEventListener('action-buttons',
|
||||||
actionButtons,
|
actionButtons,
|
||||||
args);
|
args);
|
||||||
const listenForDisplayOptions = new ViewEventListener('display-otions',
|
const listenForDisplayOptions = new ViewEventListener('display-otions',
|
||||||
displayOptions,
|
displayOptions,
|
||||||
args);
|
args);
|
||||||
const listenForShowMetaData = new ViewEventListener('show-meta-data',
|
const listenForShowMetaData = new ViewEventListener('show-meta-data',
|
||||||
showMetaData,
|
showMetaData,
|
||||||
args);
|
args);
|
||||||
const listenForShowCorpusFiles = new ViewEventListener('show-corpus-files',
|
const listenForShowCorpusFiles = new ViewEventListener('show-corpus-files',
|
||||||
showCorpusFiles,
|
showCorpusFiles,
|
||||||
args);
|
args);
|
||||||
// Set and load defined listeners
|
// Set and load defined listeners
|
||||||
resultsList.setViewEventListeners([
|
resultsList.setViewEventListeners([
|
||||||
listenForClientNotification,
|
listenForClientNotification,
|
||||||
listenForPageNavigation,
|
listenForPageNavigation,
|
||||||
listenForExpertModeSwitch,
|
listenForExpertModeSwitch,
|
||||||
@ -225,17 +230,16 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
listenForDisplayOptions,
|
listenForDisplayOptions,
|
||||||
listenForShowMetaData,
|
listenForShowMetaData,
|
||||||
listenForShowCorpusFiles,
|
listenForShowCorpusFiles,
|
||||||
]);
|
]);
|
||||||
resultsList.loadViewEventListeners();
|
resultsList.loadViewEventListeners();
|
||||||
// Hide buttons which are not needed when just inspecting results
|
// Hide buttons which are not needed when just inspecting results
|
||||||
resultsList.inspectResultsExport.classList.add('hide');
|
resultsList.inspectResultsExport.classList.add('hide');
|
||||||
// Execute client event listener callbacks manually because dynamicMode is false
|
// Execute client event listener callbacks manually because dynamicMode is false
|
||||||
client.eventListeners['corpus_analysis_query'].executeCallbacks([resultsJson]);
|
client.eventListeners['corpus_analysis_query'].executeCallbacks([resultsJson]);
|
||||||
// Save meta data to results after the init callback from line above
|
// Save meta data to results after the init callback from line above
|
||||||
results.metaData = metaDataJson;
|
results.metaData = metaDataJson;
|
||||||
client.eventListeners['corpus_analysis_query_results'].executeCallbacks([resultsJson]);
|
client.eventListeners['corpus_analysis_query_results'].executeCallbacks([resultsJson]);
|
||||||
// Enable scroll to Top functionality.
|
// Enable scroll to Top functionality.
|
||||||
scrollToTop('#headline', '#menu-scroll-to-top-div');
|
scrollToTop('#headline', '#menu-scroll-to-top-div');
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,16 +1,26 @@
|
|||||||
{% 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 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="container">
|
||||||
<div class="col s12">
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12">
|
||||||
<p>Below the metadata for the results from the Corpus
|
<p>Below the metadata for the results from the Corpus
|
||||||
<i>{{ query_result.query_metadata.corpus_name }}</i> generated with the query
|
<i>{{ query_result.query_metadata.corpus_name }}</i> generated with the query
|
||||||
<i>{{ query_result.query_metadata.query }}</i> are shown.
|
<i>{{ query_result.query_metadata.query }}</i> are shown.
|
||||||
</p>
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
<div class="col s12">
|
||||||
|
|
||||||
<div class="col s12">
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
<a class="waves-effect waves-light btn left-align" href="{{ url_for('services.service', service='corpus_analysis') }}">Back To Overview<i class="material-icons right">arrow_back</i></a>
|
<a class="waves-effect waves-light btn left-align" href="{{ url_for('services.service', service='corpus_analysis') }}">Back To Overview<i class="material-icons right">arrow_back</i></a>
|
||||||
@ -69,9 +79,10 @@
|
|||||||
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.inspect_query_result', query_result_id=query_result.id) }}">Inspect Results<i class="material-icons right">search</i></a>
|
<a class="waves-effect waves-light btn" href="{{ url_for('corpora.inspect_query_result', query_result_id=query_result.id) }}">Inspect Results<i class="material-icons right">search</i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Modal Structure -->
|
|
||||||
<div id="modal-text-details" class="modal modal-fixed-footer">
|
<div id="modal-text-details" class="modal modal-fixed-footer">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>Bibliographic data</h4>
|
<h4>Bibliographic data</h4>
|
||||||
@ -81,7 +92,10 @@
|
|||||||
<a href="#!" class="modal-close waves-effect waves-green red btn">Close</a>
|
<a href="#!" class="modal-close waves-effect waves-green red btn">Close</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock page_content %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
{{ super() }}
|
||||||
<script>
|
<script>
|
||||||
var moreTextDetailsButtons;
|
var moreTextDetailsButtons;
|
||||||
moreTextDetailsButtons = document.getElementsByClassName("more-text-detials");
|
moreTextDetailsButtons = document.getElementsByClassName("more-text-detials");
|
||||||
@ -117,5 +131,4 @@ for (var btn of moreTextDetailsButtons) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>{{ title }}</h1>
|
<h1 id="title">{{ title }}</h1>
|
||||||
<p class="light">{{ request.path }}</p>
|
<p class="light">{{ request.path }}</p>
|
||||||
<p>Alternatively, you can visit the <a href="{{ url_for('main.index') }}">Main Page</a> or read <a class="modal-trigger" href="#more-information-modal">more information</a> about this type of error.</p>
|
<p>Alternatively, you can visit the <a href="{{ url_for('main.index') }}">Main Page</a> or read <a class="modal-trigger" href="#more-information-modal">more information</a> about this type of error.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal" id="more-information-modal">
|
<div class="modal" id="more-information-modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>{{ title }}</h4>
|
<h2>About the "{{ title }}" error</h2>
|
||||||
<p>The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action (e.g. creating a duplicate record where only one is allowed). This code is also typically used if the request provided authentication by answering the WWW-Authenticate header field challenge, but the server did not accept that authentication. The request should not be repeated.</p>
|
<p>The request contained valid data and was understood by the server, but the server is refusing action. This may be due to the user not having the necessary permissions for a resource or needing an account of some sort, or attempting a prohibited action (e.g. creating a duplicate record where only one is allowed). This code is also typically used if the request provided authentication by answering the WWW-Authenticate header field challenge, but the server did not accept that authentication. The request should not be repeated.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>{{ title }}</h1>
|
<h1 id="title">{{ title }}</h1>
|
||||||
<p class="light">{{ request.path }}</p>
|
<p class="light">{{ request.path }}</p>
|
||||||
<p>Alternatively, you can visit the <a href="{{ url_for('main.index') }}">Main Page</a> or read <a class="modal-trigger" href="#more-information-modal">more information</a> about this type of error.</p>
|
<p>Alternatively, you can visit the <a href="{{ url_for('main.index') }}">Main Page</a> or read <a class="modal-trigger" href="#more-information-modal">more information</a> about this type of error.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal" id="more-information-modal">
|
<div class="modal" id="more-information-modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>{{ title }}</h4>
|
<h2>About the "{{ title }}" error</h2>
|
||||||
<p>The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.</p>
|
<p>The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>{{ title }}</h1>
|
<h1 id="title">{{ title }}</h1>
|
||||||
<p class="light">{{ request.path }}</p>
|
<p class="light">{{ request.path }}</p>
|
||||||
<p>Alternatively, you can visit the <a href="{{ url_for('main.index') }}">Main Page</a> or read <a class="modal-trigger" href="#more-information-modal">more information</a> about this type of error.</p>
|
<p>Alternatively, you can visit the <a href="{{ url_for('main.index') }}">Main Page</a> or read <a class="modal-trigger" href="#more-information-modal">more information</a> about this type of error.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal" id="more-information-modal">
|
<div class="modal" id="more-information-modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>{{ title }}</h4>
|
<h2>About the "{{ title }}" error</h2>
|
||||||
<p>The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".</p>
|
<p>The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>{{ title }}</h1>
|
<h1 id="title">{{ title }}</h1>
|
||||||
<p class="light">{{ request.path }}</p>
|
<p class="light">{{ request.path }}</p>
|
||||||
<p>Alternatively, you can visit the <a href="{{ url_for('main.index') }}">Main Page</a> or read <a class="modal-trigger" href="#more-information-modal">more information</a> about this type of error.</p>
|
<p>Alternatively, you can visit the <a href="{{ url_for('main.index') }}">Main Page</a> or read <a class="modal-trigger" href="#more-information-modal">more information</a> about this type of error.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal" id="more-information-modal">
|
<div class="modal" id="more-information-modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>{{ title }}</h4>
|
<h2>About the "{{ title }}" error</h2>
|
||||||
<p>A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.</p>
|
<p>A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
@ -1,28 +1,30 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% from '_constants.html.j2' import COLORS %}
|
||||||
{% set headline = '<i class="left material-icons service" data-service="{service}" style="font-size: inherit;"></i>Job ({service}) - {title}'.format(service=job.service, title=job.title) %}
|
|
||||||
|
|
||||||
{% if job.service == 'file-setup' %}
|
{% if job.service == 'file-setup' %}
|
||||||
|
{% set border_color = COLORS.file_setup_darken %}
|
||||||
{% set main_class = 'file-setup-color lighten' %}
|
{% set main_class = 'file-setup-color lighten' %}
|
||||||
|
{% set scheme_color = COLORS.file_setup_darken %}
|
||||||
{% elif job.service == 'nlp' %}
|
{% elif job.service == 'nlp' %}
|
||||||
|
{% set border_color = COLORS.nlp_darken %}
|
||||||
{% set main_class = 'nlp-color lighten' %}
|
{% set main_class = 'nlp-color lighten' %}
|
||||||
|
{% set scheme_color = COLORS.nlp_darken %}
|
||||||
{% elif job.service == 'ocr' %}
|
{% elif job.service == 'ocr' %}
|
||||||
|
{% set border_color = COLORS.ocr_darken %}
|
||||||
{% set main_class = 'ocr-color lighten' %}
|
{% set main_class = 'ocr-color lighten' %}
|
||||||
|
{% set scheme_color = COLORS.ocr_darken %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="{{ main_class }}"{% endblock main_attribs %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<h1><i class="left material-icons service" data-service="{{ job.service }}" style="font-size: inherit;"></i>Job ({{ job.service }}) - {{ job.title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if job.service == 'file-setup' %}
|
<div class="col s12">
|
||||||
{{ Macros.insert_color_scheme(file_setup_color_darken) }}
|
|
||||||
{% set border_color = file_setup_color_darken %}
|
|
||||||
{% elif job.service == 'nlp' %}
|
|
||||||
{{ Macros.insert_color_scheme(nlp_color_darken) }}
|
|
||||||
{% set border_color = nlp_color_darken %}
|
|
||||||
{% elif job.service == 'ocr' %}
|
|
||||||
{{ Macros.insert_color_scheme(ocr_color_darken) }}
|
|
||||||
{% set border_color = ocr_color_darken %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="col s12">
|
|
||||||
<div class="card" style="border-top: 10px solid {{border_color}}">
|
<div class="card" style="border-top: 10px solid {{border_color}}">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -97,9 +99,9 @@
|
|||||||
<a data-target="delete-job-modal" class="waves-effect waves-light btn red modal-trigger"><i class="material-icons left">delete</i>Delete</a>
|
<a data-target="delete-job-modal" class="waves-effect waves-light btn red modal-trigger"><i class="material-icons left">delete</i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content" id="inputs">
|
<div class="card-content" id="inputs">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -124,9 +126,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -160,9 +162,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- Modals -->
|
<!-- Modals -->
|
||||||
<div id="delete-job-modal" class="modal">
|
<div id="delete-job-modal" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@ -174,8 +177,10 @@
|
|||||||
<a class="btn modal-close red waves-effect waves-light" href="{{ url_for('jobs.delete_job', job_id=job.id) }}"><i class="material-icons left">delete</i>Delete</a>
|
<a class="btn modal-close red waves-effect waves-light" href="{{ url_for('jobs.delete_job', job_id=job.id) }}"><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 {
|
||||||
@ -309,13 +314,9 @@ class InformationUpdater {
|
|||||||
var informationUpdater = new InformationUpdater({{ job.id }}, false);
|
var informationUpdater = new InformationUpdater({{ job.id }}, false);
|
||||||
{% else %}
|
{% else %}
|
||||||
var informationUpdater = new InformationUpdater({{ job.id }}, true);
|
var informationUpdater = new InformationUpdater({{ job.id }}, true);
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
nopaque.socket.emit("foreign_user_data_stream_init", {{ job.user_id }});
|
||||||
nopaque.socket.emit("foreign_user_data_stream_init", {{ job.user_id }});
|
|
||||||
});
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
let jobInputsList = new RessourceList("inputs", null, "JobInput");
|
let jobInputsList = new RessourceList("inputs", null, "JobInput");
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
jobInputsList._add({{ job_inputs|tojson|safe }});
|
||||||
jobInputsList._add({{ job_inputs|tojson|safe }});
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock scripts %}
|
||||||
|
@ -1,8 +1,13 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">What is nopaque</span>
|
<span class="card-title">What is nopaque</span>
|
||||||
@ -26,9 +31,9 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<ul class="collapsible">
|
<ul class="collapsible">
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header">1. Who is developing nopaque?</div>
|
<div class="collapsible-header">1. Who is developing nopaque?</div>
|
||||||
@ -254,6 +259,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12">
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12">
|
||||||
<h3>My Corpora and Query results</h3>
|
<h3>My Corpora and Query results</h3>
|
||||||
<p>Create a corpus to interactively perform linguistic analysis or import query results to save interesting passages.</p>
|
<p>Create a corpus to interactively perform linguistic analysis or import query results to save interesting passages.</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@ -81,9 +87,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12" id="jobs">
|
<div class="col s12" id="jobs">
|
||||||
<h3>My Jobs</h3>
|
<h3>My Jobs</h3>
|
||||||
<p>A job is the execution of a service provided by nopaque. You can create any number of jobs and let them be processed simultaneously.</p>
|
<p>A job is the execution of a service provided by nopaque. You can create any number of jobs and let them be processed simultaneously.</p>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@ -160,12 +166,17 @@
|
|||||||
<a href="#!" class="modal-close waves-effect waves-light btn-flat">Close</a>
|
<a href="#!" class="modal-close waves-effect waves-light btn-flat">Close</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% 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';
|
||||||
let corpusList = new RessourceList("corpora", nopaque.corporaSubscribers, "Corpus");
|
let corpusList = new RessourceList("corpora", nopaque.corporaSubscribers, "Corpus");
|
||||||
let jobList = new RessourceList("jobs", nopaque.jobsSubscribers, "Job");
|
let jobList = new RessourceList("jobs", nopaque.jobsSubscribers, "Job");
|
||||||
let queryResultList = new RessourceList("query-results", nopaque.queryResultsSubscribers, "QueryResult");
|
let queryResultList = new RessourceList("query-results", nopaque.queryResultsSubscribers, "QueryResult");
|
||||||
</script>
|
</script>
|
||||||
|
{% endblock scripts %}
|
||||||
{% endblock %}
|
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
{% set parallax = True %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="section white">
|
<div class="section white">
|
||||||
<div class="row container">
|
<div class="row container">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<h2>nopaque</h2>
|
<h1 id="title">{{ title }}</h1>
|
||||||
<p>From text to data to analysis</p>
|
<p>From text to data to analysis</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -157,19 +156,19 @@
|
|||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">Log in</span>
|
<span class="card-title">Log in</span>
|
||||||
{{ login_form.hidden_tag() }}
|
{{ login_form.hidden_tag() }}
|
||||||
{{ M.render_field(login_form.user, material_icon='person') }}
|
{{ wtf.render_field(login_form.user, material_icon='person') }}
|
||||||
{{ M.render_field(login_form.password, material_icon='vpn_key') }}
|
{{ wtf.render_field(login_form.password, material_icon='vpn_key') }}
|
||||||
<div class="row" style="margin-bottom: 0;">
|
<div class="row" style="margin-bottom: 0;">
|
||||||
<div class="col s6 left-align">
|
<div class="col s6 left-align">
|
||||||
<a href="{{ url_for('auth.reset_password_request') }}">Forgot your password?</a>
|
<a href="{{ url_for('auth.reset_password_request') }}">Forgot your password?</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s6 right-align">
|
<div class="col s6 right-align">
|
||||||
{{ M.render_field(login_form.remember_me) }}
|
{{ wtf.render_field(login_form.remember_me) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(login_form.submit, material_icon='send') }}
|
{{ wtf.render_field(login_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12">
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12">
|
||||||
<div class="card" id="beta-launch">
|
<div class="card" id="beta-launch">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">nopaque's beta launch</span>
|
<span class="card-title">nopaque's beta launch</span>
|
||||||
@ -11,5 +17,7 @@
|
|||||||
<p>We are happy to help you with any issues and will use the feedback to fix all mentioned bugs!</p>
|
<p>We are happy to help you with any issues and will use the feedback to fix all mentioned bugs!</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,11 +1,17 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
<div class="col s12">
|
<div class="container">
|
||||||
<p>With these data protection notices, Bielefeld University fulfils its obligation to provide information in accordance with Articles 13 & 14 of the EU General Data Protection Regulation (GDPR) on the above-mentioned processing of personal data. Terms such as "personal data", "processing", "data controller", "third party", etc. are used as defined in Article 4 GDPR.</p>
|
<div class="row">
|
||||||
</div>
|
<div class="col s12">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
|
<p>With these data protection notices, Bielefeld University fulfils its obligation to provide information in accordance with Articles 13 & 14 of the EU General Data Protection Regulation (GDPR) on the above-mentioned processing of personal data. Terms such as "personal data", "processing", "data controller", "third party", etc. are used as defined in Article 4 GDPR.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 1 Contact Details</span>
|
<span class="card-title">§ 1 Contact Details</span>
|
||||||
@ -44,9 +50,9 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 2 General information on data processing and its purpose</span>
|
<span class="card-title">§ 2 General information on data processing and its purpose</span>
|
||||||
@ -86,9 +92,9 @@
|
|||||||
<p>According to § 4 paragraph 2 of the General Terms of Use for the use of NOPAQUE at Bielefeld University, the users themselves are responsible for the content they post and must comply with the legal provisions of data protection. This includes in particular the deletion of personal data that may no longer be processed.</p>
|
<p>According to § 4 paragraph 2 of the General Terms of Use for the use of NOPAQUE at Bielefeld University, the users themselves are responsible for the content they post and must comply with the legal provisions of data protection. This includes in particular the deletion of personal data that may no longer be processed.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 3 Legal basis of the data processing</span>
|
<span class="card-title">§ 3 Legal basis of the data processing</span>
|
||||||
@ -96,9 +102,9 @@
|
|||||||
<p>The collection of personal data for user authentication is based on the consent of the data subjects as stated in <b>Article 6 (1) letter a GDPR</b>. The legal basis for the transmission of personal data is <b>Article 6 (1) letter c GDPR</b>.</p>
|
<p>The collection of personal data for user authentication is based on the consent of the data subjects as stated in <b>Article 6 (1) letter a GDPR</b>. The legal basis for the transmission of personal data is <b>Article 6 (1) letter c GDPR</b>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 4 Data transmissions</span>
|
<span class="card-title">§ 4 Data transmissions</span>
|
||||||
@ -106,18 +112,18 @@
|
|||||||
<p>In individual cases, data may also be legally transmitted to third parties, for example, to law enforcement authorities for the investigation of criminal offences within the framework of the <b>Code of Criminal Procedure (StPO)</b>. If technical service providers are given access to personal data, this is done on the basis of a contract in accordance with <b>Article 28 GDPR</b>.</p>
|
<p>In individual cases, data may also be legally transmitted to third parties, for example, to law enforcement authorities for the investigation of criminal offences within the framework of the <b>Code of Criminal Procedure (StPO)</b>. If technical service providers are given access to personal data, this is done on the basis of a contract in accordance with <b>Article 28 GDPR</b>.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 5 Duration of processing / data deletion</span>
|
<span class="card-title">§ 5 Duration of processing / data deletion</span>
|
||||||
<p>Data processed for user authentication are deleted immediately after account deletion.</p>
|
<p>Data processed for user authentication are deleted immediately after account deletion.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 6 Your rights as a data subject</span>
|
<span class="card-title">§ 6 Your rights as a data subject</span>
|
||||||
@ -142,6 +148,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,21 +1,26 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12">
|
||||||
|
<h1 id="title">{{ title }}</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<p>With the usage of the nopaque platform you declare your acceptance of the General Terms of Use and that you have taken note of the legal framework and the data protection declaration.</p>
|
<p>With the usage of the nopaque platform you declare your acceptance of the General Terms of Use and that you have taken note of the legal framework and the data protection declaration.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 1 Scope</span>
|
<span class="card-title">§ 1 Scope</span>
|
||||||
<p>The General Terms of Use for the nopaque platform apply to everyone who uses the system as an authorised user in the sense of <b>§ 2</b> (1) of the General Terms of Use. By using the system and with your consent you accept these terms of use.</p>
|
<p>The General Terms of Use for the nopaque platform apply to everyone who uses the system as an authorised user in the sense of <b>§ 2</b> (1) of the General Terms of Use. By using the system and with your consent you accept these terms of use.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 2 Right of use</span>
|
<span class="card-title">§ 2 Right of use</span>
|
||||||
@ -30,9 +35,9 @@
|
|||||||
<p>(3) The duration of the right of use ends with the deletion of the user account by the user (see <b>§ 7</b>)</p>
|
<p>(3) The duration of the right of use ends with the deletion of the user account by the user (see <b>§ 7</b>)</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 3 Purpose of the Services</span>
|
<span class="card-title">§ 3 Purpose of the Services</span>
|
||||||
@ -45,9 +50,9 @@
|
|||||||
<p>On nopaque, a contact form is available. As far as possible the SFB 1288 INF staff will try to provide user support.</p>
|
<p>On nopaque, a contact form is available. As far as possible the SFB 1288 INF staff will try to provide user support.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 4 Obligations of the User</span>
|
<span class="card-title">§ 4 Obligations of the User</span>
|
||||||
@ -69,9 +74,9 @@
|
|||||||
<p>The user is obliged to indemnify Bielefeld University against all claims by third parties based on the data stored by him/her and to reimburse Bielefeld University for any costs incurred as a result of possible legal infringements. This also includes the costs incurred by Bielefeld University for extrajudicial and judicial defense against these claims.</p>
|
<p>The user is obliged to indemnify Bielefeld University against all claims by third parties based on the data stored by him/her and to reimburse Bielefeld University for any costs incurred as a result of possible legal infringements. This also includes the costs incurred by Bielefeld University for extrajudicial and judicial defense against these claims.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 5 Liability of Bielefeld University</span>
|
<span class="card-title">§ 5 Liability of Bielefeld University</span>
|
||||||
@ -80,18 +85,18 @@
|
|||||||
<p>nopaque is available in accordance with normal operational care based on the "Best Effort" practice. No liability is assumed for the consequences of failures or errors of the nopaque platform. Bielefeld University does not guarantee that the systems will run error-free and without interruption at all times. Bielefeld University accepts no responsibility for technical quality. Nor is it liable for the content, in particular for the accuracy, completeness, and timeliness of information to which it merely provides access for use.</p>
|
<p>nopaque is available in accordance with normal operational care based on the "Best Effort" practice. No liability is assumed for the consequences of failures or errors of the nopaque platform. Bielefeld University does not guarantee that the systems will run error-free and without interruption at all times. Bielefeld University accepts no responsibility for technical quality. Nor is it liable for the content, in particular for the accuracy, completeness, and timeliness of information to which it merely provides access for use.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 6 Data Protection</span>
|
<span class="card-title">§ 6 Data Protection</span>
|
||||||
<p>Information on the handling of personal data during the operation of the service can be found in the separate data protection policy.</p>
|
<p>Information on the handling of personal data during the operation of the service can be found in the separate data protection policy.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<span class="card-title">§ 7 Duration and Termination</span>
|
<span class="card-title">§ 7 Duration and Termination</span>
|
||||||
@ -100,6 +105,7 @@
|
|||||||
<p>Bielefeld University may exclude the user from using the service without notice for an important reason. Important reasons include, in particular, repeated violations of the provisions of these Terms of Use or of applicable laws.</p>
|
<p>Bielefeld University may exclude the user from using the service without notice for an important reason. Important reasons include, in particular, repeated violations of the provisions of these Terms of Use or of applicable laws.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
45
web/app/templates/materialize/base.html.j2
Normal file
45
web/app/templates/materialize/base.html.j2
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{% block doc %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html{% block html_attribs %}{% endblock html_attribs %}>
|
||||||
|
{% block html %}
|
||||||
|
<head>
|
||||||
|
{% block head %}
|
||||||
|
<title>{% block title %}{{title|default}}{% endblock title %}</title>
|
||||||
|
|
||||||
|
{% block metas %}
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
{% endblock metas %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
<link href="{{ url_for('static', filename='css/material_design_icons.css') }}" rel="stylesheet">
|
||||||
|
<link href="{{ url_for('static', filename='css/materialize.min.css') }}" media="screen,projection" rel="stylesheet">
|
||||||
|
{% endblock styles %}
|
||||||
|
{% endblock head %}
|
||||||
|
</head>
|
||||||
|
<body{% block body_attribs %}{% endblock body_attribs %}>
|
||||||
|
{% block body %}
|
||||||
|
<header{% block header_attribs %}{% endblock header_attribs %}>
|
||||||
|
{% block header %}
|
||||||
|
{% block navbar %}
|
||||||
|
{% endblock navbar %}
|
||||||
|
{% block sidenav %}
|
||||||
|
{% endblock sidenav %}
|
||||||
|
{% endblock header %}
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main{% block main_attribs %}{% endblock main_attribs %}>
|
||||||
|
{% block main %}{% endblock main %}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer{% block footer_attribs %}{% endblock footer_attribs %}>
|
||||||
|
{% block footer %}{% endblock footer %}
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
<script src="{{ url_for('static', filename='js/materialize.min.js') }}"></script>
|
||||||
|
{% endblock scripts %}
|
||||||
|
{% endblock body %}
|
||||||
|
</body>
|
||||||
|
{% endblock html %}
|
||||||
|
</html>
|
||||||
|
{% endblock doc %}
|
@ -1,30 +1,19 @@
|
|||||||
{% macro render_field(field) %}
|
{% macro render_field(field) %}
|
||||||
{% if field.flags.required and field.type not in ['FileField', 'MultipleFileField'] %}
|
|
||||||
{% if 'class_' in kwargs and 'validate' not in kwargs['class_'] %}
|
|
||||||
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' validate'}) %}
|
|
||||||
{% else %}
|
|
||||||
{% set tmp = kwargs.update({'class_': 'validate'}) %}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if field.type == 'BooleanField' %}
|
{% if field.type == 'BooleanField' %}
|
||||||
{{ render_boolean_field(field, *args, **kwargs) }}
|
{{ render_boolean_field(field, *args, **kwargs) }}
|
||||||
{% elif field.type == 'DecimalRangeField' %}
|
{% elif field.type == 'DecimalRangeField' %}
|
||||||
{{ render_decimal_range_field(field, *args, **kwargs) }}
|
{{ render_decimal_range_field(field, *args, **kwargs) }}
|
||||||
{% elif field.type == 'IntegerField' %}
|
{% elif field.type == 'SubmitField' %}
|
||||||
{% set tmp = kwargs.update({'type': 'number'}) %}
|
{{ render_submit_field(field, *args, **kwargs) }}
|
||||||
|
{% elif field.type in ['FileField', 'MultipleFileField'] %}
|
||||||
|
{{ render_file_field(field, *args, **kwargs) }}
|
||||||
|
{% else %}
|
||||||
{% if 'class_' in kwargs and 'validate' not in kwargs['class_'] %}
|
{% if 'class_' in kwargs and 'validate' not in kwargs['class_'] %}
|
||||||
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' validate'}) %}
|
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' validate'}) %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set tmp = kwargs.update({'class_': 'validate'}) %}
|
{% set tmp = kwargs.update({'class_': 'validate'}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ render_generic_field(field, *args, **kwargs) }}
|
{{ render_generic_field(field, *args, **kwargs) }}
|
||||||
{% elif field.type == 'SubmitField' %}
|
|
||||||
{{ render_submit_field(field, *args, **kwargs) }}
|
|
||||||
{% elif field.type in ['FileField', 'MultipleFileField'] %}
|
|
||||||
{{ render_file_field(field, *args, **kwargs) }}
|
|
||||||
{% elif field.type in ['PasswordField', 'SelectField', 'StringField'] %}
|
|
||||||
{{ render_generic_field(field, *args, **kwargs) }}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
@ -35,11 +24,11 @@
|
|||||||
<i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
|
<i class="material-icons prefix">{{ kwargs.pop('material_icon') }}</i>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<label>
|
<label>
|
||||||
|
{{ field(*args, **kwargs) }}
|
||||||
|
<span class="lever"></span>
|
||||||
{% if label %}
|
{% if label %}
|
||||||
{{ field.label.text }}
|
{{ field.label.text }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ field(*args, **kwargs) }}
|
|
||||||
<span class="lever"></span>
|
|
||||||
</label>
|
</label>
|
||||||
{% for error in field.errors %}
|
{% for error in field.errors %}
|
||||||
<span class="helper-text red-text">{{ error }}</span>
|
<span class="helper-text red-text">{{ error }}</span>
|
||||||
@ -57,10 +46,18 @@
|
|||||||
<div class="file-path-wrapper">
|
<div class="file-path-wrapper">
|
||||||
<input class="file-path validate" type="text" placeholder="{{ placeholder }}">
|
<input class="file-path validate" type="text" placeholder="{{ placeholder }}">
|
||||||
</div>
|
</div>
|
||||||
|
{% for error in field.errors %}
|
||||||
|
<span class="helper-text red-text">{{ error }}</span>
|
||||||
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro render_generic_field(field) %}
|
{% macro render_generic_field(field) %}
|
||||||
|
{% if field.type == 'TextAreaField' and 'materialize-textarea' not in kwargs['class_'] %}
|
||||||
|
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' materialize-textarea'}) %}
|
||||||
|
{% elif field.type == 'IntegerField' %}
|
||||||
|
{% set tmp = kwargs.update({'type': 'number'}) %}
|
||||||
|
{% endif %}
|
||||||
{% set label = kwargs.pop('label', True) %}
|
{% set label = kwargs.pop('label', True) %}
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
{% if 'material_icon' in kwargs %}
|
{% if 'material_icon' in kwargs %}
|
||||||
@ -77,13 +74,24 @@
|
|||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro render_submit_field(field) %}
|
{% macro render_submit_field(field) %}
|
||||||
<button class="btn waves-effect waves-light"
|
{% if 'class_' in kwargs and 'btn' not in kwargs['class_'] %}
|
||||||
|
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' btn'}) %}
|
||||||
|
{% else %}
|
||||||
|
{% set tmp = kwargs.update({'class_': 'btn'}) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if 'waves-effect' not in kwargs['class_'] %}
|
||||||
|
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' waves-effect'}) %}
|
||||||
|
{% endif %}
|
||||||
|
{% if 'waves-light' not in kwargs['class_'] %}
|
||||||
|
{% set tmp = kwargs.update({'class_': kwargs['class_'] + ' waves-light'}) %}
|
||||||
|
{% endif %}
|
||||||
|
<button class="{{ kwargs['class_'] }}"
|
||||||
id="{{ field.id }}"
|
id="{{ field.id }}"
|
||||||
name="{{ field.name }}"
|
name="{{ field.name }}"
|
||||||
type="submit"
|
type="submit"
|
||||||
value="{{ field.label.text }}"
|
value="{{ field.label.text }}"
|
||||||
{% if 'style' in kwargs %}
|
{% if 'style' in kwargs %}
|
||||||
style={{ kwargs.pop('style') }}
|
style="{{ kwargs.pop('style') }}"
|
||||||
{% endif %}>
|
{% endif %}>
|
||||||
{{ field.label.text }}
|
{{ field.label.text }}
|
||||||
{% if 'material_icon' in kwargs %}
|
{% if 'material_icon' in kwargs %}
|
@ -1,6 +1,4 @@
|
|||||||
<!-- Analysis init modal. User feedback showing that the analysis session is
|
<!-- Analysis init modal. User feedback showing that the analysis session is loading. -->
|
||||||
loading. -->
|
|
||||||
|
|
||||||
<div class="modal no-autoinit" id="analysis-init-modal">
|
<div class="modal no-autoinit" id="analysis-init-modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>Initializing your corpus analysis session...</h4>
|
<h4>Initializing your corpus analysis session...</h4>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<!-- Modal showing detailed context info for one match. -->
|
<!-- Modal showing detailed context info for one match. -->
|
||||||
|
|
||||||
<div id="context-modal" class="modal">
|
<div id="context-modal" class="modal">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<form>
|
<form>
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<!-- Export query results modal. Allos the user to download the results in
|
<!-- Export query results modal. Allos the user to download the results in different file formats. WIP -->
|
||||||
different file formats. WIP -->
|
|
||||||
|
|
||||||
<div id="query-results-download-modal"
|
<div id="query-results-download-modal"
|
||||||
class="modal modal-fixed-footer no-autoinit">
|
class="modal modal-fixed-footer no-autoinit">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<!-- Modal showing the corpus files for the current query results including
|
<!-- Modal showing the corpus files for the current query results including title ant match count per corpus file. -->
|
||||||
title ant match count per corpus file. -->
|
|
||||||
|
|
||||||
<div id="show-corpus-files-modal" class="modal bottom-sheet">
|
<div id="show-corpus-files-modal" class="modal bottom-sheet">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<!-- Modal showing the meta data for the current query results or the imported
|
<!-- Modal showing the meta data for the current query results or the imported results -->
|
||||||
results -->
|
|
||||||
|
|
||||||
<div id="meta-data-modal" class="modal bottom-sheet">
|
<div id="meta-data-modal" class="modal bottom-sheet">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<!-- Modal to show all metadata of one text/corpus file. Used in conjunction
|
<!-- Modal to show all metadata of one text/corpus file. Used in conjunction with the show_meta_data.html.j2 template. -->
|
||||||
with the show_meta_data.html.j2 template.-->
|
|
||||||
|
|
||||||
<div id="modal-text-details" class="modal modal-fixed-footer">
|
<div id="modal-text-details" class="modal modal-fixed-footer">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<h4>Bibliographic data</h4>
|
<h4>Bibliographic data</h4>
|
||||||
|
@ -1,245 +1,192 @@
|
|||||||
{% import "utils/macros.html.j2" as Macros %}
|
{% extends "materialize/base.html.j2" %}
|
||||||
{% import "utils/materialize.html.j2" as M %}
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
|
||||||
|
{% block html_attribs %} lang="en"{% endblock html_attribs %}
|
||||||
|
|
||||||
{% if title is not defined %}
|
{% block head %}
|
||||||
{% set title = None %}
|
{{ super() }}
|
||||||
|
<link href="{{ url_for('static', filename='images/nopaque_-_favicon.png') }}" rel="icon">
|
||||||
|
{% endblock head %}
|
||||||
|
|
||||||
|
{% block metas %}
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
{{ super() }}
|
||||||
|
{% endblock metas %}
|
||||||
|
|
||||||
|
{% block title %}{{title}}{% endblock title %}
|
||||||
|
|
||||||
|
{% block styles %}
|
||||||
|
{{ super() }}
|
||||||
|
{% if current_user.is_authenticated %}
|
||||||
|
<link href="{{ url_for('static', filename='css/materialize.sidenav-fixed.css') }}" media="screen,projection" rel="stylesheet">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<link href="{{ url_for('static', filename='css/materialize.sticky-footer.css') }}" media="screen,projection" rel="stylesheet">
|
||||||
|
<link href="{{ url_for('static', filename='css/nopaque.css') }}" media="screen,projection" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
.primary-color {background-color: {{ colors.primary }} !important;}
|
||||||
|
.primary-color-text {color: {{ colors.primary }} !important;}
|
||||||
|
.secondary-color {background-color: {{ colors.secondary }} !important;}
|
||||||
|
.secondary-color-text {color: {{ colors.secondary }} !important;}
|
||||||
|
.footer-color {background-color: {{ colors.footer }} !important;}
|
||||||
|
.footer-color-text {color: {{ colors.footer }} !important;}
|
||||||
|
|
||||||
{% if headline is not defined %}
|
.corpus-analysis-color {background-color: {{ colors.corpus_analysis }} !important;}
|
||||||
{% set headline = title %}
|
.corpus-analysis-color-text {color: {{ colors.corpus_analysis }} !important;}
|
||||||
{% endif %}
|
.corpus-analysis-color.darken {background-color: {{ colors.corpus_analysis_darken }} !important;}
|
||||||
|
.corpus-analysis-color-text.text-darken {color: {{ colors.corpus_analysis_darken }} !important;}
|
||||||
|
.corpus-analysis-color.lighten {background-color: {{ colors.corpus_analysis_lighten }} !important;}
|
||||||
|
.corpus-analysis-color-text.text-lighten {color: {{ colors.corpus_analysis_lighten }} !important;}
|
||||||
|
|
||||||
{% if parallax is not defined %}
|
.file-setup-color {background-color: {{ colors.file_setup }} !important;}
|
||||||
{% set parallax = False %}
|
.file-setup-color-text {color: {{ colors.file_setup }} !important;}
|
||||||
{% endif %}
|
.file-setup-color.darken {background-color: {{ colors.file_setup_darken }} !important;}
|
||||||
|
.file-setup-color-text.text-darken {color: {{ colors.file_setup_darken }} !important;}
|
||||||
|
.file-setup-color.lighten {background-color: {{ colors.file_setup_lighten }} !important;}
|
||||||
|
.file-setup-color-text.text-lighten {color: {{ colors.file_setup_lighten }} !important;}
|
||||||
|
|
||||||
{% if main_class is not defined %}
|
.ocr-color {background-color: {{ colors.ocr }} !important;}
|
||||||
{% set main_class = 'grey lighten-5' %}
|
.ocr-color-text {color: {{ colors.ocr }} !important;}
|
||||||
{% endif %}
|
.ocr-color.darken {background-color: {{ colors.ocr_darken }} !important;}
|
||||||
|
.ocr-color-text.text-darken {color: {{ colors.ocr_darken }} !important;}
|
||||||
|
.ocr-color.lighten {background-color: {{ colors.ocr_lighten }} !important;}
|
||||||
|
.ocr-color-text.text-lighten {color: {{ colors.ocr_lighten }} !important;}
|
||||||
|
|
||||||
{% set primary_color = '#00426f' %}
|
.nlp-color {background-color: {{ colors.nlp }} !important;}
|
||||||
{% set secondary_color = '#b1b3b4' %}
|
.nlp-color-text {color: {{ colors.nlp }} !important;}
|
||||||
|
.nlp-color.darken {background-color: {{ colors.nlp_darken }} !important;}
|
||||||
|
.nlp-color-text.text-darken {color: {{ colors.nlp_darken }} !important;}
|
||||||
|
.nlp-color.lighten {background-color: {{ colors.nlp_lighten }} !important;}
|
||||||
|
.nlp-color-text.text-lighten {color: {{ colors.nlp_lighten }} !important;}
|
||||||
|
|
||||||
{% set corpus_analysis_color = '#aa9cc9' %}
|
{% if scheme_primary_color is not defined %}
|
||||||
{% set corpus_analysis_color_darken = '#6b3f89' %}
|
{% set scheme_primary_color = colors.primary %}
|
||||||
{% set corpus_analysis_color_lighten = '#ebe8f6' %}
|
|
||||||
|
|
||||||
{% set file_setup_color = '#d5dc95' %}
|
|
||||||
{% set file_setup_color_darken = '#a1b300' %}
|
|
||||||
{% set file_setup_color_lighten = '#f2f3e1' %}
|
|
||||||
|
|
||||||
{% set nlp_color = '#98acd2' %}
|
|
||||||
{% set nlp_color_darken = '#0064a3' %}
|
|
||||||
{% set nlp_color_lighten = '#e5e8f5' %}
|
|
||||||
|
|
||||||
{% set ocr_color = '#a9d8c8' %}
|
|
||||||
{% set ocr_color_darken = '#00a58b' %}
|
|
||||||
{% set ocr_color_lighten = '#e7f4f1' %}
|
|
||||||
|
|
||||||
{%- macro insert_content() -%}
|
|
||||||
{% block page_content %}{% endblock %}
|
|
||||||
{%- endmacro -%}
|
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="theme-color" content="#ee6e73">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>
|
|
||||||
nopaque
|
|
||||||
{% if request.path != url_for('main.index') %} – {{ title }}{% endif %}
|
|
||||||
</title>
|
|
||||||
<link rel="icon" href="{{ url_for('static', filename='images/nopaque_-_favicon.png') }}">
|
|
||||||
<!--Import Google Icon Font-->
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/material_design_icons.min.css') }}">
|
|
||||||
<!--Import materialize.css-->
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/materialize.min.css') }}">
|
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/nopaque.css') }}">
|
|
||||||
<style>
|
|
||||||
.primary-color {background-color: {{ primary_color }} !important;}
|
|
||||||
.primary-color-text {color: {{ primary_color }} !important;}
|
|
||||||
.secondary-color {background-color: {{ secondary_color }} !important;}
|
|
||||||
.secondary-color-text {color: {{ secondary_color }} !important;}
|
|
||||||
|
|
||||||
.corpus-analysis-color {background-color: {{ corpus_analysis_color }} !important;}
|
|
||||||
.corpus-analysis-color-text {color: {{ corpus_analysis_color }} !important;}
|
|
||||||
.corpus-analysis-color.darken {background-color: {{ corpus_analysis_color_darken }} !important;}
|
|
||||||
.corpus-analysis-color-text.text-darken {color: {{ corpus_analysis_color_darken }} !important;}
|
|
||||||
.corpus-analysis-color.lighten {background-color: {{ corpus_analysis_color_lighten }} !important;}
|
|
||||||
.corpus-analysis-color-text.text-lighten {color: {{ corpus_analysis_color_lighten }} !important;}
|
|
||||||
|
|
||||||
.file-setup-color {background-color: {{ file_setup_color }} !important;}
|
|
||||||
.file-setup-color-text {color: {{ file_setup_color }} !important;}
|
|
||||||
.file-setup-color.darken {background-color: {{ file_setup_color_darken }} !important;}
|
|
||||||
.file-setup-color-text.text-darken {color: {{ file_setup_color_darken }} !important;}
|
|
||||||
.file-setup-color.lighten {background-color: {{ file_setup_color_lighten }} !important;}
|
|
||||||
.file-setup-color-text.text-lighten {color: {{ file_setup_color_lighten }} !important;}
|
|
||||||
|
|
||||||
.ocr-color {background-color: {{ ocr_color }} !important;}
|
|
||||||
.ocr-color-text {color: {{ ocr_color }} !important;}
|
|
||||||
.ocr-color.darken {background-color: {{ ocr_color_darken }} !important;}
|
|
||||||
.ocr-color-text.text-darken {color: {{ ocr_color_darken }} !important;}
|
|
||||||
.ocr-color.lighten {background-color: {{ ocr_color_lighten }} !important;}
|
|
||||||
.ocr-color-text.text-lighten {color: {{ ocr_color_lighten }} !important;}
|
|
||||||
|
|
||||||
.nlp-color {background-color: {{ nlp_color }} !important;}
|
|
||||||
.nlp-color-text {color: {{ nlp_color }} !important;}
|
|
||||||
.nlp-color.darken {background-color: {{ nlp_color_darken }} !important;}
|
|
||||||
.nlp-color-text.text-darken {color: {{ nlp_color_darken }} !important;}
|
|
||||||
.nlp-color.lighten {background-color: {{ nlp_color_lighten }} !important;}
|
|
||||||
.nlp-color-text.text-lighten {color: {{ nlp_color_lighten }} !important;}
|
|
||||||
|
|
||||||
.pagination li.active {background-color: {{ primary_color }};}
|
|
||||||
.table-of-contents a.active {border-color: {{ primary_color }};}
|
|
||||||
.tabs .tab a {color: inherit; /* Custom Text Color */}
|
|
||||||
.tabs .tab a:hover {color: {{ primary_color }}; /* Custom Color On Hover */}
|
|
||||||
.tabs .tab a.active, .tabs .tab a:focus.active {
|
|
||||||
color: {{ primary_color }}; /* Custom Text Color While Active */
|
|
||||||
background-color: {{ primary_color }}28; /* Custom Background Color While Active */
|
|
||||||
}
|
|
||||||
.tabs .indicator {background-color: {{ primary_color }}; /* Custom Color Of Indicator */}
|
|
||||||
{% if current_user.is_authenticated %}
|
|
||||||
/*
|
|
||||||
* ### Start sidenav-fixed offset ###
|
|
||||||
* The sidenav-fixed class is used which causes the sidenav to be fixed and open
|
|
||||||
* on large screens and hides to the regular functionality on smaller screens.
|
|
||||||
* In order to prevent the sidenav to overlap the content, the content (in our
|
|
||||||
* case header, main and footer) gets an offset equal to the width of the
|
|
||||||
* sidenav.
|
|
||||||
*/
|
|
||||||
@media only screen and (min-width : 993px) {
|
|
||||||
header, main, footer {padding-left: 300px;}
|
|
||||||
.modal:not(.bottom-sheet) {left: 300px;}
|
|
||||||
.navbar-fixed > nav {width: calc(100% - 300px)}
|
|
||||||
}
|
|
||||||
/* ### End sidenav-fixed offset ### */
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</style>
|
{% if scheme_secondary_color is not defined %}
|
||||||
</head>
|
{% set scheme_secondary_color = colors.secondary %}
|
||||||
<body>
|
|
||||||
<header>
|
|
||||||
<div class="navbar-fixed">
|
|
||||||
<nav class="nav-extended primary-color white-text">
|
|
||||||
<div class="nav-wrapper">
|
|
||||||
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-med-and-down" style="height: 100%; overflow: hidden;"><img src="{{ url_for('static', filename='images/nopaque_-_logo_name_slogan.svg') }}" style="height: 128px; margin-top: -32px;"></a>
|
|
||||||
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-large-only" style="height: 100%; overflow: hidden;"><img src="{{ url_for('static', filename='images/nopaque_-_logo.svg') }}" style="height: 128px; margin-top: -32px;"></a>
|
|
||||||
{% if current_user.is_authenticated %}
|
|
||||||
<a href="#" data-target="sidenav-main" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
main .btn, main .btn-small, main .btn-large, main .btn-floating {background-color: {{ scheme_primary_color }};}
|
||||||
|
main .btn:hover, main .btn-large:hover, main .btn-small:hover, main .btn-floating:hover {background-color: {{ scheme_secondary_color }};}
|
||||||
|
main .pagination li.active {background-color: {{ scheme_primary_color }};}
|
||||||
|
main .table-of-contents a.active {border-color: {{ scheme_primary_color }};}
|
||||||
|
main .tabs .tab a {color: inherit;}
|
||||||
|
main .tabs .tab a:hover {color: {{ scheme_primary_color }};}
|
||||||
|
main .tabs .tab a.active, .tabs .tab a:focus.active {
|
||||||
|
color: {{ scheme_primary_color }};
|
||||||
|
background-color: {{ scheme_primary_color }}28;
|
||||||
|
}
|
||||||
|
main .tabs .indicator {background-color: {{ scheme_primary_color }};}
|
||||||
|
</style>
|
||||||
|
{% endblock styles %}
|
||||||
|
|
||||||
|
{% block navbar %}
|
||||||
|
<div class="navbar-fixed">
|
||||||
|
<nav class="nav-extended">
|
||||||
|
<div class="nav-wrapper primary-color">
|
||||||
|
{% if current_user.is_authenticated %}
|
||||||
|
<a href="#" data-target="sidenav" class="sidenav-trigger"><i class="material-icons">menu</i></a>
|
||||||
|
{% endif %}
|
||||||
|
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-med-and-down" style="height: 100%; overflow: hidden;"><img src="{{ url_for('static', filename='images/nopaque_-_logo_name_slogan.svg') }}" style="height: 128px; margin-top: -32px; margin-left: -32px;"></a>
|
||||||
|
<a href="{{ url_for('main.index') }}" class="brand-logo hide-on-large-only" style="height: 100%; overflow: hidden;"><img src="{{ url_for('static', filename='images/nopaque_-_logo.svg') }}" style="height: 128px; margin-top: -32px; margin-left: -32px;"></a>
|
||||||
<ul class="right">
|
<ul class="right">
|
||||||
|
<li class="hide-on-med-and-down{% if request.path == url_for('main.news') %} active{% endif %}"><a href="{{ url_for('main.news') }}"><i class="material-icons left">notifications</i>News</a></li>
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
<li>
|
<li class="hide-on-med-and-down{% if request.path == url_for('main.dashboard') %} active{% endif %}"><a href="{{ url_for('main.dashboard') }}"><i class="material-icons left">dashboard</i>Dashboard</a></li>
|
||||||
<a id="nav-notifications" class="dropdown-trigger no-autoinit" href="{{ url_for('main.news') }}" data-target="nav-notifications-dropdown">
|
<li class="hide-on-med-and-down"><a class="dropdown-trigger no-autoinit" data-target="nav-more-dropdown" href="#!" id="nav-more-dropdown-trigger"><i class="material-icons">more_vert</i></a></li>
|
||||||
<span class="hide-on-small-only">News</span>
|
|
||||||
<i class="material-icons right">notifications</i>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
<li>
|
|
||||||
<a id="nav-account" class="dropdown-trigger no-autoinit" href="#!" data-target="nav-account-dropdown">
|
|
||||||
{% if current_user.is_authenticated %}
|
|
||||||
<span class="hide-on-small-only">{{ current_user.username }}</span><i class="material-icons right">account_circle</i>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<i class="material-icons">account_circle</i>
|
<li{% if request.path == url_for('auth.register') %} class="active"{% endif %}><a href="{{ url_for('auth.register') }}"><i class="material-icons left">assignment</i>Register</a></li>
|
||||||
|
<li{% if request.path == url_for('auth.login') %} class="active"{% endif %}><a href="{{ url_for('auth.login') }}"><i class="material-icons left">login</i>Log in</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="nav-content">
|
<div class="nav-content secondary-color">
|
||||||
<noscript>
|
{% block nav_content %}
|
||||||
<div class="card z-depth-0" style="background-color: inherit;">
|
{% if current_user.is_authenticated %}
|
||||||
<div class="card-content">
|
<ul class="tabs tabs-transparent">
|
||||||
<span class="card-title">JavaScript is disabled</span>
|
<li class="tab disabled"><a><i class="material-icons left">explore</i>Roadmap</a></li>
|
||||||
<p>
|
<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>
|
||||||
You have JavaScript disabled. Nopaque uses javascript and
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
sockets to send data in realtime to you. For example showing
|
<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>
|
||||||
you the status of your jobs and your corpora.
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
Please activate JavaScript to make full use of nopaque.</p>
|
<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>
|
||||||
<p>Some services are still useable without Javascript.</p>
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
</div>
|
<li class="tab"><a{%if request.path == url_for('corpora.add_corpus') %} class="active"{% endif %} href="{{ url_for('corpora.add_corpus') }}" target="_self">Add corpus</a></li>
|
||||||
<div class="card-action">
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
<a href="#">What services can I still use?</a>
|
{% if corpus %}
|
||||||
<a href="#">What services and functions are not available?</a>
|
<li class="tab"><a{%if request.path == url_for('corpora.add_corpus_file', corpus_id=corpus.id) %} class="active"{% endif %} href="{{ url_for('corpora.add_corpus_file', corpus_id=corpus.id) }}" target="_self">Add corpus file(s)</a></li>
|
||||||
</div>
|
{% else %}
|
||||||
</div>
|
<li class="tab disabled tooltipped" data-tooltip="Select a corpus first"><a>Add corpus file(s)</a></li>
|
||||||
</noscript>
|
{% endif %}
|
||||||
|
<li class="tab disabled"><i class="material-icons">navigate_next</i></li>
|
||||||
|
{% if corpus %}
|
||||||
|
{% if corpus.files.all() %}
|
||||||
|
<li class="tab"><a{%if request.path == url_for('corpora.analyse_corpus', corpus_id=corpus.id) %} class="active"{% endif %} href="{{ url_for('corpora.analyse_corpus', corpus_id=corpus.id) }}" target="_self">Corpus analysis</a></li>
|
||||||
|
{% else %}
|
||||||
|
<li class="tab disabled tooltipped" data-tooltip="Add at least one corpus file first"><a>Corpus analysis</a></li>
|
||||||
|
{% endif %}
|
||||||
|
{% else %}
|
||||||
|
<li class="tab disabled tooltipped" data-tooltip="Select a corpus first"><a>Corpus analysis</a></li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
{% endblock nav_content %}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Dropdown menus for the navbar -->
|
{% if current_user.is_authenticated %}
|
||||||
<div id="nav-notifications-dropdown" class="dropdown-content">
|
<ul class="dropdown-content" id="nav-more-dropdown">
|
||||||
<li>
|
<li><a href="{{ url_for('settings.index') }}"><i class="material-icons left">settings</i>Settings</a></li>
|
||||||
<a href="{{ url_for('main.news', _anchor='beta-launch') }}"><i class="material-icons">error_outline</i>nopaque's beta launch</a>
|
<li class="divider" tabindex="-1"></li>
|
||||||
</li>
|
<li><a href="{{ url_for('auth.logout') }}">Log out</a></li>
|
||||||
</div>
|
</ul>
|
||||||
<ul id="nav-account-dropdown" class="dropdown-content">
|
{% endif %}
|
||||||
|
{% endblock navbar %}
|
||||||
|
|
||||||
|
{% block sidenav %}
|
||||||
|
<ul class="sidenav sidenav-fixed{% if not current_user.is_authenticated %} hide{% endif %}">
|
||||||
{% if current_user.is_authenticated %}
|
{% if current_user.is_authenticated %}
|
||||||
<li><a href="{{ url_for('profile.settings') }}"><i class="material-icons">settings</i>Settings</a></li>
|
<li>
|
||||||
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons">power_settings_new</i>Log out</a></li>
|
<div class="user-view">
|
||||||
{% else %}
|
<div class="background primary-color"></div>
|
||||||
<li><a href="{{ url_for('auth.login') }}"><i class="material-icons">login</i>Log in</a></li>
|
<span class="white-text name">{{ current_user.username }}</span>
|
||||||
<li><a href="{{ url_for('auth.register') }}"><i class="material-icons">assignment</i>Register</a></li>
|
<span class="white-text email">{{ current_user.email }}</span>
|
||||||
{% endif %}
|
</div>
|
||||||
</ul>
|
</li>
|
||||||
|
<li><a href="{{ url_for('main.index') }}">nopaque</a></li>
|
||||||
<ul id="sidenav-main" class="sidenav sidenav-fixed{% if not current_user.is_authenticated %} hide{% endif %}">
|
|
||||||
<li><a href="{{ url_for('main.index') }}"><i class="material-icons">opacity</i>nopaque</a></li>
|
|
||||||
<li><a href="#"><i class="material-icons">linear_scale</i>Workflow</a></li>
|
<li><a href="#"><i class="material-icons">linear_scale</i>Workflow</a></li>
|
||||||
<li><a href="{{ url_for('main.dashboard') }}"><i class="material-icons">dashboard</i>Dashboard</a></li>
|
<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="material-icons">book</i>My Corpora</a></li>
|
<li><a href="{{ url_for('main.dashboard', _anchor='corpora') }}" style="padding-left: 47px;"><i class="material-icons">book</i>My Corpora</a></li>
|
||||||
<li><a href="{{ url_for('main.dashboard', _anchor='jobs') }}" style="padding-left: 47px;"><i class="material-icons">work</i>My Jobs</a></li>
|
<li><a href="{{ url_for('main.dashboard', _anchor='jobs') }}" style="padding-left: 47px;"><i class="material-icons">work</i>My Jobs</a></li>
|
||||||
<li><div class="divider"></div></li>
|
<li><div class="divider"></div></li>
|
||||||
<li><a class="subheader">Processes & Services</a></li>
|
<li><a class="subheader">Processes & Services</a></li>
|
||||||
<li style="background-color: {{ file_setup_color }}; border-left: 10px solid {{ file_setup_color_darken }};"><a href="{{ url_for('services.service', service='file-setup') }}"><i class="material-icons">burst_mode</i>File setup</a></li>
|
<li style="background-color: {{ colors.file_setup }}; border-left: 10px solid {{ colors.file_setup_darken }};"><a href="{{ url_for('services.service', service='file-setup') }}"><i class="material-icons">burst_mode</i>File setup</a></li>
|
||||||
<li style="background-color: {{ ocr_color }}; border-left: 10px solid {{ ocr_color_darken }}; margin-top: 5px;"><a href="{{ url_for('services.service', service='ocr') }}"><i class="material-icons">find_in_page</i>OCR</a></li>
|
<li style="background-color: {{ colors.ocr }}; border-left: 10px solid {{ colors.ocr_darken }}; margin-top: 5px;"><a href="{{ url_for('services.service', service='ocr') }}"><i class="material-icons">find_in_page</i>OCR</a></li>
|
||||||
<li style="background-color: {{ nlp_color }}; border-left: 10px solid {{ nlp_color_darken }}; margin-top: 5px;"><a href="{{ url_for('services.service', service='nlp') }}"><i class="material-icons">format_textdirection_l_to_r</i>NLP</a></li>
|
<li style="background-color: {{ colors.nlp }}; border-left: 10px solid {{ colors.nlp_darken }}; margin-top: 5px;"><a href="{{ url_for('services.service', service='nlp') }}"><i class="material-icons">format_textdirection_l_to_r</i>NLP</a></li>
|
||||||
<li style="background-color: {{ corpus_analysis_color }}; border-left: 10px solid {{ corpus_analysis_color_darken }}; margin-top: 5px;"><a href="{{ url_for('services.service', service='corpus_analysis') }}"><i class="material-icons">search</i>Corpus analysis</a></li>
|
<li style="background-color: {{ colors.corpus_analysis }}; border-left: 10px solid {{ colors.corpus_analysis_darken }}; margin-top: 5px;"><a href="{{ url_for('services.service', service='corpus_analysis') }}"><i class="material-icons">search</i>Corpus analysis</a></li>
|
||||||
<li><div class="divider"></div></li>
|
<li><div class="divider"></div></li>
|
||||||
<li><a class="subheader">Account</a></li>
|
<li><a class="subheader">Account</a></li>
|
||||||
{% if current_user.is_authenticated %}
|
<li><a href="{{ url_for('settings.index') }}"><i class="material-icons">settings</i>Settings</a></li>
|
||||||
<li><a href="{{ url_for('profile.settings') }}"><i class="material-icons">settings</i>Settings</a></li>
|
<li><a href="{{ url_for('auth.logout') }}">Log out</a></li>
|
||||||
<li><a href="{{ url_for('auth.logout') }}"><i class="material-icons">power_settings_new</i>Log out</a></li>
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<li><a href="{{ url_for('auth.login') }}"><i class="material-icons">person</i>Log in</a></li>
|
<li><a href="{{ url_for('auth.register') }}"><i class="material-icons">assignment</i>Register</a></li>
|
||||||
<li><a href="{{ url_for('auth.register') }}"><i class="material-icons">person_add</i>Register</a></li>
|
<li><a href="{{ url_for('auth.login') }}"><i class="material-icons">login</i>Log in</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if current_user.is_administrator() %}
|
{% if current_user.is_administrator() %}
|
||||||
<li><div class="divider"></div></li>
|
<li><div class="divider"></div></li>
|
||||||
<li><a class="subheader">Administration</a></li>
|
<li><a class="subheader">Administration</a></li>
|
||||||
<li><a href="{{ url_for('admin.index') }}"><i class="material-icons">build</i>Administration tools</a></li>
|
<li><a href="{{ url_for('admin.users') }}"><i class="material-icons">build</i>Administration tools</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</header>
|
{% endblock sidenav %}
|
||||||
|
|
||||||
{% if parallax %}
|
{% block main %}
|
||||||
<main>
|
{% block page_content %}{% endblock page_content %}
|
||||||
{{ insert_content() }}
|
{% endblock main %}
|
||||||
</main>
|
|
||||||
{% else %}
|
|
||||||
<main class="{{ main_class }}">
|
|
||||||
{% if not full_width %}
|
|
||||||
<div class="container">
|
|
||||||
{% endif %}
|
|
||||||
<div class="row">
|
|
||||||
<div class="col s12" id="headline">
|
|
||||||
<h2>{{ headline }}</h2>
|
|
||||||
</div>
|
|
||||||
{{ insert_content() }}
|
|
||||||
</div>
|
|
||||||
{% if not full_width %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="page-footer secondary-color white-text">
|
{% block footer_attribs %} class="page-footer footer-color"{% endblock footer_attribs %}
|
||||||
<div class="container">
|
|
||||||
|
{% block footer %}
|
||||||
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s6 m3">
|
<div class="col s6 m3">
|
||||||
<a href="https://www.dfg.de/">
|
<a href="https://www.dfg.de/">
|
||||||
@ -261,8 +208,8 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer-copyright primary-color white-text">
|
<div class="footer-copyright primary-color">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row" style="margin-bottom: 0;">
|
<div class="row" style="margin-bottom: 0;">
|
||||||
<div class="col s12 m3">
|
<div class="col s12 m3">
|
||||||
@ -270,31 +217,41 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col s12 m9 right-align">
|
<div class="col s12 m9 right-align">
|
||||||
<a class="btn-small blue waves-effect waves-light" href="{{ url_for('main.about_and_faq') }}"><i class="left material-icons">info_outline</i>About and faq</a>
|
<a class="btn-small blue waves-effect waves-light" href="{{ url_for('main.about_and_faq') }}"><i class="left material-icons">info_outline</i>About and faq</a>
|
||||||
<a class="btn-small pink waves-effect waves-light" href="mailto:{{ config.CONTACT_EMAIL_ADRESS }}?subject={{ config.NOPAQUE_MAIL_SUBJECT_PREFIX }} Contact"><i class="left material-icons">rate_review</i>Contact</a>
|
{% if config.CONTACT_EMAIL_ADRESS %}
|
||||||
<a class="btn-small green waves-effect waves-light" href="mailto:{{ config.CONTACT_EMAIL_ADRESS }}?subject={{ config.NOPAQUE_MAIL_SUBJECT_PREFIX }} Feedback"><i class="left material-icons">feedback</i>Feedback</a>
|
<a class="btn-small pink waves-effect waves-light" href="mailto:{{ config.CONTACT_EMAIL_ADRESS }}?subject=[nopaque] Contact"><i class="left material-icons">rate_review</i>Contact</a>
|
||||||
<a class="btn-small orange waves-effect waves-light" href="https://gitlab.ub.uni-bielefeld.de/sfb1288inf/opaque"><i class="left material-icons">code</i>GitLab</a>
|
<a class="btn-small green waves-effect waves-light" href="mailto:{{ config.CONTACT_EMAIL_ADRESS }}?subject=[nopaque] Feedback"><i class="left material-icons">feedback</i>Feedback</a>
|
||||||
|
{% endif %}
|
||||||
|
<a class="btn-small orange waves-effect waves-light" href="https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque"><i class="left material-icons">code</i>GitLab</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
{% endblock footer %}
|
||||||
<script src="{{ url_for('static', filename='js/darkreader.js') }}"></script>
|
|
||||||
<script src="{{ url_for('static', filename='js/jsonpatch.min.js') }}"></script>
|
{% block scripts %}
|
||||||
<script src="{{ url_for('static', filename='js/list.min.js') }}"></script>
|
{{ super() }}
|
||||||
<script src="{{ url_for('static', filename='js/materialize.min.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/darkreader.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/socket.io.slim.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/jsonpatch.min.js') }}"></script>
|
||||||
<script src="{{ url_for('static', filename='js/nopaque.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/list.min.js') }}"></script>
|
||||||
<script>
|
<script src="{{ url_for('static', filename='js/socket.io.slim.js') }}"></script>
|
||||||
{% if current_user.is_authenticated %}
|
<script src="{{ url_for('static', filename='js/nopaque.js') }}"></script>
|
||||||
|
<script>
|
||||||
{% if current_user.setting_dark_mode %}
|
{% if current_user.setting_dark_mode %}
|
||||||
DarkReader.enable({brightness: 150, contrast: 100, sepia: 0});
|
DarkReader.enable({brightness: 150, contrast: 100, sepia: 0});
|
||||||
{% endif %}
|
{% endif %}
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
// Disable all option elements with no value
|
||||||
nopaque.socket.init();
|
for (let optionElement of document.querySelectorAll('option[value=""]')) {
|
||||||
|
optionElement.disabled = true;
|
||||||
|
}
|
||||||
|
M.AutoInit();
|
||||||
|
M.CharacterCounter.init(document.querySelectorAll('input[data-length][type="email"], input[data-length][type="password"], input[data-length][type="text"], textarea[data-length]'));
|
||||||
|
M.Dropdown.init(document.querySelectorAll('#nav-more-dropdown-trigger'), {alignment: 'right', constrainWidth: false, coverTrigger: false});
|
||||||
|
nopaque.Forms.init();
|
||||||
|
{% if current_user.is_authenticated %}
|
||||||
nopaque.socket.emit('user_data_stream_init');
|
nopaque.socket.emit('user_data_stream_init');
|
||||||
});
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
nopaque.flashedMessages = {{ get_flashed_messages(with_categories=True)|tojson }};
|
for (let flashedMessage of {{ get_flashed_messages(with_categories=True)|tojson }}) {
|
||||||
</script>
|
nopaque.flash(flashedMessage[1], flashedMessage[0]);
|
||||||
</body>
|
}
|
||||||
</html>
|
</script>
|
||||||
|
{% endblock scripts %}
|
||||||
|
@ -1,136 +0,0 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
|
||||||
|
|
||||||
{% block page_content %}
|
|
||||||
<div class="col s12 m4">
|
|
||||||
<h3>General settings</h3>
|
|
||||||
</div>
|
|
||||||
<div class="col s12 m8">
|
|
||||||
<br class="hide-on-small-only">
|
|
||||||
<div class="card">
|
|
||||||
<form method="POST">
|
|
||||||
<div class="card-content">
|
|
||||||
{{ edit_general_settings_form.hidden_tag() }}
|
|
||||||
<div class="row">
|
|
||||||
<div class="col s9">
|
|
||||||
<p><i class="material-icons left">brightness_3</i>{{ edit_general_settings_form.dark_mode.label.text }}</p>
|
|
||||||
<p class="light">Activate dark mode to ease your eyes.</p>
|
|
||||||
</div>
|
|
||||||
<div class="col s3 right-align">
|
|
||||||
{{ M.render_field(edit_general_settings_form.dark_mode, label=False) }}
|
|
||||||
</div>
|
|
||||||
<div class="col s12"><p> </p></div>
|
|
||||||
<div class="col s12 divider"></div>
|
|
||||||
<div class="col s12"><p> </p></div>
|
|
||||||
<div class="col s12 m8">
|
|
||||||
<p><i class="material-icons left">notifications</i>Job status site notifications</p>
|
|
||||||
<p class="light">Receive site notifications about job status changes.</p>
|
|
||||||
</div>
|
|
||||||
<div class="col s12 m4 right-align" style="margin-top: -1rem;">
|
|
||||||
{{ M.render_field(edit_general_settings_form.job_status_site_notifications, label=False) }}
|
|
||||||
</div>
|
|
||||||
<div class="col s12"><p> </p></div>
|
|
||||||
<div class="col s12 divider"></div>
|
|
||||||
<div class="col s12"><p> </p></div>
|
|
||||||
<div class="col s12 m8">
|
|
||||||
<p><i class="material-icons left">notifications</i>Job status mail notifications</p>
|
|
||||||
<p class="light">Receive mail notifications about job status changes.</p>
|
|
||||||
</div>
|
|
||||||
<div class="col s12 m4 right-align" style="margin-top: -1rem;">
|
|
||||||
{{ M.render_field(edit_general_settings_form.job_status_mail_notifications, label=False) }}
|
|
||||||
</div>
|
|
||||||
<!--
|
|
||||||
Seperate each setting with the following two elements
|
|
||||||
<div class="col s12 divider"></div>
|
|
||||||
<div class="col s12"><p> </p></div>
|
|
||||||
-->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-action right-align">
|
|
||||||
{{ M.render_field(edit_general_settings_form.save_settings, material_icon='send') }}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col s12"></div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col s12 m4">
|
|
||||||
<h3>Change password</h3>
|
|
||||||
</div>
|
|
||||||
<div class="col s12 m8">
|
|
||||||
<br class="hide-on-small-only">
|
|
||||||
<div class="card">
|
|
||||||
<form method="POST">
|
|
||||||
<div class="card-content">
|
|
||||||
{{ edit_password_form.hidden_tag() }}
|
|
||||||
{{ M.render_field(edit_password_form.current_password, data_length='128', material_icon='vpn_key') }}
|
|
||||||
{{ M.render_field(edit_password_form.password, data_length='128', material_icon='vpn_key') }}
|
|
||||||
{{ M.render_field(edit_password_form.password_confirmation, data_length='128', material_icon='vpn_key') }}
|
|
||||||
</div>
|
|
||||||
<div class="card-action right-align">
|
|
||||||
{{ M.render_field(edit_password_form.save_password, material_icon='send') }}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col s12"></div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col s12 m4">
|
|
||||||
<h3>Change email</h3>
|
|
||||||
</div>
|
|
||||||
<div class="col s12 m8">
|
|
||||||
<br class="hide-on-small-only">
|
|
||||||
<div class="card">
|
|
||||||
<form method="POST">
|
|
||||||
<div class="card-content">
|
|
||||||
{{ edit_email_form.hidden_tag() }}
|
|
||||||
{{ M.render_field(edit_email_form.email, class_='validate', material_icon='email', type='email') }}
|
|
||||||
</div>
|
|
||||||
<div class="card-action right-align">
|
|
||||||
{{ M.render_field(edit_email_form.save_email, material_icon='send') }}
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col s12"></div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="col s12 m4">
|
|
||||||
<h3>Delete account</h3>
|
|
||||||
</div>
|
|
||||||
<div class="col s12 m8">
|
|
||||||
<br class="hide-on-small-only">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-content">
|
|
||||||
<p>Deleting an account has the following effects:</p>
|
|
||||||
<ul>
|
|
||||||
<li>All data associated with your corpora and jobs will be permanently deleted.</li>
|
|
||||||
<li>All settings will be permanently deleted.</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="card-action right-align">
|
|
||||||
<a href="#delete-account-modal" class="btn modal-trigger red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Modals -->
|
|
||||||
<div class="modal" id="delete-account-modal">
|
|
||||||
<div class="modal-content">
|
|
||||||
<h4>Confirm deletion</h4>
|
|
||||||
<p>Do you really want to delete your account and all associated data? All associated corpora, jobs and files will be permanently deleted!</p>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<a href="#!" class="btn modal-close waves-effect waves-light">Cancel</a>
|
|
||||||
<a href="{{ url_for('profile.delete') }}" class="btn red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
@ -1,25 +1,32 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
|
||||||
{% set main_class = 'corpus-analysis-color lighten' %}
|
{% 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 page_content %}
|
{% block page_content %}
|
||||||
{{ Macros.insert_color_scheme(corpus_analysis_color_darken) }}
|
<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="col s12 m3 push-m9">
|
||||||
<div class="center-align">
|
<div class="center-align">
|
||||||
<a class="btn-floating btn-large waves-effect waves-light" style="transform: scale(2);">
|
<a class="btn-floating btn-large waves-effect waves-light" style="transform: scale(2);">
|
||||||
<i class="material-icons service" data-service="corpus-analysis"></i>
|
<i class="material-icons service" data-service="corpus-analysis"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m9 pull-m3">
|
<div class="col s12 m9 pull-m3">
|
||||||
<p>{{ rgb }}</p>
|
|
||||||
<p>Nopaque lets you create and upload as many text corpora as you want. It makes use of CQP Query Language, which allows for complex search requests with the aid of metadata and NLP tags. The results can either be displayed as text or abstract visualizations.</p>
|
<p>Nopaque lets you create and upload as many text corpora as you want. It makes use of CQP Query Language, which allows for complex search requests with the aid of metadata and NLP tags. The results can either be displayed as text or abstract visualizations.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<h3>My Corpora</h3>
|
<h2>My Corpora</h2>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content" id="corpora">
|
<div class="card-content" id="corpora">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
@ -45,13 +52,13 @@
|
|||||||
<ul class="pagination paginationBottom"></ul>
|
<ul class="pagination paginationBottom"></ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
<a class="btn corpus-analysis-color darken waves-effect waves-light" href="{{ url_for('corpora.add_corpus') }}">New corpus<i class="material-icons right">add</i></a>
|
<a class="btn waves-effect waves-light" href="{{ url_for('corpora.add_corpus') }}">New corpus<i class="material-icons right">add</i></a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<h3>My query results</h3>
|
<h2>My query results</h2>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-content" id="query-results">
|
<div class="card-content" id="query-results">
|
||||||
<div class="input-field">
|
<div class="input-field">
|
||||||
@ -86,14 +93,19 @@
|
|||||||
<ul class="pagination paginationBottom"></ul>
|
<ul class="pagination paginationBottom"></ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
<a class="btn corpus-analysis-color darken waves-effect waves-light" href="{{ url_for('corpora.add_query_result') }}">Add query result<i class="material-icons right">file_upload</i></a>
|
<a class="btn waves-effect waves-light" href="{{ url_for('corpora.add_query_result') }}">Add query result<i class="material-icons right">file_upload</i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% 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';
|
||||||
let corpusList = new RessourceList("corpora", nopaque.corporaSubscribers, "Corpus");
|
let corpusList = new RessourceList("corpora", nopaque.corporaSubscribers, "Corpus");
|
||||||
let queryResultList = new RessourceList("query-results", nopaque.queryResultsSubscribers, "QueryResult");
|
let queryResultList = new RessourceList("query-results", nopaque.queryResultsSubscribers, "QueryResult");
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock scripts %}
|
||||||
|
@ -1,11 +1,20 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
|
||||||
{% set main_class = 'file-setup-color lighten' %}
|
{% set scheme_primary_color = colors.file_setup_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.file_setup %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="file-setup-color lighten"{% endblock main_attribs %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
{{ Macros.insert_color_scheme(file_setup_color_darken) }}
|
<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="col s12 m3 push-m9">
|
||||||
<div class="center-align">
|
<div class="center-align">
|
||||||
<p class="hide-on-small-only"> </p>
|
<p class="hide-on-small-only"> </p>
|
||||||
<p class="hide-on-small-only"> </p>
|
<p class="hide-on-small-only"> </p>
|
||||||
@ -13,10 +22,10 @@
|
|||||||
<i class="material-icons service" data-service="file-setup"></i>
|
<i class="material-icons service" data-service="file-setup"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m9 pull-m3">
|
<div class="col s12 m9 pull-m3">
|
||||||
<div class="card" style="border-top: 10px solid {{ file_setup_color_darken }};">
|
<div class="card" style="border-top: 10px solid {{ colors.file_setup_darken }};">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
@ -28,34 +37,36 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<h3>Submit a job</h3>
|
<h2>Submit a job</h2>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form class="nopaque-submit-form" data-progress-modal="progress-modal">
|
<form class="nopaque-submit-form" data-progress-modal="progress-modal">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
{{ add_job_form.hidden_tag() }}
|
{{ add_job_form.hidden_tag() }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 l4">
|
<div class="col s12 l4">
|
||||||
{{ M.render_field(add_job_form.title, data_length='32', material_icon='title') }}
|
{{ wtf.render_field(add_job_form.title, data_length='32', material_icon='title') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l8">
|
<div class="col s12 l8">
|
||||||
{{ M.render_field(add_job_form.description, data_length='255', material_icon='description') }}
|
{{ wtf.render_field(add_job_form.description, data_length='255', material_icon='description') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
{{ M.render_field(add_job_form.files, accept='image/jpeg, image/png, image/tiff', placeholder='Choose your .jpeg, .png or .tiff files') }}
|
{{ wtf.render_field(add_job_form.files, accept='image/jpeg, image/png, image/tiff', placeholder='Choose your .jpeg, .png or .tiff files') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 hide">
|
<div class="col s12 hide">
|
||||||
{{ M.render_field(add_job_form.version, material_icon='apps') }}
|
{{ wtf.render_field(add_job_form.version, material_icon='apps') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(add_job_form.submit, material_icon='send') }}
|
{{ wtf.render_field(add_job_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress-modal" class="modal">
|
<div id="progress-modal" class="modal">
|
||||||
|
@ -1,11 +1,20 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
|
||||||
{% set main_class = 'nlp-color lighten' %}
|
{% set scheme_primary_color = colors.nlp_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.nlp %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="nlp-color lighten"{% endblock main_attribs %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
{{ Macros.insert_color_scheme(nlp_color_darken) }}
|
<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="col s12 m3 push-m9">
|
||||||
<div class="center-align">
|
<div class="center-align">
|
||||||
<p class="hide-on-small-only"> </p>
|
<p class="hide-on-small-only"> </p>
|
||||||
<p class="hide-on-small-only"> </p>
|
<p class="hide-on-small-only"> </p>
|
||||||
@ -13,10 +22,10 @@
|
|||||||
<i class="material-icons service" data-service="nlp"></i>
|
<i class="material-icons service" data-service="nlp"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m9 pull-m3">
|
<div class="col s12 m9 pull-m3">
|
||||||
<div class="card" style="border-top: 10px solid {{ nlp_color_darken }};">
|
<div class="card" style="border-top: 10px solid {{ colors.nlp_darken }};">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 m6">
|
<div class="col s12 m6">
|
||||||
@ -46,29 +55,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<h3>Submit a job</h3>
|
<h2>Submit a job</h2>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form class="nopaque-submit-form" data-progress-modal="progress-modal">
|
<form class="nopaque-submit-form" data-progress-modal="progress-modal">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
{{ add_job_form.hidden_tag() }}
|
{{ add_job_form.hidden_tag() }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 l4">
|
<div class="col s12 l4">
|
||||||
{{ M.render_field(add_job_form.title, data_length='32', material_icon='title') }}
|
{{ wtf.render_field(add_job_form.title, data_length='32', material_icon='title') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l8">
|
<div class="col s12 l8">
|
||||||
{{ M.render_field(add_job_form.description, data_length='255', material_icon='description') }}
|
{{ wtf.render_field(add_job_form.description, data_length='255', material_icon='description') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l5">
|
<div class="col s12 l5">
|
||||||
{{ M.render_field(add_job_form.files, accept='text/plain', placeholder='Choose your .txt files') }}
|
{{ wtf.render_field(add_job_form.files, accept='text/plain', placeholder='Choose your .txt files') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l4">
|
<div class="col s12 l4">
|
||||||
{{ M.render_field(add_job_form.language, material_icon='language') }}
|
{{ wtf.render_field(add_job_form.language, material_icon='language') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l3">
|
<div class="col s12 l3">
|
||||||
{{ M.render_field(add_job_form.version, material_icon='apps') }}
|
{{ wtf.render_field(add_job_form.version, material_icon='apps') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<span class="card-title">Preprocessing</span>
|
<span class="card-title">Preprocessing</span>
|
||||||
@ -94,10 +103,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(add_job_form.submit, material_icon='send') }}
|
{{ wtf.render_field(add_job_form.submit, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress-modal" class="modal">
|
<div id="progress-modal" class="modal">
|
||||||
|
@ -1,11 +1,20 @@
|
|||||||
{% extends "nopaque.html.j2" %}
|
{% extends "nopaque.html.j2" %}
|
||||||
|
{% import 'materialize/wtf.html.j2' as wtf %}
|
||||||
|
{% from '_colors.html.j2' import colors %}
|
||||||
|
|
||||||
{% set main_class = 'ocr-color lighten' %}
|
{% set scheme_primary_color = colors.ocr_darken %}
|
||||||
|
{% set scheme_secondary_color = colors.ocr %}
|
||||||
|
|
||||||
|
{% block main_attribs %} class="ocr-color lighten"{% endblock main_attribs %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
{{ Macros.insert_color_scheme(ocr_color_darken) }}
|
<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="col s12 m3 push-m9">
|
||||||
<div class="center-align">
|
<div class="center-align">
|
||||||
<p class="hide-on-small-only"> </p>
|
<p class="hide-on-small-only"> </p>
|
||||||
<p class="hide-on-small-only"> </p>
|
<p class="hide-on-small-only"> </p>
|
||||||
@ -13,10 +22,10 @@
|
|||||||
<i class="material-icons service" data-service="ocr"></i>
|
<i class="material-icons service" data-service="ocr"></i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12 m9 pull-m3">
|
<div class="col s12 m9 pull-m3">
|
||||||
<div class="card" style="border-top: 10px solid {{ ocr_color_darken }};">
|
<div class="card" style="border-top: 10px solid {{ colors.ocr_darken }};">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
@ -28,29 +37,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<h3>Submit a job</h3>
|
<h2>Submit a job</h2>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<form class="nopaque-submit-form" data-progress-modal="progress-modal">
|
<form class="nopaque-submit-form" data-progress-modal="progress-modal">
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
{{ add_job_form.hidden_tag() }}
|
{{ add_job_form.hidden_tag() }}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col s12 l4">
|
<div class="col s12 l4">
|
||||||
{{ M.render_field(add_job_form.title, data_length='32', material_icon='title') }}
|
{{ wtf.render_field(add_job_form.title, data_length='32', material_icon='title') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l8">
|
<div class="col s12 l8">
|
||||||
{{ M.render_field(add_job_form.description, data_length='255', material_icon='description') }}
|
{{ wtf.render_field(add_job_form.description, data_length='255', material_icon='description') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l5">
|
<div class="col s12 l5">
|
||||||
{{ M.render_field(add_job_form.files, accept='application/pdf', color=ocr_color_darken, placeholder='Choose your .pdf files') }}
|
{{ wtf.render_field(add_job_form.files, accept='application/pdf', color=ocr_color_darken, placeholder='Choose your .pdf files') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l4">
|
<div class="col s12 l4">
|
||||||
{{ M.render_field(add_job_form.language, material_icon='language') }}
|
{{ wtf.render_field(add_job_form.language, material_icon='language') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12 l3">
|
<div class="col s12 l3">
|
||||||
{{ M.render_field(add_job_form.version, material_icon='apps') }}
|
{{ wtf.render_field(add_job_form.version, material_icon='apps') }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12">
|
<div class="col s12">
|
||||||
<span class="card-title">Preprocessing</span>
|
<span class="card-title">Preprocessing</span>
|
||||||
@ -121,10 +130,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-action right-align">
|
<div class="card-action right-align">
|
||||||
{{ M.render_field(add_job_form.submit, color=ocr_color_darken, material_icon='send') }}
|
{{ wtf.render_field(add_job_form.submit, color=ocr_color_darken, material_icon='send') }}
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="progress-modal" class="modal">
|
<div id="progress-modal" class="modal">
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
<ul class="table-of-contents" id="roadmap">
|
|
||||||
<li><b>Roadmap</b></li>
|
|
||||||
<li>
|
|
||||||
<a href="{{ url_for('services.service', service='file-setup') }}">File setup</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{{ url_for('services.service', service='ocr') }}">Optical Character Recognition</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{{ url_for('services.service', service='nlp') }}">Natural Language Processing</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="{{ url_for('services.service', service='corpus_analysis') }}">Corpus analysis</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<script>
|
|
||||||
for (let entry of document.querySelectorAll(`#roadmap a`)) {
|
|
||||||
if (entry.href === window.location.href) {entry.classList.add("active");}
|
|
||||||
}
|
|
||||||
</script>
|
|
5
web/app/templates/settings/_menu.html.j2
Normal file
5
web/app/templates/settings/_menu.html.j2
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<div class="collection">
|
||||||
|
<a href="{{ url_for('.edit_general_settings') }}" class="collection-item{%if request.path == url_for('.edit_general_settings') %} active{% endif %}">Edit general settings</a>
|
||||||
|
<a href="{{ url_for('.change_password') }}" class="collection-item{%if request.path == url_for('.change_password') %} active{% endif %}">Change password</a>
|
||||||
|
<a href="{{ url_for('.edit_notification_settings') }}" class="collection-item{%if request.path == url_for('.edit_notification_settings') %} active{% endif %}">Edit notification settings</a>
|
||||||
|
</div>
|
35
web/app/templates/settings/change_password.html.j2
Normal file
35
web/app/templates/settings/change_password.html.j2
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{% extends 'nopaque.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">Settings</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
|
{% include 'settings/_menu.html.j2' %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m8">
|
||||||
|
<div class="card">
|
||||||
|
<form enctype="multipart/form-data" method="POST">
|
||||||
|
<div class="card-content">
|
||||||
|
<span class="card-title">{{ title }}</span>
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
{{ wtf.render_field(form.password, material_icon='vpn_key') }}
|
||||||
|
{{ wtf.render_field(form.new_password, material_icon='vpn_key') }}
|
||||||
|
{{ wtf.render_field(form.new_password2, material_icon='vpn_key') }}
|
||||||
|
</div>
|
||||||
|
<div class="card-action">
|
||||||
|
<div class="right-align">
|
||||||
|
{{ wtf.render_field(form.submit, material_icon='send') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock page_content %}
|
79
web/app/templates/settings/edit_general_settings.html.j2
Normal file
79
web/app/templates/settings/edit_general_settings.html.j2
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
{% extends 'nopaque.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">Settings</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
|
{% include 'settings/_menu.html.j2' %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m8">
|
||||||
|
<div class="card">
|
||||||
|
<form enctype="multipart/form-data" method="POST">
|
||||||
|
<div class="card-content">
|
||||||
|
<span class="card-title">{{ title }}</span>
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
{{ wtf.render_field(form.username, data_length='64', material_icon='person') }}
|
||||||
|
{{ wtf.render_field(form.email, data_length='254', material_icon='email') }}
|
||||||
|
<div class="row">
|
||||||
|
<div class="col s12"><p> </p></div>
|
||||||
|
<div class="col s1">
|
||||||
|
<p><i class="material-icons">brightness_3</i></p>
|
||||||
|
</div>
|
||||||
|
<div class="col s8">
|
||||||
|
<p>{{ form.dark_mode.label.text }}</p>
|
||||||
|
<p class="light">Enable dark mode to ease your eyes.</p>
|
||||||
|
</div>
|
||||||
|
<div class="col s3 right-align">
|
||||||
|
<div class="switch">
|
||||||
|
<label>
|
||||||
|
{{ form.dark_mode() }}
|
||||||
|
<span class="lever"></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-action">
|
||||||
|
<div class="right-align">
|
||||||
|
{{ wtf.render_field(form.submit, material_icon='send') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-content">
|
||||||
|
<span class="card-title">Delete account</span>
|
||||||
|
<p>Deleting an account has the following effects:</p>
|
||||||
|
<ul>
|
||||||
|
<li>All data associated with your corpora and jobs will be permanently deleted.</li>
|
||||||
|
<li>All settings will be permanently deleted.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="card-action right-align">
|
||||||
|
<a href="#delete-account-modal" class="btn modal-trigger red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Modals -->
|
||||||
|
<div class="modal" id="delete-account-modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<h4>Confirm deletion</h4>
|
||||||
|
<p>Do you really want to delete your account and all associated data? All associated corpora, jobs and files will be permanently deleted!</p>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<a href="#!" class="btn modal-close waves-effect waves-light">Cancel</a>
|
||||||
|
<a href="{{ url_for('.delete') }}" class="btn red waves-effect waves-light"><i class="material-icons left">delete</i>Delete</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock page_content %}
|
@ -0,0 +1,34 @@
|
|||||||
|
{% extends 'nopaque.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">Settings</h1>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m4">
|
||||||
|
{% include 'settings/_menu.html.j2' %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col s12 m8">
|
||||||
|
<div class="card">
|
||||||
|
<form enctype="multipart/form-data" method="POST">
|
||||||
|
<div class="card-content">
|
||||||
|
<span class="card-title">{{ title }}</span>
|
||||||
|
{{ form.hidden_tag() }}
|
||||||
|
{{ wtf.render_field(form.job_status_mail_notifications, material_icon='notifications') }}
|
||||||
|
{{ wtf.render_field(form.job_status_site_notifications, material_icon='feedback') }}
|
||||||
|
</div>
|
||||||
|
<div class="card-action">
|
||||||
|
<div class="right-align">
|
||||||
|
{{ wtf.render_field(form.submit, material_icon='send') }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock page_content %}
|
@ -1,37 +0,0 @@
|
|||||||
{%- macro insert_page_content() -%}
|
|
||||||
<noscript>
|
|
||||||
<div class="container">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col s12">
|
|
||||||
<div class="card red darken-1">
|
|
||||||
<div class="card-content white-text">
|
|
||||||
<span class="card-title">JavaScript is disabled</span>
|
|
||||||
<p>You have JavaScript disabled. Nopaque uses javascript and sockets to send data in realtime to you. For example showing you the status of your jobs and your corpora. Please activate JavaScript to make full use of nopaque.</p>
|
|
||||||
<p>Some services are still useable without Javascript.</p>
|
|
||||||
</div>
|
|
||||||
<div class="card-action">
|
|
||||||
<a href="#">What services can I still use?</a>
|
|
||||||
<a href="#">What services and functions are not available?</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</noscript>
|
|
||||||
{% block page_content %}{% endblock %}
|
|
||||||
{%- endmacro -%}
|
|
||||||
|
|
||||||
{%- macro insert_color_scheme(hex_color) -%}
|
|
||||||
<style>
|
|
||||||
main button, main .btn, main .btn-floating {background-color: {{ hex_color }};}
|
|
||||||
main .pagination li.active {background-color: {{ hex_color }};}
|
|
||||||
main .table-of-contents a.active {border-color: {{ hex_color }};}
|
|
||||||
main .tabs .tab a {color: inherit;}
|
|
||||||
main .tabs .tab a:hover {color: {{ hex_color }};}
|
|
||||||
main .tabs .tab a.active, .tabs .tab a:focus.active {
|
|
||||||
color: {{ hex_color }};
|
|
||||||
background-color: {{ hex_color }}28;
|
|
||||||
}
|
|
||||||
main .tabs .indicator {background-color: {{ hex_color }};}
|
|
||||||
</style>
|
|
||||||
{%- endmacro -%}
|
|
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
|
export FLASK_APP=nopaque.py
|
||||||
if [[ "$#" -eq 0 ]]; then
|
if [[ "$#" -eq 0 ]]; then
|
||||||
while true; do
|
while true; do
|
||||||
flask deploy
|
flask deploy
|
||||||
|
@ -31,6 +31,7 @@ class Config:
|
|||||||
|
|
||||||
''' # General # '''
|
''' # General # '''
|
||||||
ADMIN_EMAIL_ADRESS = os.environ.get('NOPAQUE_ADMIN_EMAIL_ADRESS')
|
ADMIN_EMAIL_ADRESS = os.environ.get('NOPAQUE_ADMIN_EMAIL_ADRESS')
|
||||||
|
ALLOWED_USERNAME_REGEX = '^[A-Za-zÄÖÜäöüß0-9_.]*$'
|
||||||
CONTACT_EMAIL_ADRESS = os.environ.get('NOPAQUE_CONTACT_EMAIL_ADRESS')
|
CONTACT_EMAIL_ADRESS = os.environ.get('NOPAQUE_CONTACT_EMAIL_ADRESS')
|
||||||
DATA_DIR = os.environ.get('NOPAQUE_DATA_DIR', '/mnt/nopaque')
|
DATA_DIR = os.environ.get('NOPAQUE_DATA_DIR', '/mnt/nopaque')
|
||||||
SECRET_KEY = os.environ.get('NOPAQUE_SECRET_KEY', 'hard to guess string')
|
SECRET_KEY = os.environ.get('NOPAQUE_SECRET_KEY', 'hard to guess string')
|
||||||
|
Loading…
Reference in New Issue
Block a user