source: trunk/templates/node.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: 4.8 KB
RevLine 
[2]1[% USE CGI %]
2[% INCLUDE header.tt %]
[288]3[% INCLUDE banner.tt %]
[181]4<div id="content">
[288]5[% INCLUDE navbar.tt %]
[811]6<div id="maincontent" class="hreview">
[634]7[% IF oldid %]
[710]8<div id="redirect_message">(redirected from <a href="[% full_cgi_url %]?id=[% oldid %];redirect=0">[% oldid.replace('_', ' ') %]</a>)</div>
[634]9[% END %]
10
[730]11[% IF wgs84_lat AND wgs84_long AND display_google_maps and gmaps_api_key %]
12  <div id="map" style="float:right; width: 300px; height: 200px"></div>
13  <script defer="defer" type="text/javascript">
14  //<![CDATA[
15    var map = new GMap(document.getElementById("map"));
16    map.addControl(new GSmallMapControl());
[811]17    map.centerAndZoom(new GPoint([% wgs84_long %], [% wgs84_lat %]), 3);
[730]18    var point0 = new GPoint([% wgs84_long %], [% wgs84_lat %]);
19    var marker0 = new GMarker(point0,baseIcon);
20    GEvent.addListener(marker0, "click", function() {
21      marker0.openInfoWindowHtml("[% node_name %]");
22      });
23    map.addOverlay(marker0);
24  //]]>
25  </script>
26[% END %]
27
[2]28[% IF current %]
[531]29  [% IF backlinks_in_title AND is_indexable_node %]
[353]30    <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>
[531]31  [% ELSIF backlinks_in_title %]
32    <h2 class="node_name"><a href="[% cgi_url %]?action=show_backlinks&id=[% CGI.escape(node_name) %]">[% node_name %]</a></h2>
[2]33  [% ELSE %]
[531]34    <h2 class="node_name">[% node_name %]</h2>
[2]35  [% END %]
36[% ELSE %]
[581]37  <h2>
38    <em>Historical version [% version %] of
39    <span class="node_name">[% node_name %]</span></em>
40  </h2>
[2]41[% END %]
[699]42[% IF not (content || coord_field_1_value || coord_field_2_value || latitude || longitude) %]
[715]43We don't have a node called "[% node_param %]". Would you like to <a href="[% full_cgi_url %]?action=edit;id=[% node_param %]">create it</a>?
[699]44[% ELSE %]
[15]45[% INCLUDE display_metadata.tt %]
[289]46
47<!-- NODE CONTENT STARTS -->
[811]48<div id="content_text" class="description">
[2]49[% content %]
[811]50</div>
[289]51<!-- NODE CONTENT ENDS -->
52
[712]53[% TRY %]
54  [% INCLUDE custom_node.tt %]
55[% CATCH %]
[715]56[% END %]
[712]57                         
[559]58[% IF coord_field_1_value AND coord_field_2_value %]
59  <br clear="all" />
60  <div id="find_within_distance">
[716]61    <form action="search.cgi">
[559]62      <label for="distance">Find all things within</label>
63      <select name="[% dist_field %]" id="distance">
64        <option value="500">500 metres</option>
65        <option value="1000">1 kilometre</option>
66        <option value="1500">1.5 kilometres</option>
67        <option value="2000">2 kilometres</option>
68      </select>
69      of here.
70      <input type="hidden" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" />
71      <input type="hidden" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" />
72      <input type="submit" name="Go" value="Go" class="form_button" />
73    </form>
74  </div>
[2]75[% END %]
[691]76[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y) %]
[811]77<div id="coordinates" class="geo">
[288]78[% END %]
79[% IF os_x AND os_y %]
[811]80  <small>OS X co-ord:
81    <abbr class="osgb_x" title="[% CGI.escapeHTML(os_x) %]">[% CGI.escapeHTML(os_x) %]</abbr>
82  </small>
[288]83  &nbsp;&nbsp;&nbsp;
[811]84  <small>OS Y co-ord:
85    <abbr class="osgb_y" title="[% CGI.escapeHTML(os_y) %]">[% CGI.escapeHTML(os_y) %]</abbr>
86  </small>
[288]87  &nbsp;&nbsp;&nbsp;
[691]88[% ELSIF osie_x AND osie_y %]
[811]89  <small>OS IE X co-ord:
90    <abbr class="osie_x" title="[% CGI.escapeHTML(osie_x) %]">[% CGI.escapeHTML(osie_x) %]</abbr>
91  </small>
[691]92  &nbsp;&nbsp;&nbsp;
[811]93  <small>OS IE Y co-ord:
94    <abbr class="osie_y" title="[% CGI.escapeHTML(osie_y) %]">[% CGI.escapeHTML(osie_y) %]</abbr>
95  </small>
[691]96  &nbsp;&nbsp;&nbsp;
[288]97[% END %]
98[% IF latitude AND longitude %]
[811]99  <small>
100    (Latitude:
101    <abbr class="latitude" title="[% wgs84_lat %]">[% latitude %]</abbr>
102        Longitude:
103        <abbr class="longitude" title="[% wgs84_long %]">[% longitude %]</abbr>)
104  </small>
[288]105[% END %]
[691]106[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y)%]
[288]107</div>
108[% END %]
[490]109<div id="rdf_link">
110  <a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML for this
111  node</a>
[522]112  [% IF rss_locale_url %]
113    / <a href="[% rss_locale_url %]">RSS feed for this locale</a>
[490]114  [% END %]
[522]115  [% IF rss_category_url %]
116    / <a href="[% rss_category_url %]">RSS feed for this category</a>
117  [% END %]
[490]118</div>
[288]119<div id="version">
[2]120[% IF current %]
[602]121  Last edited [% last_modified %]
122  [% IF version == 1 %]
123    (version [% version %])
124  [% ELSE %]
125    (version [% version %];
126    <a href="[% cgi_url %]?id=[% node_param %];version=[% version - 1 %];diffversion=[% version %]">diff</a>).
127  [% END %]
[2]128[% ELSE %]
[811]129  This is version <span class="version">[% version %]</span>
130  (as of [% last_modified %]).
[602]131  <a href="[% cgi_url %]?[% node_param %]">View current version.</a>
[2]132[% END %]
[311]133[% IF version AND version > 1 %]
[288]134<a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all
135versions.</a>
[2]136[% END %]
[279]137</div>
[699]138[% END %]
[617]139</div>
[508]140[% INCLUDE footer.tt %]
Note: See TracBrowser for help on using the repository browser.