Files
edx-platform/lms/templates/courseware/accordion.html
Carlos Andrés Rocha 3d5b571a7e Move courseware related templates to their own folder
Fix moved links
2012-11-19 12:45:46 -05:00

24 lines
895 B
HTML

<%! from django.core.urlresolvers import reverse %>
<%def name="make_chapter(chapter)">
<div class="chapter">
<h3 ${' class="active"' if 'active' in chapter and chapter['active'] else ''}><a href="#">${chapter['display_name']}</a>
</h3>
<ul>
% for section in chapter['sections']:
<li class="${'active' if 'active' in section and section['active'] else ''} ${'graded' if 'graded' in section and section['graded'] else ''}">
<a href="${reverse('courseware_section', args=[course_id, chapter['url_name'], section['url_name']])}">
<p>${section['display_name']}</p>
<p class="subtitle">${section['format']} ${"due " + section['due'] if 'due' in section and section['due'] != '' else ''}</p>
</a>
</li>
% endfor
</ul>
</div>
</%def>
% for chapter in toc:
${make_chapter(chapter)}
% endfor