Add skeletons for all lexicon general pages
This commit is contained in:
parent
43345c4bf0
commit
ef5459070c
|
@ -17,12 +17,14 @@ def get_bp():
|
||||||
@bp.route('/contents/', methods=['GET'])
|
@bp.route('/contents/', methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
def contents(name):
|
def contents(name):
|
||||||
return "Lexicon " + str(name)
|
lex = lexicon.LexiconModel.by(name=name)
|
||||||
|
return render_template('lexicon/contents.html', lexicon=lex)
|
||||||
|
|
||||||
@bp.route('/rules/', methods=['GET'])
|
@bp.route('/rules/', methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
def rules(name):
|
def rules(name):
|
||||||
return "Lexicon " + str(name)
|
lex = lexicon.LexiconModel.by(name=name)
|
||||||
|
return render_template('lexicon/rules.html', lexicon=lex)
|
||||||
|
|
||||||
@bp.route('/session/', methods=['GET'])
|
@bp.route('/session/', methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
|
@ -33,6 +35,7 @@ def get_bp():
|
||||||
@bp.route('/statistics/', methods=['GET'])
|
@bp.route('/statistics/', methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
def stats(name):
|
def stats(name):
|
||||||
return "Lexicon " + str(name)
|
lex = lexicon.LexiconModel.by(name=name)
|
||||||
|
return render_template('lexicon/statistics.html', lexicon=lex)
|
||||||
|
|
||||||
return bp
|
return bp
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{% extends "lexicon/lexicon.html" %}
|
||||||
|
{% block title %}Session | {{ lexicon_title }}{% endblock %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
|
||||||
|
<h1>Contents</h1>
|
||||||
|
|
||||||
|
{% set lexicons = current_user.lexicons_in() %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
{% set template_content_blocks = [self.main()] %}
|
|
@ -1,12 +1,20 @@
|
||||||
{% extends "page_2col.html" %}
|
{% extends "page_2col.html" %}
|
||||||
{% block header %}<h2>{{ lexicon.title }}</h2>{% endblock %}
|
{% if lexicon.title %}
|
||||||
|
{% set lexicon_title = lexicon.title %}
|
||||||
|
{% else %}
|
||||||
|
{% set lexicon_title = "Lexicon " + lexicon.name %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% block header %}
|
||||||
|
<h2>{{ lexicon_title }}</h2>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block sb_logo %}{% endblock %}
|
{% block sb_logo %}{% endblock %}
|
||||||
{% block sb_home %}<a href="{{ url_for('home.home') }}">Home</a>{% endblock %}
|
{% block sb_home %}<a href="{{ url_for('home.home') }}">Home</a>{% endblock %}
|
||||||
{% block sb_contents %}<a href="{{ url_for('lexicon.contents', name=lexicon.name) }}">Contents</a>{% endblock %}
|
{% block sb_contents %}<a href="{{ url_for('lexicon.contents', name=lexicon.name) }}">Contents</a>{% endblock %}
|
||||||
{% block sb_rules %}<a href="{{ url_for('lexicon.rules', name=lexicon.name) }}">Rules</a>{% endblock %}
|
{% block sb_rules %}<a href="{{ url_for('lexicon.rules', name=lexicon.name) }}">Rules</a>{% endblock %}
|
||||||
{% block sb_session %}<a href="{{ url_for('lexicon.session', name=lexicon.name) }}">Session</a>{% endblock %}
|
{% block sb_session %}<a href="{{ url_for('lexicon.session', name=lexicon.name) }}">Session</a>{% endblock %}
|
||||||
{% block sb_stats %}<a href="{{ url_for('lexicon.stats', name=lexicon.name) }}">Stats</a>{% endblock %}
|
{% block sb_stats %}<a href="{{ url_for('lexicon.stats', name=lexicon.name) }}">Statistics</a>{% endblock %}
|
||||||
|
|
||||||
{% set template_sidebar_rows = [
|
{% set template_sidebar_rows = [
|
||||||
self.sb_logo(),
|
self.sb_logo(),
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{% extends "lexicon/lexicon.html" %}
|
||||||
|
{% block title %}Rules | {{ lexicon_title }}{% endblock %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
|
||||||
|
<h1>Rules</h1>
|
||||||
|
|
||||||
|
{% set lexicons = current_user.lexicons_in() %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
{% set template_content_blocks = [self.main()] %}
|
|
@ -1,5 +1,5 @@
|
||||||
{% extends "lexicon/lexicon.html" %}
|
{% extends "lexicon/lexicon.html" %}
|
||||||
{% block title %}Session | {{ lexicon.name }}{% endblock %}
|
{% block title %}Session | {{ lexicon_title }}{% endblock %}
|
||||||
|
|
||||||
{% block main %}
|
{% block main %}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{% extends "lexicon/lexicon.html" %}
|
||||||
|
{% block title %}Session | {{ lexicon_title }}{% endblock %}
|
||||||
|
|
||||||
|
{% block main %}
|
||||||
|
|
||||||
|
<h1>Statistics</h1>
|
||||||
|
|
||||||
|
{% set lexicons = current_user.lexicons_in() %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
{% set template_content_blocks = [self.main()] %}
|
Loading…
Reference in New Issue