|
@@ -1,43 +1 @@
|
|
|
-{% extends "layout.html" %}
|
|
|
-{% block main %}
|
|
|
-<h1>{{ title }}</h1>
|
|
|
-{% for content in contents %}
|
|
|
- <form action="{{ url_for('home.update', page='home', section_class=content.sectionClass) }}" method="POST">
|
|
|
- <table id="example" class="table table-striped table-bordered" cellspacing="0" width="60%">
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>數量</th>
|
|
|
- <th>類型</th>
|
|
|
- <th>內容</th>
|
|
|
- <th style="text-align:center;width:100px;">
|
|
|
- <input class="btn btn-primary" type="submit" value="提交">
|
|
|
- </th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- {% for key, value in content.items() %}
|
|
|
- {% if key != 'sectionClass' %}
|
|
|
- {% for data in value %}
|
|
|
- <tbody>
|
|
|
- <tr>
|
|
|
- <td>{{ loop.index }}</td>
|
|
|
- <td>{{ key }}</td>
|
|
|
- <td>
|
|
|
- <input name="{{ key }}-{{ loop.index }}" class="form-control form-control-lg" value="{{ data }}">
|
|
|
- </td>
|
|
|
- <td>
|
|
|
- <div>
|
|
|
- <a class="btn btn-secondary btn-sm m-1" href="#">編輯</a>
|
|
|
- <form action="#" method="POST">
|
|
|
- <input class="btn btn-danger" type="submit" value="刪除">
|
|
|
- </form>
|
|
|
- </div>
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- {% endfor %}
|
|
|
- {% endif %}
|
|
|
- {% endfor %}
|
|
|
- </table>
|
|
|
-</form>
|
|
|
-{% endfor %}
|
|
|
-{% endblock main %}
|
|
|
+{% extends "tables/manage_table.html" %}
|