source: trunk/templates/display_metadata.tt @ 811

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

Microformat fun - support hCard, hReview and geo microformats where possible

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