summaryrefslogtreecommitdiff
path: root/sublab_project/projects/templates
diff options
context:
space:
mode:
Diffstat (limited to 'sublab_project/projects/templates')
-rw-r--r--sublab_project/projects/templates/projects/project_detail.html10
-rw-r--r--sublab_project/projects/templates/projects/project_image.html14
2 files changed, 24 insertions, 0 deletions
diff --git a/sublab_project/projects/templates/projects/project_detail.html b/sublab_project/projects/templates/projects/project_detail.html
index 600b79c..5c0a6dd 100644
--- a/sublab_project/projects/templates/projects/project_detail.html
+++ b/sublab_project/projects/templates/projects/project_detail.html
@@ -1,9 +1,19 @@
{% extends 'base.html' %}
+{% load thumbnail %}
{% block title %}Projekt: {{ object.name }}{% endblock %}
{% block content %}
<h2 id="{{ object.slug }}">Projekt: {{ object.name }}</h2>
+ {% if object.image %}
+ <div class="imagecontent">
+ <a href="{% url project_image object.slug %}">
+ {% thumbnail object.image "200" upscale=False as image %}
+ <img src="{{ image.url }}" width="{{ image.width }}" height="{{ image.height }}" align="right" />
+ {% endthumbnail %}
+ </a>
+ </div>
+ {% endif %}
{{ object.description_html|safe }}
{% if object.contact_email %}
<p>E-Mail: {{ object.contact_email }}</p>
diff --git a/sublab_project/projects/templates/projects/project_image.html b/sublab_project/projects/templates/projects/project_image.html
new file mode 100644
index 0000000..65e82f3
--- /dev/null
+++ b/sublab_project/projects/templates/projects/project_image.html
@@ -0,0 +1,14 @@
+{% extends 'base.html' %}
+{% load thumbnail %}
+
+{% block title %}Bild: {{ object.name }}{% endblock %}
+
+{% block content %}
+ <h2>Bild: {{ object.name }}</h2>
+ <div>
+ {% thumbnail object.image "820" upscale=False as image %}
+ <img src="{{ image.url }}" style="max-width:{{ image.width }}px; max-height:{{ image.height }}px;" class="contentimage" />
+ {% endthumbnail %}
+ </div>
+ <p><a href="{{ object.get_absolute_url }}">Zurück zum Projekt</a></p>
+{% endblock content %}