浏览代码

Amend location page to include styling

Edd Baldry 8 年之前
父节点
当前提交
0d5ce5a1e9
共有 1 个文件被更改,包括 10 次插入15 次删除
  1. 10 15
      bakerydemo/templates/locations/location_page.html

+ 10 - 15
bakerydemo/templates/locations/location_page.html

@@ -25,7 +25,13 @@
         <div class="row">
             <div class="col-md-7">
                 <h1>{{ page.title }}</h1>
-                <p class="stand-first">{{ page.subtitle }}</p>
+                <p class="stand-first">
+                {% if page.is_open %}
+                  This location is currently open
+                {% else %}
+                  Sorry, this location is currently closed
+                {% endif %}
+                </p>
             </div>
         </div>
     </div>
@@ -41,10 +47,10 @@
                 <div class="intro col-md-7"><p>{{ page.introduction }}</p></div>
             {% endif %}
 
-            {% if page.opening_hours %}
+            {% if page.operating_hours %}
                 <div class="col-md-4 col-md-offset-1 location-opening">
                 <h3>Opening hours</h3>
-                {% for hours in page.opening_hours %}
+                {% for hours in page.operating_hours %}
                   <time itemprop="openingHours" datetime="{{ hours }}" class="location-time">
                     <span class="day">{{ hours.day }}</span>:
                     <span class="hours">
@@ -72,7 +78,6 @@
       <h3>Address</h3>
         <address>{{ page.address|linebreaks }}</address>
     </div>
-    {# @TODO align address to opening hours? #}
   </div>
 
   <div class="map-container">
@@ -80,16 +85,6 @@
   </div>
 </div>
 
-    {% if page.is_open %}
-      Open Now!
-    {% else %}
-      Currently Closed
-    {% endif %}
-
-    {% for hours in page.operating_hours %}
-        <li>{{ hours }}</li>
-    {% endfor %}
-
 <div class="container">
   <div class="row">
     <div class="col-md-7 location-body">
@@ -107,7 +102,7 @@
               lng: {{long}}
           },
           zoom: 15,
-          scrollwheel:  false
+          scrollwheel: false
         });
         var marker = new google.maps.Marker({
           position: {