/[drupal]/contributions/modules/location/location.tpl.php
ViewVC logotype

Contents of /contributions/modules/location/location.tpl.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Tue Jul 28 19:58:19 2009 UTC (4 months ago) by bdragon
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +13 -1 lines
File MIME type: text/x-php
Fix bug preventing hcards from working.
By popular demand, add phone and fax support. (hi skyred)
1 <div class="location vcard"><div class="adr">
2 <span class="fn"><?php echo $name; ?></span>
3 <?php if ($street) {?>
4 <div class="street-address"><?php
5 echo $street;
6 if ($additional) {
7 echo ' '. $additional;
8 }
9 ?></div>
10 <?php }?>
11 <?php
12 if ($city || $province || $postal_code) {
13 $city_province_postal = array();
14
15 if ($city) {
16 $city_province_postal[] = '<span class="locality">'. $city .'</span>';
17 }
18 if ($province) {
19 $city_province_postal[] = '<span class="region">'. $province .'</span>';
20 }
21 if ($postal_code) {
22 $city_province_postal[] = '<span class="postal-code">'. $postal_code .'</span>';
23 }
24
25 echo implode(', ', $city_province_postal);
26 }
27 ?>
28 <?php if ($country_name) { ?>
29 <div class="country-name"><?php echo $country_name; ?></div>
30 <?php } ?>
31 <?php if (isset($phone) && $phone): ?>
32 <div class="tel">
33 <abbr class="type" title="voice"><?php print t("Phone")?>:</abbr>
34 <span class="value"><?php print $phone; ?></span>
35 </div>
36 <?php endif; ?>
37 <?php if (isset($fax) && $fax): ?>
38 <div class="tel">
39 <abbr class="type" title="fax"><?php print t("Fax");?>:</abbr>
40 <span><?php print $fax; ?></span>
41 </div>
42 <?php endif; ?>
43 <?php
44 // "Geo" microformat, see http://microformats.org/wiki/geo
45 if ($latitude && $longitude) {
46 // Assume that 0, 0 is invalid.
47 if ($latitude != 0 || $longitude != 0) {
48 ?>
49 <span class="geo"><abbr class="latitude" title="<?php echo $latitude; ?>"><?php echo $latitude_dms; ?></abbr>, <abbr class="longitude" title="<?php echo $longitude; ?>"><?php echo $longitude_dms; ?></abbr></span>
50 <?php
51 }
52 }
53 ?>
54 </div></div>
55 <?php echo $map_link; ?>

  ViewVC Help
Powered by ViewVC 1.1.2