source: trunk/templates/display_metadata.tt @ 843

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

Display the node image if there is one, or an empty span if not. (there can't be a node image if node images are disabled). closes #135

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