]> git.0d.be Git - django-panik-combo.git/blob - gallery/templates/combo/gallery_manager.html
438a7e3d64859cd80f2db674b9d51b4d5871e941
[django-panik-combo.git] / gallery / templates / combo / gallery_manager.html
1 {% extends 'combo/cell_form.html' %}
2 {% load static thumbnail i18n %}
3
4 {% block cell-form %}
5 <form action="{{ url }}" method="post" data-label-url="{% url 'combo-manager-page-get-additional-label' page_pk=page.id cell_reference=cell.get_reference %}">
6 {% csrf_token %}
7   {{ form.as_p }}
8
9 <ul class="gallery" id="gallery-{{cell.id}}" data-order-url="{% url 'combo-gallery-image-order' gallery_pk=cell.id %}">
10 {% for image in cell.image_set.all %}
11 <li data-object-id="{{image.id}}">
12 {% thumbnail image.image "120x120" crop="50% 25%" as im %}
13   <img height="120" src="{{ im.url }}"/>
14 {% endthumbnail %}
15   <span class="image-actions">
16   <a rel="popup" class="image-edit icon-edit" href="{% url 'combo-gallery-image-edit' gallery_pk=cell.id pk=image.id %}"></a>
17   <a class="image-delete icon-remove-sign" href="{% url 'combo-gallery-image-delete' gallery_pk=cell.id pk=image.id %}"></a>
18   </span>
19 </li>
20 {% endfor %}
21 </ul>
22
23 <script src="{% static "js/combo.gallery.js" %}"></script>
24 <script>gallery($('#gallery-{{cell.id}}'));</script>
25
26 {% endblock %}
27
28
29 {% block cell-buttons %}
30 <a class="image-add" rel="popup" href="{% url 'combo-gallery-image-add' gallery_pk=cell.id %}">{% trans 'New Image' %}</a>
31 |
32 {{ block.super }}
33 </form>
34 {% endblock %}