source: sites/oxford.openguides.org/templates/node.tt @ 1074

Last change on this file since 1074 was 1074, checked in by Dominic Hargreaves, 15 years ago

Add oxford's custom templates

File size: 5.8 KB
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 GMap2(document.getElementById("map"));
18    new GKeyboardHandler(map);
19    var copycol = new GCopyrightCollection("");
20    var copy = new GCopyright(1, new GLatLngBounds(new GLatLng(-90,-180),new GLatLng(90,180)), 0, "OpenStreetMap");
21    copycol.addCopyright(copy);
22    var tileMapnik = new GTileLayer(copycol,1,17);
23    tileMapnik.myBaseURL = "http://mapnik.uberfoo.com/";
24    tileMapnik.getTileUrl=MapnikGetTileUrl;
25    tileMapnik.isPng = function () { return true;}
26    tileMapnik.getOpacity = function() {return 1.0;}
27
28    var layer0 = [tileMapnik];
29    var mapnikMap = new GMapType(layer0, G_SATELLITE_MAP.getProjection(), "Mapnik", G_SATELLITE_MAP);
30    map.addMapType(mapnikMap);
31   
32
33    map.addControl(new GMapTypeControl());
34    map.setCenter(new GLatLng([% wgs84_lat %], [% wgs84_long %]), 14);
35    map.setMapType(mapnikMap);
36    map.addControl(new GSmallMapControl());
37    var point0 = new GPoint([% wgs84_long %], [% wgs84_lat %]);
38    var marker0 = new GMarker(point0,baseIcon);
39    GEvent.addListener(marker0, "click", function() {
40      marker0.openInfoWindowHtml("[% node_name %]");
41      });
42    map.addOverlay(marker0);
43   
44  //]]>
45  </script>
46[% END %]
47
48[% IF current %]
49  [% IF backlinks_in_title AND is_indexable_node %]
50    <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>
51  [% ELSIF backlinks_in_title %]
52    <h2 class="node_name"><a href="[% cgi_url %]?action=show_backlinks;id=[% CGI.escape(node_name) %]">[% node_name %]</a></h2>
53  [% ELSE %]
54    <h2 class="node_name">[% node_name %]</h2>
55  [% END %]
56[% ELSE %]
57  <h2><em>
58  [% IF moderated %]
59    Historical
60  [% ELSE %]
61    Un-moderated
62  [% END %]
63    version [% version %] of
64    <span class="node_name">[% node_name %]</span></em>
65  </h2>
66[% END %]
67[% IF not (content || coord_field_1_value || coord_field_2_value || latitude || longitude) %]
68We 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>?
69[% ELSE %]
70[% INCLUDE display_metadata.tt %]
71
72<!-- NODE CONTENT STARTS -->
73<div id="content_text" class="description">
74[% content %]
75</div>
76<!-- NODE CONTENT ENDS -->
77
78[% TRY %]
79  [% INCLUDE custom_node.tt %]
80[% CATCH %]
81[% END %]
82                         
83[% IF coord_field_1_value AND coord_field_2_value %]
84  <br clear="all" />
85  <div id="find_within_distance">
86    <form action="search.cgi">
87      <label for="distance">Find all things within</label>
88      <select name="[% dist_field %]" id="distance">
89        <option value="500">500 metres</option>
90        <option value="1000">1 kilometre</option>
91        <option value="1500">1.5 kilometres</option>
92        <option value="2000">2 kilometres</option>
93      </select>
94      of here.
95      <input type="hidden" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" />
96      <input type="hidden" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" />
97      <input type="submit" name="Go" value="Go" class="form_button" />
98    </form>
99  </div>
100[% END %]
101[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y) %]
102<div id="coordinates" class="geo">
103[% END %]
104[% IF os_x AND os_y %]
105  <small>OS X co-ord:
106    <abbr class="osgb_x" title="[% CGI.escapeHTML(os_x) %]">[% CGI.escapeHTML(os_x) %]</abbr>
107  </small>
108  &nbsp;&nbsp;&nbsp;
109  <small>OS Y co-ord:
110    <abbr class="osgb_y" title="[% CGI.escapeHTML(os_y) %]">[% CGI.escapeHTML(os_y) %]</abbr>
111  </small>
112  &nbsp;&nbsp;&nbsp;
113[% ELSIF osie_x AND osie_y %]
114  <small>OS IE X co-ord:
115    <abbr class="osie_x" title="[% CGI.escapeHTML(osie_x) %]">[% CGI.escapeHTML(osie_x) %]</abbr>
116  </small>
117  &nbsp;&nbsp;&nbsp;
118  <small>OS IE Y co-ord:
119    <abbr class="osie_y" title="[% CGI.escapeHTML(osie_y) %]">[% CGI.escapeHTML(osie_y) %]</abbr>
120  </small>
121  &nbsp;&nbsp;&nbsp;
122[% END %]
123[% IF latitude AND longitude %]
124  <small>
125    (Latitude:
126    <abbr class="latitude" title="[% wgs84_lat %]">[% latitude %]</abbr>
127        Longitude:
128        <abbr class="longitude" title="[% wgs84_long %]">[% longitude %]</abbr>)
129  </small>
130[% END %]
131[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y)%]
132</div>
133[% END %]
134<div id="rdf_link">
135  <a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML for this
136  node</a>
137  [% IF rss_locale_url %]
138    / <a href="[% rss_locale_url %]">RSS feed for this locale</a>
139  [% END %]
140  [% IF rss_category_url %]
141    / <a href="[% rss_category_url %]">RSS feed for this category</a>
142  [% END %]
143</div>
144<div id="version">
145[% IF current %]
146  Last edited [% last_modified %]
147  [% IF version == 1 %]
148    (version [% version %])
149  [% ELSE %]
150    (version [% version %];
151    <a href="[% cgi_url %]?id=[% node_param %];version=[% version - 1 %];diffversion=[% version %]">diff</a>).
152  [% END %]
153[% ELSE %]
154  This is version <span class="version">[% version %]</span>
155  (as of [% last_modified %]).
156  <a href="[% cgi_url %]?[% node_param %]">View current version.</a>
157[% END %]
158[% IF version AND version > 1 %]
159<a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all
160versions.</a>
161[% END %]
162</div>
163[% END %]
164</div>
165
166[% IF config.content_above_navbar_in_html %]
167  [% INCLUDE navbar.tt %]
168[% END %]
169
170[% INCLUDE footer.tt %]
Note: See TracBrowser for help on using the repository browser.