source: trunk/templates/node.tt @ 1237

Last change on this file since 1237 was 1237, checked in by Dominic Hargreaves, 13 years ago

Move the node image outside the metadata div, to aid styling
(fixes #222). Thanks peregrin.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.0 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 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[% IF node_image %]
31  <div id="node_image_box">
32    [% IF node_image_url %]<a href="[% node_image_url %]">[% END %]
33    <img id="node_image" src="[% node_image %]"
34         alt="Picture of [% node_name %]" />
35    [% IF node_image_url %]</a>[% END %]
36    [% IF node_image_copyright %]
37      <div id="node_image_copyright">
38        [% IF node_image_licence %]
39          <a href="[% node_image_licence %]">&copy;
40            [% node_image_copyright %]</a>
41        [% ELSE %]
42          &copy; [% node_image_copyright %]
43        [% END %]
44      </div>
45    [% END %]
46  </div>
47[% ELSE %]
48  <span id="node_no_image" />
49[% END %]
50
51<div id="node_title">
52[% IF current %]
53  [% IF backlinks_in_title AND is_indexable_node %]
54    <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>
55  [% ELSIF backlinks_in_title %]
56    <h2 class="node_name"><a href="[% cgi_url %]?action=show_backlinks;id=[% CGI.escape(node_name) %]">[% node_name %]</a></h2>
57  [% ELSE %]
58    <h2 class="node_name">[% node_name %]</h2>
59  [% END %]
60[% ELSE %]
61  <h2><em>
62  [% IF moderated %]
63    Historical
64  [% ELSE %]
65    Un-moderated
66  [% END %]
67    version [% version %] of
68    <span class="node_name">[% node_name %]</span></em>
69  </h2>
70[% END %]
71[% IF not (content || coord_field_1_value || coord_field_2_value || latitude || longitude) %]
72</div>
73<div id="nonexistent_node_message">We don't have a node called "[% node_name %]". Would you like to <a href="[% full_cgi_url %]?action=edit;id=[% node_param %]">create it</a>?</div>
74[% ELSE %]
75<div id="title_edit_link">
76<a href="[% full_cgi_url %]?action=edit;id=[% node_param %]">Edit this page</a>
77</div>
78</div>
79[% INCLUDE display_metadata.tt %]
80
81<!-- NODE CONTENT STARTS -->
82<div id="content_text" class="description">
83[% content %]
84</div>
85<!-- NODE CONTENT ENDS -->
86
87[% TRY %]
88  [% INCLUDE custom_node.tt %]
89[% CATCH %]
90[% END %]
91                         
92[% IF coord_field_1_value AND coord_field_2_value %]
93  <br clear="all" />
94  <div id="find_within_distance">
95    <form action="search.cgi">
96      <label for="distance">Find all things within</label>
97      <select name="[% dist_field %]" id="distance">
98        <option value="500">500 metres</option>
99        <option value="1000">1 kilometre</option>
100        <option value="1500">1.5 kilometres</option>
101        <option value="2000">2 kilometres</option>
102      </select>
103      of here.
104      <input type="hidden" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" />
105      <input type="hidden" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" />
106      <input type="submit" name="Go" value="Go" class="form_button" />
107    </form>
108  </div>
109[% END %]
110[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y) %]
111<div id="coordinates" class="geo">
112[% END %]
113[% IF os_x AND os_y %]
114  <small>OS X co-ord:
115    <abbr class="osgb_x" title="[% CGI.escapeHTML(os_x) %]">[% CGI.escapeHTML(os_x) %]</abbr>
116  </small>
117  &nbsp;&nbsp;&nbsp;
118  <small>OS Y co-ord:
119    <abbr class="osgb_y" title="[% CGI.escapeHTML(os_y) %]">[% CGI.escapeHTML(os_y) %]</abbr>
120  </small>
121  &nbsp;&nbsp;&nbsp;
122[% ELSIF osie_x AND osie_y %]
123  <small>OS IE X co-ord:
124    <abbr class="osie_x" title="[% CGI.escapeHTML(osie_x) %]">[% CGI.escapeHTML(osie_x) %]</abbr>
125  </small>
126  &nbsp;&nbsp;&nbsp;
127  <small>OS IE Y co-ord:
128    <abbr class="osie_y" title="[% CGI.escapeHTML(osie_y) %]">[% CGI.escapeHTML(osie_y) %]</abbr>
129  </small>
130  &nbsp;&nbsp;&nbsp;
131[% END %]
132[% IF latitude AND longitude %]
133  <small>
134    (Latitude:
135    <!-- titles using the wgs84 versions here are for microformats -->
136    <abbr class="latitude" title="[% wgs84_lat %]">[% latitude %]</abbr>
137        Longitude:
138        <abbr class="longitude" title="[% wgs84_long %]">[% longitude %]</abbr>)
139  </small>
140[% END %]
141[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y)%]
142</div>
143[% END %]
144<div id="rdf_link">
145  <a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML for this
146  node</a>
147  <a href="[% cgi_url %]?id=[% node_param %];format=json">JSON for this
148  node</a>
149  [% IF rss_locale_url %]
150    / <a href="[% rss_locale_url %]">RSS feed for this locale</a>
151  [% END %]
152  [% IF rss_category_url %]
153    / <a href="[% rss_category_url %]">RSS feed for this category</a>
154  [% END %]
155</div>
156<div id="version">
157[% IF current %]
158  Last edited [% last_modified %]
159  [% IF version == 1 %]
160    (version [% version %])
161  [% ELSE %]
162    (version [% version %];
163    <a href="[% cgi_url %]?id=[% node_param %];version=[% version - 1 %];diffversion=[% version %]">diff</a>).
164  [% END %]
165[% ELSE %]
166  This is version <span class="version">[% version %]</span>
167  (as of [% last_modified %]).
168  <a href="[% cgi_url %]?[% node_param %]">View current version.</a>
169[% END %]
170[% IF version AND version > 1 %]
171<a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all
172versions.</a>
173[% END %]
174</div>
175[% END %]
176</div>
177
178[% IF config.content_above_navbar_in_html %]
179  [% INCLUDE navbar.tt %]
180[% END %]
181
182[% INCLUDE footer.tt %]
Note: See TracBrowser for help on using the repository browser.