Commits

ouxuedong  committed 5db5810

add coupon templates

  • Participants
  • Parent commits f9e5582

Comments (0)

Files changed (3)

File src/templates/coupon.html

+{% extends "layout.html" %}
+
+{% from '_macros.html' import user_list %}
+
+{% block body -%}
+
+  <div id="maincont" class="ovfl-hidden">
+    <section class="leftsec fl">
+    
+	  <section class="video rel"> 
+
+      <img src="{{ url_for('static', filename='img/'+coupon.pic_img) }}" width="691" height="391" alt="img">
+      <div class="label"> {{ coupon.discount }}% <br /><span>off</span>
+      </div>
+      </section>
+      
+      <section class="featureoffer ovfl-hidden" style="width:510px;">
+      <h2 class="head2">{{ coupon.desc }}</h2>
+      <span class="time"></span>
+      <div class="social">
+            <ul class="socialicon2 fl reset ovfl-hidden">
+            <li>
+            </ul>
+            <div class="rigsec fr" style="margin-top:25px;"> <a href="{{ url_for('downcoupon', couponid=coupon.key(), phonenum='13430399770')}}" class="greenbtn"><span>下载优惠券</span></a> </div>
+            <div class="clr"></div>
+<br />
+<div class="ovfl-hidden"> 
+            <strong>优惠详情:<br>
+                {{ coupon.desc }}
+                <br/>
+                {{ coupon.place }}
+            </strong>
+            </div>
+                  
+
+<br>
+<br>
+	
+<br>
+<br>
+-
+  <div class="rigsec fr" style="margin-top:25px;"> <a href="{{ url_for('downcoupon', couponid=coupon.key(), phonenum='13430399770')}}" class="greenbtn"><span>下载优惠券</span></a> </div>
+ <div class="clr"></div> 
+  <nav class="pagination ovfl-hidden">
+        </nav>          
+          </div>
+      
+      </section>
+    </section>
+
+</div>
+
+{%- endblock %}

File src/templates/coupons.html

+{% extends "layout.html" %}
+{% from '_macros.html' import all_coupon_list %}
+
+{% block body -%}
+
+{{ all_coupon_list(coupons) }}
+
+{%- endblock %}

File src/templates/create_coupon.html

+{% extends "layout.html" %}
+
+{% from '_macros.html' import show_errors %}
+
+{% block title -%}Create Coupon{%- endblock %}
+
+{% block body %}
+<h2>Create Coupon</h2>
+<form action="{{ url_for('create_coupon') }}" method='post'>
+    {{ show_errors(g.errmsgs) }}
+    <table>
+        <tr>
+            <td>空置活动主题:</td>
+            <td><input name='title' value="{{ Title }}" /></td>
+        </tr>
+        <tr>
+            <td>活动开始时间:</td>
+            <td><input name='start' value="{{ start }}" placeholder='2000-06-01 18:00'/></td>
+        </tr>
+        <tr>
+            <td>活动地点:</td>
+            <td><input name='place' value="{{ Place }}" /></td>
+        </tr>
+        <tr>
+            <td>活动价格:</td>
+            <td><input name='price' value="{{ Price }}" /></td>
+        </tr>
+        <tr>
+            <td>相关图片:</td>
+            <td><input name='pic_img' value="{{ pic_img }}" /></td>
+        </tr>
+        <tr>
+            <td>折扣率:</td>
+            <td><input name='discount' value="{{ discount }}" /></td>
+        </tr>
+        <tr>
+            <td>城市:</td>
+            <td><input name='coupon_area' value="{{ coupon_area }}" /></td>
+        </tr>
+        <tr>
+            <td>优惠详情描述:</td>
+            <td><input name='desc' value="{{ desc }}" /></td>
+        </tr>
+
+        <tr>
+            <td></td>
+            <td><input type='submit' value='Create Coupon' /></td>
+        </tr>
+    </table>
+</form>
+{%- endblock %}