source: trunk/templates/node.tt @ 831

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

Tweak display of un-moderated pages, and listings of them

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