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
RevLine 
[15]1[% USE CGI %]
[288]2<!-- METADATA STARTS -->
[849]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 %]
[811]6<div id="metadata" class="vcard">
[843]7
[937]8  <!-- For the vcard -->
[811]9  <span class="fn" style="display:none">[% node_name %]</span>
[71]10[% IF phone OR fax OR address OR postcode OR formatted_website_text
[566]11      OR hours_text OR map_link %]
12  <ul id="general_metadata">
[514]13
[15]14    [% IF phone %]
[514]15      <li class="telephone">
[811]16        <span class="metadata_label">Telephone:</span> <span class="tel">[% CGI.escapeHTML(phone) %]</span>
[514]17      </li>
[15]18    [% END %]
19    [% IF fax %]
[514]20      <li class="fax">
[639]21        <span class="metadata_label">Fax:</span> [% CGI.escapeHTML(fax) %]
[514]22      </li>
[15]23    [% END %]
24    [% IF address %]
[514]25      <li class="address">
[639]26        <span class="metadata_label">Address:</span>
[811]27        <span class="adr"><span class="street-address">[% CGI.escapeHTML(address) %]</span></span><!--, [% default_city %] --> [%# uncomment at left to show city %]
[514]28        [% IF map_link %]
[639]29          <a href="[% map_link %]">(map of this place)</a>
[514]30        [% END %]
31      </li>
[163]32    [% ELSIF map_link %]
[514]33      <li class="map">
[639]34        <span class="metadata_label"><a href="[% map_link %]">Map of this place</a></span>
[514]35      </li>
[15]36    [% END %]
37    [% IF postcode %]
[514]38      <li class="postcode">
[639]39        <span class="metadata_label">Postcode:</span>
[811]40        <span class="adr"><span class="postal-code">[% CGI.escapeHTML(postcode) %]</span></span>
[514]41      </li>
[15]42    [% END %]
[71]43    [% IF formatted_website_text %]
[514]44      <li class="website_link">
[811]45        <span class="metadata_label">Website:</span> <span class="url">[% formatted_website_text %]</span>
[514]46      </li>
[15]47    [% END %]
48    [% IF hours_text %]
[514]49      <li class="opening_hours">
[639]50        <span class="metadata_label">Opening Hours:</span>
[514]51        [% CGI.escapeHTML(hours_text) %]
52      </li>
[15]53    [% END %]
54  </ul>
55[% END %]
[566]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">
[639]62        <span class="metadata_label">Categories:</span>
[566]63        [% FOREACH category = categories %]
[1095]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 %]
[566]69        [% END %]
70      </li>
71    [% END %]
72
73    [% IF locales.size AND locales.size > 0 %]
74      <li class="locales_list">
[642]75        <span class="metadata_label">Locales:</span>
[566]76        [% FOREACH locale = locales %]
[1095]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 %]
[566]82        [% END %]
83      </li>
84    [% END %]
85  </ul>
86[% END %]
[288]87</div>
[849]88[% END %]
[508]89<!-- METADATA ENDS -->
Note: See TracBrowser for help on using the repository browser.