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

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

Add oxford's custom templates

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