DotaNoobs main site.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
4.0 KiB

11 years ago
  1. {% extends "layout.html" %}
  2. {% block title %}Events - DotaNoobs {% endblock %}
  3. {% block content %}
  4. <div class="uk-grid" data-uk-grid-margin>
  5. <div class="uk-width-1-1">
  6. <h2 class="">Events</h2>
  7. </div>
  8. <!--Main content area -->
  9. <div class="uk-width-1-1 uk-panel">
  10. <ul class="uk-tab" data-uk-tab="{connect:'#events_table'}">
  11. <li class="uk-active"><a href="">Active</a></li>
  12. <li><a href="">Upcoming</a></li>
  13. <li><a href="">Expired</a></li>
  14. </ul>
  15. <ul id="events_table" class="uk-switcher uk-margin">
  16. <li>
  17. <table class='uk-table uk-table-hover'>
  18. <thead>
  19. <th>Event</th>
  20. <th>Type</th>
  21. <th>Points</th>
  22. <th>Starts</th>
  23. <th>Ends</th>
  24. </thead>
  25. <tbody>
  26. {% for event in active %}
  27. <tr url="{{ url_for('show_event', eventid=event.id) }}">
  28. <td>{{ event.name }}</td>
  29. <td>{{ event.type | event_badge | safe }}</td>
  30. <td>{{ event.points }}</td>
  31. <td class='date'>{{ event.start_time | js_datetime }}</td>
  32. <td class='date'>{{ event.end_time | js_datetime }}</td>
  33. </tr>
  34. {% endfor %}
  35. </tbody>
  36. </table>
  37. </li>
  38. <li>
  39. <table class='uk-table uk-table-hover'>
  40. <thead>
  41. <th>Event</th>
  42. <th>Type</th>
  43. <th>Points</th>
  44. <th>Starts</th>
  45. <th>Ends</th>
  46. </thead>
  47. <tbody>
  48. {% for event in upcoming %}
  49. <tr url="{{ url_for('show_event', eventid=event.id) }}">
  50. <td>{{ event.name }}</td>
  51. <td>{{ event.type | event_badge | safe }}</td>
  52. <td>{{ event.points }}</td>
  53. <td class='date'>{{ event.start_time | js_datetime }}</td>
  54. <td class='date'>{{ event.end_time | js_datetime }}</td>
  55. </tr>
  56. {% endfor %}
  57. </tbody>
  58. </table>
  59. </li>
  60. <li>
  61. <table class='uk-table uk-table-hover'>
  62. <thead>
  63. <th>Event</th>
  64. <th>Type</th>
  65. <th>Points</th>
  66. <th>Starts</th>
  67. <th>Ends</th>
  68. </thead>
  69. <tbody>
  70. {% for event in expired %}
  71. <tr url="{{ url_for('show_event', eventid=event.id) }}">
  72. <td>{{ event.name }}</td>
  73. <td>{{ event.type | event_badge | safe }}</td>
  74. <td>{{ event.points }}</td>
  75. <td class='date'>{{ event.start_time | js_datetime }}</td>
  76. <td class='date'>{{ event.end_time | js_datetime }}</td>
  77. </tr>
  78. {% endfor %}
  79. </tbody>
  80. </table>
  81. </li>
  82. </ul>
  83. </div>
  84. </div>
  85. {% endblock %}
  86. {% block pagescripts %}
  87. <script src="//cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.13.3/jquery.tablesorter.min.js"></script>
  88. <script>
  89. $(document).ready(function() {
  90. $('#events_table table thead th').prepend("<i class='uk-icon-sort uk-display-inline'> </i>");
  91. $('#events_table table').tablesorter();
  92. $('#events_table table tbody tr').click(function() {
  93. window.location = $(this).attr('url');
  94. });
  95. });
  96. </script>
  97. {% endblock %}