indent items in control view

This commit is contained in:
Oskar Hahn 2012-04-18 14:53:19 +02:00
parent aa54ac6d7d
commit 67384d0644
4 changed files with 19 additions and 7 deletions

View File

@ -117,7 +117,7 @@ class Item(MPTTModel, SlideMixin):
order_insertion_by = ['weight', 'title']
register_slidemodel(Item)
register_slidemodel(Item, control_template='agenda/control_item.html')
# TODO: put this in another file

View File

@ -0,0 +1,17 @@
{% load staticfiles %}
{% load i18n %}
<ul style="line-height: 180%">
{% for slide in slides.get_items %}
<li class="{% if slide.active %}activeline{% endif %}">
<a href="{% url projector_activate_slide slide.sid %}" class="activate_link {% if slide.active %}active{% endif %}">
<div></div>
</a>
{% for p in slide.get_ancestors %}
<span class="indentation">&nbsp;</span>
{% endfor %}
<a href="{% url item_edit slide.id %}">{{ slide }}</a>
</li>
{% endfor %}
</ul>

View File

@ -7,7 +7,7 @@
<a href="{% url projector_activate_slide slide.sid %}" class="activate_link {% if slide.active %}active{% endif %}">
<div></div>
</a>
<a href="{% url projector_edit_slide slide.id %}">{{ slide }}</a>
<a href="{{ slide.get_absolute_url }}">{{ slide }}</a>
</li>
{% endfor %}
</ul>

View File

@ -39,11 +39,6 @@ urlpatterns = patterns('projector.views',
name='projector_activate_summary',
),
url(r'^edit/(?P<pk>\d+)/$',
ItemUpdate.as_view(),
name='projector_edit_slide',
),
url(r'^new/$',
CreateView.as_view(
success_url='projector_control',