source: sites/oxford.openguides.org/templates/display_metadata.tt @ 1076

Last change on this file since 1076 was 1076, checked in by Dominic Hargreaves, 14 years ago

Sync with 0.60 templates

File size: 3.8 KB
Line 
1[% USE CGI %]
2<!-- METADATA STARTS -->
3[% IF phone OR fax OR address OR postcode OR formatted_website_text
4       OR hours_text OR map_link OR categories.size OR locales.size OR
5       node_image %]
6<div id="metadata" class="vcard">
7[% IF node_image %]
8  <div id="node_image_box">
9    [% IF node_image_url %]<a href="[% node_image_url %]">[% END %]
10    <img id="node_image" src="[% node_image %]"
11         alt="Picture of [% node_name %]" />
12    [% IF node_image_url %]</a>[% END %]
13    [% IF node_image_copyright %]
14      <div id="node_image_copyright">
15        [% IF node_image_licence %]
16          <a href="[% node_image_licence %]">&copy;
17            [% node_image_copyright %]</a>
18        [% ELSE %]
19          &copy; [% node_image_copyright %]
20        [% END %]
21      </div>
22    [% END %]
23  </div>
24[% ELSE %]
25  <span id="node_no_image" />
26[% END %]
27
28  <!-- For the vcard -->
29  <span class="fn" style="display:none">[% node_name %]</span>
30[% IF phone OR fax OR address OR postcode OR formatted_website_text
31      OR hours_text OR map_link %]
32  <ul id="general_metadata">
33
34    [% IF phone %]
35      <li class="telephone">
36        <span class="metadata_label">Telephone (01865 if omitted):</span> <span class="tel">[% CGI.escapeHTML(phone) %]</span>
37      </li>
38    [% END %]
39    [% IF fax %]
40      <li class="fax">
41        <span class="metadata_label">Fax (01865 if omitted):</span> [% CGI.escapeHTML(fax) %]
42      </li>
43    [% END %]
44    [% IF address %]
45      <li class="address">
46        <span class="metadata_label">Address:</span>
47        <span class="adr"><span class="street-address">[% CGI.escapeHTML(address) %]</span></span><!--, [% default_city %] --> [%# uncomment at left to show city %]
48        [% IF map_link %]
49          <a href="[% map_link %]">(map of this place)</a>
50        [% ELSIF os_x AND os_y %]
51          <a href="http://www.streetmap.co.uk/streetmap.dll?grid2map?[% os_x %]&amp;[% os_y %]&amp;arrow=yes">(map of this place)</a>
52        [% END %]
53      </li>
54    [% ELSIF map_link %]
55      <li class="map">
56        <span class="metadata_label"><a href="[% map_link %]">Map of this place</a></span>
57      </li>
58    [% ELSIF os_x AND os_y %]
59      <li class="map">
60        <span class="metadata_label"><a href="http://www.streetmap.co.uk/streetmap.dll?grid2map?[% os_x %]&amp;[% os_y %]&amp;arrow=yes">(map of this place)</a></span>
61      </li>
62    [% END %]
63    [% IF postcode %]
64      <li class="postcode">
65        <span class="metadata_label">Postcode:</span>
66        <span class="adr"><span class="postal-code">[% CGI.escapeHTML(postcode) %]</span></span>
67      </li>
68    [% END %]
69    [% IF formatted_website_text %]
70      <li class="website_link">
71        <span class="metadata_label">Website:</span> <span class="url">[% formatted_website_text %]</span>
72      </li>
73    [% END %]
74    [% IF hours_text %]
75      <li class="opening_hours">
76        <span class="metadata_label">Opening Hours:</span>
77        [% CGI.escapeHTML(hours_text) %]
78      </li>
79    [% END %]
80  </ul>
81[% END %]
82
83[% IF (categories.size AND categories.size > 0)
84   OR (locales.size AND locales.size > 0) %]
85  <ul id="categories_and_locales">
86    [% IF categories.size AND categories.size > 0 %]
87      <li class="categories_list">
88        <span class="metadata_label">Categories:</span>
89        [% FOREACH category = categories %]
90          <a href="[% category.url %]" class="category">[% category.name %]</a>[%- "," UNLESS loop.last %]
91        [% END %]
92      </li>
93    [% END %]
94
95    [% IF locales.size AND locales.size > 0 %]
96      <li class="locales_list">
97        <span class="metadata_label">Locales:</span>
98        [% FOREACH locale = locales %]
99          <a href="[% locale.url %]" class="addr locality">[% locale.name %]</a>[%- "," UNLESS loop.last %]
100        [% END %]
101      </li>
102    [% END %]
103  </ul>
104[% END %]
105</div>
106[% END %]
107<!-- METADATA ENDS -->
Note: See TracBrowser for help on using the repository browser.