collections.html 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. {% extends "layout.html" %}
  2. {% block main %}
  3. <h1>{{ title }}</h1>
  4. <table id="example" class="table table-striped table-bordered" cellspacing="0" width="60%">
  5. <thead>
  6. <tr>
  7. <th>數量</th>
  8. <th>標題</th>
  9. <th>順序</th>
  10. <th>顯示</th>
  11. <th style="text-align:center;width:100px;">新增 <button type="button" data-func="dt-add" class="btn btn-success btn-xs dt-add">
  12. <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
  13. </button></th>
  14. </tr>
  15. </thead>
  16. {% for idx in range(0, length) %}
  17. <tbody>
  18. <tr>
  19. <td>{{ idx }}</td>
  20. <td>{{ collections[idx].title }}</td>
  21. <td>1</td>
  22. <td>on</td>
  23. <td>
  24. <div>
  25. <a class="btn btn-secondary btn-sm m-1" href="{{ url_for('editor.editor', url=collections[idx].url) }}">編輯</a>
  26. <form action="{{ url_for('editor.remove', url=collections[idx].url) }}" method="POST">
  27. <input class="btn btn-danger" type="submit" value="Delete">
  28. </form>
  29. </div>
  30. </td>
  31. </tr>
  32. </tbody>
  33. {% endfor %}
  34. </table>
  35. {% endblock main %}