amanuensis/amanuensis/templates/lexicon/session.html

42 lines
1.2 KiB
HTML

{% extends "lexicon/lexicon.html" %}
{% set current_page = "session" %}
{% block title %}Session | {{ lexicon_title }}{% endblock %}
{% set template_content_blocks = [] %}
{% if current_user.id == g.lexicon.editor %}
{% block bl_editor %}
<p>Editor actions</p>
<ul>
<li><a href="{{ url_for('lexicon.settings', name=g.lexicon.name) }}">Edit lexicon settings</a></li>
</ul>
{% endblock %}
{% set template_content_blocks = template_content_blocks + [self.bl_editor()] %}
{% endif %}
{% block main %}
{% for message in get_flashed_messages() %}
<span style="color: #ff0000">{{ message }}</span><br>
{% endfor %}
<p>Player actions</p>
<ul>
{% set characters = g.lexicon.get_characters_for_player(current_user.id) %}
{% for char in characters %}
<li>
<a href="{{ url_for('lexicon.character', name=g.lexicon.name, cid=char.cid) }}">
Edit {{ char.name }}
</a>
</li>
{% endfor %}
{%
if characters|count is lt(g.lexicon.join.chars_per_player)
and not g.lexicon.turn.current
%}
<li>
<a href="{{ url_for('lexicon.character', name=g.lexicon.name) }}">Create a character</a>
</li>
{% endif %}
</ul>
{% endblock %}
{% set template_content_blocks = template_content_blocks + [self.main()] %}