|
@@ -0,0 +1,69 @@
|
|
|
+{% extends "layout.html" %}
|
|
|
+{% block main %}
|
|
|
+<h1>{{ title }}</h1>
|
|
|
+{% for part, stores in stores_data.items() %}
|
|
|
+ <form action="{{ url_for('store_locations.create') }}" method="POST" enctype="multipart/form-data">
|
|
|
+ {% if part == "north" %}
|
|
|
+ <h2>北部門市</h2>
|
|
|
+ {% elif part == "central" %}
|
|
|
+ <h2>中部門市</h2>
|
|
|
+ {% elif part == "south" %}
|
|
|
+ <h2>南部門市</h2>
|
|
|
+ {% elif part == "east" %}
|
|
|
+ <h2>東部門市</h2>
|
|
|
+ {% endif %}
|
|
|
+ <table id="example" class="table table-striped table-bordered" cellspacing="0" width="60%">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>數量</th>
|
|
|
+ <th>區域</th>
|
|
|
+ <th>門市</th>
|
|
|
+ <th>營業時間</th>
|
|
|
+ <th>門市電話</th>
|
|
|
+ <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 store in stores %}
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td>{{ loop.index }}</td>
|
|
|
+ <td>
|
|
|
+ <input name="title-{{ loop.index }}" class="form-control form-control-lg" value="{{ store.title }}">
|
|
|
+ <input name="type-{{ loop.index }}" type="hidden" value="{{ store.type }}">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input name="store-{{ loop.index }}" class="form-control form-control-lg" value="{{ store.store }}">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input name="hour-{{ loop.index }}" class="form-control form-control-lg" value="{{ store.hour }}">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input name="phone-{{ loop.index }}" class="form-control form-control-lg" value="{{ store.phone }}">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input name="location-{{ loop.index }}" class="form-control form-control-lg" value="{{ store.location }}">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input name="parking-{{ loop.index }}" class="form-control form-control-lg" value="{{ store.parking }}">
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ {% for img_src in store.imgs %}
|
|
|
+ <img src="http://127.0.0.1:1313/{{ img_src }}" width="80px" height="50px">
|
|
|
+ <input name="img-{{ loop.index }}" type='hidden' value="{{ img_src }}">
|
|
|
+ <a class="btn btn-secondary btn-sm m-1" href="{{ url_for('store_locations.remove_img', type=store.type, src=img_src) }}">
|
|
|
+ 移除
|
|
|
+ </a>
|
|
|
+ {% endfor %}
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ {% endfor %}
|
|
|
+ </table>
|
|
|
+</form>
|
|
|
+{% endfor %}
|
|
|
+{% endblock main %}
|