business_detail_OLD.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. {% extends "base.html" %}
  2. {% block title %} {{ business }} -{% endblock %}
  3. {% block loadtags %}setupMap();" onunload="GUnload();"{% endblock %}
  4. {% block javascript %}
  5. <link rel="stylesheet" href="{{MEDIA_URL}}css/new_styles.css" type="text/css" />
  6. <link href="{{MEDIA_URL}}css/business_directory.css" rel="stylesheet" type="text/css">
  7. <script src="http://maps.google.com/maps?file=api&v=2&key={{gmaps_api_key}}" type="text/javascript"></script>
  8. <script src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/release/src/markermanager.js"></script>
  9. <script type="text/javascript">
  10. var map = null;
  11. function setupMap() {
  12. if (GBrowserIsCompatible()) {
  13. var point = new GLatLng({{business.point.lat_lon}});
  14. map = new GMap2(document.getElementById("map-canvas"));
  15. map.setCenter(point, 12);
  16. map.setUIToDefault();
  17. map.addOverlay(new GMarker(point));
  18. }
  19. }
  20. </script>
  21. {% endblock %}
  22. {% block content %}
  23. <td colspan="2" align="left" valign="top" bgcolor="#FFFFFF" width="565">
  24. <div class="business_header">
  25. {% load convert_tags %}
  26. {% if business.logo %}
  27. <div class="businesslogo">{% thumbnail business.logo.url "150" %}</div>
  28. {% endif%}
  29. <div class="businessname">
  30. <span class="businesshead">{{business}}</span>
  31. {% if business.url %}
  32. <a href="{{business.url}}" target="_blank" class="website"><br>
  33. {{business.url|cut:"http://www."|cut:"/"}}</a><br>
  34. {% endif %}<br>
  35. {% if menus %}
  36. {% for menu in menus %}
  37. {% if menu.sample %}
  38. <p class="menu"><a href="{{menu.file.url}}" alt="{{business}} menu"><img border=0 src="{{MEDIA_URL}}images/menus/menu_small.gif" target="_blank" alt="Menu"/></a></p>
  39. {% endif %}
  40. {% endfor %}
  41. {% endif %}
  42. <span class="tagline">{{business.brief}}</span>
  43. </div>
  44. <ul class="info" >
  45. {% if business.po_box %}<li>P.O.Box {{business.po_box}}</li>{% endif %}
  46. {% if business.point %}<li>{{business.point.address}}<br>{{business.point.town}}&nbsp;{{business.point.zipcode }}</li>{% endif %}
  47. {% if business.phone %}<li><em>{{business.phone_title}}</em> {{business.phone}}</li>{% endif %}
  48. {% if business.phone_2%}<li><em>{{business.phone_2_title}}</em> {{business.phone_2}}</li>{% endif %}
  49. {% if business.phone_3 %}<li><em>{{business.phone_3_title}}</em> {{business.phone_3}}</li>{% endif %}
  50. {% if business.mobile_phone %}<li><em>Mobile phone</em> {{business.mobile_phone}}</li>{% endif %}
  51. {% if business.fax %}<li><em>Fax</em> {{business.fax}}</li>{% endif %}
  52. {% if business.email %}<li>{{business.email|urlize}}</li>{% endif %}
  53. </ul>
  54. {% if business.payment_accepted.all %}
  55. <ul class="payment_list">
  56. <b>Payment methods accepted:</b><br>
  57. {% for payment in business.payment_accepted.all %}
  58. <li><img src="{{MEDIA_URL}}{{payment.icon}}" alt="{{payment}}" title="{{payment}}"></li>
  59. {% endfor %}
  60. </ul>
  61. {% endif %}
  62. </div>
  63. <div class="businessdetails">
  64. <h3>Hours:</h3>
  65. {% if hours %}
  66. {% for h in hours %}
  67. <div class="hours">
  68. <h5 class="table on last">{% if h.title %}{{h.title}}{%else%}Business{%endif%} </h5>
  69. <table class="place_hours">
  70. <tr>
  71. <th class="day">Monday</th>
  72. {% if h.mon_open %}
  73. <td class="open_time">{{h.mon_open|time:"f a"}} &mdash;</td>
  74. {% if h.mon_close %}<td class="close_time">{{h.mon_close|time:"f a"}}</td>{% endif%}
  75. {% else %}{% if h.mon_by_appt %}
  76. <td class="by_appt" colspan=2>By Appointment</td>
  77. {% else %}
  78. <td class="closed" colspan=2>Closed</td>
  79. {% endif %}
  80. {% endif %}
  81. </tr>
  82. <tr>
  83. <th class="day">Tuesday</th>
  84. {% if h.tue_open %}
  85. <td class="open_time">{{h.tue_open|time:"f a"}} &mdash;</td>
  86. {% if h.tue_close %}<td class="close_time">{{h.tue_close|time:"f a"}}</td>{% endif%}
  87. {% else %}{% if h.tue_by_appt %}
  88. <td class="by_appt" colspan=2>By Appointment</td>
  89. {% else %}
  90. <td class="closed" colspan=2>Closed</td>
  91. {% endif %}
  92. {% endif %}
  93. </tr>
  94. <tr>
  95. <th class="day">Wednesday</th>
  96. {% if h.wed_open %}
  97. <td class="open_time">{{h.wed_open|time:"f a"}} &mdash;</td>
  98. {% if h.wed_close %}<td class="close_time">{{h.wed_close|time:"f a"}}</td>{% endif%}
  99. {% else %}{% if h.wed_by_appt %}
  100. <td class="by_appt" colspan=2>By Appointment</td>
  101. {% else %}
  102. <td class="closed" colspan=2>Closed</td>
  103. {% endif %}
  104. {% endif %}
  105. </tr>
  106. <tr>
  107. <th class="day">Thursday</th>
  108. {% if h.thu_open %}
  109. <td class="open_time">{{h.thu_open|time:"f a"}} &mdash;</td>
  110. {% if h.thu_close %}<td class="close_time">{{h.thu_close|time:"f a"}}</td>{% endif%}
  111. {% else %}{% if h.thu_by_appt %}
  112. <td class="by_appt" colspan=2>By Appointment</td>
  113. {% else %}
  114. <td class="closed" colspan=2>Closed</td>
  115. {% endif %}
  116. {% endif %}
  117. </tr>
  118. <tr>
  119. <th class="day">Friday</th>
  120. {% if h.fri_open %}
  121. <td class="open_time">{{h.fri_open|time:"f a"}} &mdash;</td>
  122. {% if h.fri_close %}<td class="close_time">{{h.fri_close|time:"f a"}}</td>{% endif%}
  123. {% else %}{% if h.fri_by_appt %}
  124. <td class="by_appt" colspan=2>By Appointment</td>
  125. {% else %}
  126. <td class="closed" colspan=2>Closed</td>
  127. {% endif %}
  128. {% endif %}
  129. </tr>
  130. <tr>
  131. <th class="day">Saturday</th>
  132. {% if h.sat_open %}
  133. <td class="open_time">{{h.sat_open|time:"f a"}} &mdash;</td>
  134. {% if h.sat_close %}<td class="close_time">{{h.sat_close|time:"f a"}}</td>{% endif%}
  135. {% else %}{% if h.sat_by_appt %}
  136. <td class="by_appt" colspan=2>By Appointment</td>
  137. {% else %}
  138. <td class="closed" colspan=2>Closed</td>
  139. {% endif %}
  140. {% endif %}
  141. </tr>
  142. <tr>
  143. <th class="day">Sunday</th>
  144. {% if h.sun_open %}
  145. <td class="open_time">{{h.sun_open|time:"f a"}} &mdash;</td>
  146. {% if h.sun_close %}<td class="close_time">{{h.sun_close|time:"f a"}}</td>{% endif%}
  147. {% else %}{% if h.sun_by_appt %}
  148. <td class="by_appt" colspan=2>By Appointment</td>
  149. {% else %}
  150. <td class="closed" colspan=2>Closed</td>
  151. {% endif %}
  152. {% endif %}
  153. </tr>
  154. {% if h.additional %}
  155. <tr><p>{{h.additional}}</p></tr>
  156. {% endif %}
  157. </table>
  158. </div>
  159. {% endfor %}
  160. {% else %}
  161. <p>No hours available</p>
  162. {% endif %}<br>
  163. <div><h3>Features:</h3></div>
  164. <ul class="featurelist">
  165. {% for f in business.features.all %}
  166. <li class="featurelist">{{f}}</li>
  167. {% empty %}
  168. <p>No features available</p>
  169. {% endfor %}
  170. </ul>
  171. <h3>Directions:</h3>
  172. <div>
  173. {% if business.point %}
  174. <div id="map-canvas" style="width: 250px; height: 200px; margin:5px;"></div>
  175. {% endif %}
  176. {% if business.directions %}
  177. <p class="directions">{{business.directions}}</p>
  178. {% endif %}
  179. </div>
  180. {% if business.point %}
  181. <div class="map-buttons">
  182. <p>Choose a site to get complete directions:</p>
  183. <ul>
  184. <li><a href="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q={{business.point.lat_lon}}&ie=UTF8&t=h&z=17" target="_blank">
  185. <img src="{{MEDIA_URL}}images/maps/google_maps_icon.gif" alt="Get directions from Google Maps" width="50px" height="50px"/></a></li>
  186. <li><a href="http://maps.yahoo.com/#mvt=m&lat={{latitude}}&lon={{longitude}}&zoom=16&q1={{business.point.address|iriencode}}%20{{business.point.town|iriencode}}%20{{business.point.zipcode}}" target="_blank">
  187. <img src="{{MEDIA_URL}}images/maps/yahoo.gif" alt="Get directions from Yahoo! Local" width="50px" height="50px"/></a></li>
  188. <li><a href="http://www.bing.com/maps/?v=2&where1={{business.point.address|iriencode}}%20{{business.point.town|iriencode}}%20{{business.point.zipcode}}&encType=1" target="_blank">
  189. <img src="{{MEDIA_URL}}images/maps/Bing-Icon.jpeg" alt="Get directions from Bing!" width="50px" height="50px"/></a></li>
  190. </ul>
  191. {% endif %}
  192. </div>
  193. </div>
  194. <div class="business_photos">
  195. <h4 style="padding-top:0px; margin-top:0px"><br>
  196. {% if business.businessphoto_set.all %}
  197. {% for photo in business.businessphoto_set.all %}
  198. {% thumbnail photo.photo "250" %}<br>
  199. {{photo.caption}} &nbsp;<br>
  200. {% endfor %}
  201. {% endif %}
  202. <br></h4>
  203. </div>
  204. <div class="writeupdiv" align="left">
  205. <div class="writeup_copy">
  206. {% load markup typogrify %}
  207. {{business.description|typogrify|markdown|urlize}}
  208. <p><span class="writeup_copy"><a class="return" href="{% url mk-index %}">Return to Business Directory</a></span> </p>
  209. <hr size="1"></div>
  210. </div>
  211. </div>
  212. </td>
  213. {% endblock %}