Skip to content
Snippets Groups Projects
Commit 6b8789ec authored by Jiří Setnička's avatar Jiří Setnička
Browse files

Drobečková navigace pro místa - templaty

Některé templaty si historicky vyráběly vlastní drobečkovou navigaci, ta odstraněna.
parent c61f1657
Branches
No related tags found
1 merge request!23Titulky stránek a drobečková navigace
......@@ -161,11 +161,9 @@ def org_place_edit(id: int):
return redirect(redirectURL)
parents = reversed(db.get_place_parents(place)[1:]) # without place itself and from the top
return render_template(
'org_place_edit.html', place=place, school=school,
parents=parents, form=form
form=form,
)
......@@ -194,7 +192,6 @@ def org_place_move(id: int):
if not rr.can_edit_place(place):
raise werkzeug.exceptions.Forbidden()
parents = reversed(db.get_place_parents(place)[1:]) # without place itself and from the top
new_parents = None
search_error = None
......@@ -240,7 +237,7 @@ def org_place_move(id: int):
return render_template(
'org_place_move.html',
place=place, form=form, form_confirm=form_confirm, search_error=search_error,
parents=parents, new_parents=new_parents
new_parents=new_parents
)
......@@ -344,9 +341,7 @@ def org_place_new_child(id: int):
flash(msg, 'success')
return redirect(redirect_url)
parents = reversed(db.get_place_parents(parent_place))
return render_template('org_place_new.html', parents=parents, form=form)
return render_template('org_place_new.html', parent_place=parent_place, form=form)
@app.route('/org/place/')
......
{% extends "base.html" %}
{% block body %}
<h2>{{ place.type_name().title() }}: {{ place.name }}</h2>
{% if place.parent %}
<a href='{{ url_for('org_place', id=place.parent) }}'>↖ Nadřazené místo</a>
{% endif %}
{% block title %}{{ place.type_name().title() }}: {{ place.name }}{% endblock %}
{% block breadcrumbs %}
{{ place_breadcrumbs(place) | safe }}
{% endblock %}
{% block body %}
<!-- type={{ place.type.name }} level={{ place.level }} -->
<table class=data>
<tr><td>Kód:<td>{{ place.code or '#' + place.place_id|string }}
......
{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% block body %}
<h2>{{ place.type_name().title() }}: {{ place.name }}</h2>
<a href='{{ url_for('org_place', id=place.place_id) }}'>Zpět na detail místa</a>
<hr>
{% block title %}{{ place.type_name().title() }}: {{ place.name }} &ndash; editace údajů{% endblock %}
{% block breadcrumbs %}
{{ place_breadcrumbs(place, action="Editace údajů") | safe }}
{% endblock %}
<h3>Editace údajů</h3>
{% block body %}
{{ wtf.quick_form(form, form_type='horizontal', button_map={'submit': 'primary'}) }}
......
{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% block body %}
<h2>{{ place.type_name().title() }}: {{ place.name }}</h2>
<a href='{{ url_for('org_place', id=place.place_id) }}'>Zpět na detail místa</a>
<hr>
<h3>Přesun místa</h3>
<p><b>Současné nadřazené místo:</b>
{% for parent in parents %}
{% if loop.index != 1 %}&rightarrow;{% endif %}<a href='{{ url_for('org_place', id=parent.place_id) }}'>{{ parent.name }}</a>
{% endfor %}
</p>
{% block title %}{{ place.type_name().title() }}: {{ place.name }} &ndash; přesun místa{% endblock %}
{% block breadcrumbs %}
{{ place_breadcrumbs(place, action="Přesun místa") | safe }}
{% endblock %}
{% block body %}
<h4>Krok 1: Vyhledání místa</h4>
<p>Vyhledejte místo podle jeho kódu.</p>
......
{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% block body %}
<h2>Vytvoření nového místa</h2>
<p><b>Hierarchie:</b>
{% for parent in parents %}
<a href='{{ url_for('org_place', id=parent.place_id) }}'>{{ parent.name }}</a> &rightarrow;
{% endfor %}
<i>nové místo</i></p>
{% block title %}{{ parent_place.type_name().title() }}: {{ parent_place.name }} &ndash; nové podřízené místo{% endblock %}
{% block breadcrumbs %}
{{ place_breadcrumbs(parent_place, action="Nové podřízené místo") | safe }}
{% endblock %}
<hr>
{% block body %}
{{ wtf.quick_form(form, form_type='horizontal', button_map={'submit': 'primary'}) }}
......
{% extends "base.html" %}
{% block body %}
<h2>Role pro: {{ place.name }}</h2>
{% block title %}{{ place.type_name().title() }}: {{ place.name }} &ndash; role{% endblock %}
{% block breadcrumbs %}
{{ place_breadcrumbs(place, action="Role") | safe }}
{% endblock %}
{% block body %}
<table class=data>
<thead><tr>
<th>Role
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment