[% USE CGI %]
[% INCLUDE header.tt %]
[% INCLUDE banner.tt %]
<div id="content">
[% INCLUDE navbar.tt %]
[% IF current %]
  [% IF backlinks_in_title AND is_indexable_node %]
    <h2 class="node_name"><a href="[% cgi_url %]?action=index;index_type=[% CGI.escape(index_type) %];index_value=[% CGI.escape(index_value) %]">[% node_name %]</a></h2>
  [% ELSIF backlinks_in_title %]
    <h2 class="node_name"><a href="[% cgi_url %]?action=show_backlinks&id=[% CGI.escape(node_name) %]">[% node_name %]</a></h2>
  [% ELSE %]
    <h2 class="node_name">[% node_name %]</h2>
  [% END %]
[% ELSE %]
  <h2>
    <em>Historical version [% version %] of
    <span class="node_name">[% node_name %]</span></em>
  </h2>
[% END %]
[% INCLUDE display_metadata.tt %]

<!-- NODE CONTENT STARTS -->
[% content %]
<!-- NODE CONTENT ENDS -->

[% IF coord_field_1_value AND coord_field_2_value %]
  <br clear="all" />
  <div id="find_within_distance">
    <form action="supersearch.cgi">
      <label for="distance">Find all things within</label>
      <select name="[% dist_field %]" id="distance">
        <option value="500">500 metres</option>
        <option value="1000">1 kilometre</option>
        <option value="1500">1.5 kilometres</option>
        <option value="2000">2 kilometres</option>
      </select>
      of here.
      <input type="hidden" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" />
      <input type="hidden" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" />
      <input type="submit" name="Go" value="Go" class="form_button" />
    </form>
  </div>
[% END %]
[% IF (latitude AND longitude) OR (os_x AND os_y) %]
<div id="coordinates">
[% END %]
[% IF os_x AND os_y %]
  <small>OS X co-ord: [% CGI.escapeHTML(os_x) %]</small>
  &nbsp;&nbsp;&nbsp;
  <small>OS Y co-ord: [% CGI.escapeHTML(os_y) %]</small>
  &nbsp;&nbsp;&nbsp;
[% END %]
[% IF latitude AND longitude %]
  <small>(Latitude: [% latitude %] Longitude: [% longitude %])</small>
[% END %]
[% IF (latitude AND longitude) OR (os_x AND os_y) %]
</div>
[% END %]
<div id="rdf_link">
  <a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML for this
  node</a>
  [% IF rss_locale_url %]
    / <a href="[% rss_locale_url %]">RSS feed for this locale</a>
  [% END %]
  [% IF rss_category_url %]
    / <a href="[% rss_category_url %]">RSS feed for this category</a>
  [% END %]
</div>
<div id="version">
[% IF current %]
Last edited [% last_modified %] (version [% version %]; <a href="[% cgi_url %]?id=[% node_param %];version=[% version - 1 %];diffversion=[% version %]">diff</a>).
[% ELSE %]
This is version [% version %] (as of [% last_modified %]). 
<a href="[% cgi_url %]?[% node_param %]">View current version.</a> 
[% END %]
[% IF version AND version > 1 %]
<a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all
versions.</a>
[% END %]
</div>

[% INCLUDE footer.tt %]