location.tpl.php 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * @file
  4. * Template for displaying single location.
  5. */
  6. ?>
  7. <div class="location vcard" itemscope itemtype="http://schema.org/PostalAddress">
  8. <div class="adr">
  9. <?php if (!empty($name)): ?>
  10. <span class="fn" itemprop="name"><?php print $name; ?></span>
  11. <?php endif; ?>
  12. <?php if (!empty($street) || !empty($additional)): ?>
  13. <div class="street-address">
  14. <span itemprop="streetAddress"><?php print $street; ?></span>
  15. <?php if (!empty($additional)): ?>
  16. <span class="additional" itemprop="streetAddress">
  17. <?php print ' ' . $additional; ?>
  18. </span>
  19. <?php endif; ?>
  20. </div>
  21. <?php endif; ?>
  22. <?php if (!empty($postal_code)): ?>
  23. <span class="postal-code" itemprop="postalCode"><?php print $postal_code; ?></span>
  24. <?php endif; ?>
  25. <?php if (!empty($city)): ?>
  26. <span class="locality" itemprop="addressLocality">
  27. <?php print $city; ?>
  28. </span>
  29. <?php if (!empty($province)) : ?>
  30. <?php print ', '; ?>
  31. <?php endif; ?>
  32. <?php endif; ?>
  33. <?php if (!empty($province)): ?>
  34. <span class="region" itemprop="addressRegion"><?php print $province_print; ?></span>
  35. <?php endif; ?>
  36. <?php if (!empty($country_name)): ?>
  37. <div class="country-name" itemprop="addressCountry"><?php print $country_name; ?></div>
  38. <?php endif; ?>
  39. <?php if (!empty($email)): ?>
  40. <div class="email">
  41. <abbr class="type" title="email"><?php print t("Email address"); ?>:</abbr>
  42. <span><a href="mailto:<?php print $email; ?>" itemprop="email"><?php print $email; ?></a></span>
  43. </div>
  44. <?php endif; ?>
  45. <?php if (!empty($phone)): ?>
  46. <div class="tel">
  47. <abbr class="type" title="voice"><?php print t("Phone"); ?>:</abbr>
  48. <span class="value" itemprop="telephone"><?php print $phone; ?></span>
  49. </div>
  50. <?php endif; ?>
  51. <?php if (!empty($fax)): ?>
  52. <div class="tel">
  53. <abbr class="type" title="fax"><?php print t("Fax"); ?>:</abbr>
  54. <span itemprop="faxNumber"><?php print $fax; ?></span>
  55. </div>
  56. <?php endif; ?>
  57. <?php
  58. // "Geo" microformat, see http://microformats.org/wiki/geo.
  59. ?>
  60. <?php if (isset($latitude) && isset($longitude)): ?>
  61. <?php
  62. // Assume that 0, 0 is invalid.
  63. ?>
  64. <?php if ($latitude != 0 || $longitude != 0): ?>
  65. <span class="geo"><abbr class="latitude" title="<?php print $latitude; ?>"><?php print $latitude_dms; ?></abbr>, <abbr
  66. class="longitude" title="<?php print $longitude; ?>"><?php print $longitude_dms; ?></abbr></span>
  67. <?php endif; ?>
  68. <?php endif; ?>
  69. </div>
  70. <?php if (!empty($map_link)): ?>
  71. <div class="map-link">
  72. <?php print $map_link; ?>
  73. </div>
  74. <?php endif; ?>
  75. </div>
  76. <?php if (!empty($province_name) || (!empty($country))): ?>
  77. <div class="location-hidden">
  78. <?php if (!empty($province_name)): ?><?php print $province_name; ?><?php endif; ?>
  79. <?php if (!empty($country)): ?><?php print strtoupper($country); ?><?php endif; ?>
  80. </div>
  81. <?php endif; ?>