running.html 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {% extends "bootstrap/base.html" %}
  2. {% block title %}Larigira - Upcoming events{%endblock%}
  3. {%macro print_action(aid, action)%}
  4. <span class="action-nick" data-actionid="{{aid}}" data-kind="{{action['kind']}}">
  5. {% if 'nick' in action %}
  6. {{action['nick']}}
  7. {% else %}
  8. {{ action['kind'] }}
  9. {% endif %}
  10. {%endmacro%}
  11. {%macro print_actions(actions)%}
  12. {% if actions|length == 0 %}
  13. <span class="action-none">NOTHING</span>
  14. {% else %}
  15. <ol>
  16. {% for aid, spec in actions.items() %}
  17. <li>{{print_action(aid, spec)}}</li>
  18. {% endfor %}
  19. </li>
  20. {% endif %}
  21. {%endmacro%}
  22. {% block content %}
  23. <h1>Upcoming events</h2>
  24. <div class="container-fluid">
  25. <table class="upcoming-events table table-striped">
  26. <thead>
  27. <tr>
  28. <th>ID</th>
  29. <th>Running time</th>
  30. <th>Action</th>
  31. </tr>
  32. </thead>
  33. {% for id, event in audiogens %}
  34. <tr>
  35. <td>{{id}}</td>
  36. <td>{{event['running_time']}}</td>
  37. <td>{{print_actions(event['timespec']['actions'])}}</td>
  38. </tr>
  39. {%endfor%}
  40. </table>
  41. </div>
  42. {% endblock content %}
  43. {# vim: set ts=2 sw=2 noet: #}