add subsection edit page to the project with a shared 'unit' widget that will render out unit lists. Both edit_subsection and overview.html will share this widget
This commit is contained in:
27
cms/templates/widgets/units.html
Normal file
27
cms/templates/widgets/units.html
Normal file
@@ -0,0 +1,27 @@
|
||||
<%! from django.core.urlresolvers import reverse %>
|
||||
|
||||
<!--
|
||||
This def will enumerate through a passed in subsection and list all of the units
|
||||
-->
|
||||
<%def name="enum_units(subsection)">
|
||||
<ol>
|
||||
% for unit in subsection.get_children():
|
||||
<li class="leaf">
|
||||
<div class="section-item">
|
||||
<a href="${reverse('edit_unit', args=[unit.location])}" class="private-item">
|
||||
<span class="${unit.category}-icon"></span>${unit.display_name} <span class="private-tag">- private</span>
|
||||
</a>
|
||||
<div class="item-actions">
|
||||
<a href="${reverse('delete_unit', args=[unit.location])}" classs="edit-button wip"><span class="delete-icon"></span></a>
|
||||
<a href="#" class="drag-handle wip"></a>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
% endfor
|
||||
<li>
|
||||
<a href="#" class="new-unit-item wip">
|
||||
<span class="new-unit-icon"></span>New Unit
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
</%def>
|
||||
Reference in New Issue
Block a user