1
0
Fork 0
mirror of https://github.com/Findus23/RPGnotes.git synced 2024-09-19 15:43:45 +02:00
RPGnotes/locations/templates/locations/detail.jinja

70 lines
2.9 KiB
Django/Jinja

{% extends "tenantbase.jinja" %}
{% import "macros.jinja" as macros %}
{% block content %}
<div class="row">
<div class="col-sm-4">
<div class="list-group">
{% for p in roots %}
<a class="tree-{{ p.tree_depth }} list-group-item list-group-item-action {% if location.id == p.id %}active{% endif %}"
href="{{ p.get_absolute_url() }}">
{{ p }}
</a>
{% endfor %}
</div>
<a class="btn btn-primary" href="{{ url("locationadd") }} ">{{ _("Add Location") }}</a>
</div>
<div class="col-sm-8">
<div class="character-heading">
<h1>
{{ location.name }}
<a href="{{ url("locationedit", location.slug) }}">
{{ _("Edit") }}
</a>
</h1>
<nav aria-label="breadcrumb" class="breadcrumbs">
<ol class="breadcrumb">
{% for ancestor in location.ancestors() %}
<li class="breadcrumb-item">
<a href="{{ ancestor.get_absolute_url() }}">{{ ancestor }}</a>
</li>
{% endfor %}
<li class="breadcrumb-item active" aria-current="page">
{{ location }}
</li>
</ol>
</nav>
</div>
<dl>
{% if location.part_of %}
<dt>{{ _("Part of") }}:</dt>
<dd><a href="{{ location.part_of.get_absolute_url() }}">{{ location.part_of }}</a></dd>
{% endif %}
{% if location.loot.all() %}
<dt>{{ _("Contains") }}:</dt>
<dd>
<ul>
{% for l in location.loot.all() %}
<li><a href="{{ l.get_absolute_url() }}">{{ l.name }}</a></li>
{% endfor %}
</ul>
</dd>
{% endif %}
{% if location.image %}
{% set im=thumbnail(location.image, "860", crop="center") %}
<a href="{{ location.image.url }}" class="image-viewer">
<img class="img-fluid" src="{{ im.url }}"
width="{{ im.width }}"
height="{{ im.height }}"
srcset="{{ im.url|srcset }}">
</a>
{% endif %}
</dl>
<div class="content">
{{ location.description_html|safe }}
</div>
{{ macros.last_edited(location) }}
</div>
</div>
{% endblock %}