source: trunk/templates/display_metadata.tt

Last change on this file was 1237, checked in by Dominic Hargreaves, 13 years ago

Move the node image outside the metadata div, to aid styling
(fixes #222). Thanks peregrin.

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