source: trunk/templates/display_metadata.tt @ 811

Last change on this file since 811 was 811, checked in by nick, 15 years ago

Microformat fun - support hCard, hReview and geo microformats where possible

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1[% USE CGI %]
2<!-- METADATA STARTS -->
3
4<div id="metadata" class="vcard">
5  <!--- For the vcard --->
6  <span class="fn" style="display:none">[% node_name %]</span>
7[% IF phone OR fax OR address OR postcode OR formatted_website_text
8      OR hours_text OR map_link %]
9  <ul id="general_metadata">
10
11    [% IF phone %]
12      <li class="telephone">
13        <span class="metadata_label">Telephone:</span> <span class="tel">[% CGI.escapeHTML(phone) %]</span>
14      </li>
15    [% END %]
16    [% IF fax %]
17      <li class="fax">
18        <span class="metadata_label">Fax:</span> [% CGI.escapeHTML(fax) %]
19      </li>
20    [% END %]
21    [% IF address %]
22      <li class="address">
23        <span class="metadata_label">Address:</span>
24        <span class="adr"><span class="street-address">[% CGI.escapeHTML(address) %]</span></span><!--, [% default_city %] --> [%# uncomment at left to show city %]
25        [% IF map_link %]
26          <a href="[% map_link %]">(map of this place)</a>
27        [% END %]
28      </li>
29    [% ELSIF map_link %]
30      <li class="map">
31        <span class="metadata_label"><a href="[% map_link %]">Map of this place</a></span>
32      </li>
33    [% END %]
34    [% IF postcode %]
35      <li class="postcode">
36        <span class="metadata_label">Postcode:</span>
37        <span class="adr"><span class="postal-code">[% CGI.escapeHTML(postcode) %]</span></span>
38      </li>
39    [% END %]
40    [% IF formatted_website_text %]
41      <li class="website_link">
42        <span class="metadata_label">Website:</span> <span class="url">[% formatted_website_text %]</span>
43      </li>
44    [% END %]
45    [% IF hours_text %]
46      <li class="opening_hours">
47        <span class="metadata_label">Opening Hours:</span>
48        [% CGI.escapeHTML(hours_text) %]
49      </li>
50    [% END %]
51  </ul>
52[% END %]
53
54[% IF (categories.size AND categories.size > 0)
55   OR (locales.size AND locales.size > 0) %]
56  <ul id="categories_and_locales">
57    [% IF categories.size AND categories.size > 0 %]
58      <li class="categories_list">
59        <span class="metadata_label">Categories:</span>
60        [% FOREACH category = categories %]
61          <a href="[% category.url %]" class="category">[% category.name %]</a>[%- "," UNLESS loop.last %]
62        [% END %]
63      </li>
64    [% END %]
65
66    [% IF locales.size AND locales.size > 0 %]
67      <li class="locales_list">
68        <span class="metadata_label">Locales:</span>
69        [% FOREACH locale = locales %]
70          <a href="[% locale.url %]" class="addr locality">[% locale.name %]</a>[%- "," UNLESS loop.last %]
71        [% END %]
72      </li>
73    [% END %]
74  </ul>
75[% END %]
76</div>
77
78<!-- METADATA ENDS -->
Note: See TracBrowser for help on using the repository browser.