2017-06-10 09:59:00 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
|
|
|
|
{% block content %}
|
2017-12-08 21:43:35 +00:00
|
|
|
{% if request.user.is_staff %}
|
|
|
|
<div class="admin-menu">
|
|
|
|
<a href="{% url 'admin:content_content_change' content.id %}">Edit</a>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-06-10 09:59:00 +00:00
|
|
|
|
2017-12-05 18:10:17 +00:00
|
|
|
<img src="{{ content.image_url }}" width="75%">
|
2017-06-10 09:59:00 +00:00
|
|
|
<div class="content_detail">
|
|
|
|
<h1>{{ content.title }}</h1>
|
|
|
|
|
|
|
|
<h4>{{ content.header|safe }} </h4>
|
|
|
|
<p>{{ content.body|safe }}</p>
|
2017-12-08 21:43:35 +00:00
|
|
|
|
|
|
|
{% if content.children.exists %}
|
|
|
|
<b>Child Nodes:</b> <br>
|
|
|
|
<ul>
|
|
|
|
{% for node in content.children.all %}
|
|
|
|
{% if node.shortname %}
|
|
|
|
<li>
|
|
|
|
<a href="{{node.get_absolute_url}}">{{ node.title }}</a>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if content.parent and content.parent.title %}
|
|
|
|
<b>Part of:</b><br>
|
|
|
|
<a href="{{content.parent.get_absolute_url}}">{{content.parent.title}}</a>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if content.resources.exists %}
|
|
|
|
<style>
|
|
|
|
.resources img {
|
|
|
|
max-width: 128px;
|
|
|
|
float: left;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class="resources">
|
|
|
|
<b>Resources:</b> <br>
|
|
|
|
{% for res in content.resources.all %}
|
|
|
|
<div>
|
|
|
|
{% if res.is_image %}
|
|
|
|
<img src="{{res.get_absolute_url}}">
|
|
|
|
{% elif res.is_audio %}
|
|
|
|
<audio controls src="{{res.get_absolute_url}}"></audio>
|
|
|
|
{% elif res.is_video %}
|
|
|
|
<video controls src="{{res.get_absolute_url}}"></video>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{res.get_absolute_url}}">{{res.description|default:res.href}}</a>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
<br clear="all">
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2017-06-10 09:59:00 +00:00
|
|
|
</div>
|
2017-12-05 18:10:17 +00:00
|
|
|
{% endblock %}
|