schedule.underscore 2.19 KB
Newer Older
cewing committed
1
  <table class="ccx-schedule">
2 3 4 5 6 7
    <thead>
      <tr>
        <th><%- gettext('Unit') %></th>
        <th><%- gettext('Start Date') %></th>
        <th><%- gettext('Due Date') %></th>
        <th><a href="#" id="remove-all">
8
          <i class="fa fa-remove"></i> <%- gettext('remove all') %>
9 10 11 12 13 14 15
        </a></th>
      </tr>
    </thead>
    <tbody>
      <% _.each(chapters, function(chapter) { %>
        <tr class="chapter collapsed" data-location="<%= chapter.location %>" data-depth="1">
          <td class="unit">
16
            <a href="#"><i class="fa fa-caret-right toggle-collapse"></i></a>
17 18 19 20 21
            <%= chapter.display_name %>
          </td>
          <td class="date start-date"><a><%= chapter.start %></a></td>
          <td class="date due-date"><a><%= chapter.due %></a></td>
          <td><a href="#" class="remove-unit">
22
            <i class="fa fa-remove"></i> <%- gettext('remove') %>
23 24 25
          </a></td>
        </tr>
        <% _.each(chapter.children, function(child) { %>
cewing committed
26
          <tr class="sequential collapsed" data-depth="2"
27 28
              data-location="<%= chapter.location %> <%= child.location %>">
            <td class="unit">
29
              <a href="#"><i class="fa fa-caret-right toggle-collapse"></i></a>
30 31 32 33 34
              <%= child.display_name %>
            </td>
            <td class="date start-date"><a><%= child.start %></a></td>
            <td class="date due-date"><a><%= child.due %></a></td>
            <td><a href="#" class="remove-unit">
35
              <i class="fa fa-remove"></i> <%- gettext('remove') %>
36 37 38 39 40 41 42 43 44
            </a></td>
          </tr>
          <% _.each(child.children, function(subchild) { %>
            <tr class="vertical" data-dapth="3"
                data-location="<%= chapter.location %> <%= child.location %> <%= subchild.location %>">
              <td class="unit">&nbsp;<%= subchild.display_name %></td>
              <td class="date start-date"><a><%= subchild.start %></a></td>
              <td class="date due-date"><a><%= subchild.due %></a></td>
              <td><a href="#" class="remove-unit">
45
                <i class="fa fa-remove"></i> <%- gettext('remove') %>
46 47 48 49 50 51 52
              </a></td>
          <% }); %>
        <% }); %>
      <% }); %>
    </tbody>
  </table>