diff options
author | Markus Zapke-Gründemann <markus@keimlink.de> | 2012-01-23 23:17:35 +0100 |
---|---|---|
committer | Markus Zapke-Gründemann <markus@keimlink.de> | 2012-01-23 23:17:35 +0100 |
commit | 157be90714685d0dc9d45320539300c7f8b4f58e (patch) | |
tree | 0392c11ce26d426d399dd57f3dae655cf8497423 /sublab_project/projects/templates | |
parent | e01c2cc6bdd1615796cdee62f4d46bc65b32ec21 (diff) |
add image for project
Diffstat (limited to 'sublab_project/projects/templates')
-rw-r--r-- | sublab_project/projects/templates/projects/project_detail.html | 10 | ||||
-rw-r--r-- | sublab_project/projects/templates/projects/project_image.html | 14 |
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 %} |