root/tags/rel0_61/templates/node.tt

Revision 1106, 5.3 kB (checked in by dom, 19 months ago)

Correct some use of wgs84 back to the natural database format.

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