source: trunk/templates/node.tt @ 988

Last change on this file since 988 was 988, checked in by nick, 15 years ago

Put Kake's navbar changes back, but in a way that still allows you to shift the common locales and categories off somewhere else together

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