source: trunk/templates/node.tt @ 1036

Last change on this file since 1036 was 1036, checked in by kake, 14 years ago

Added an extra "edit this page" link next to the node name.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.2 KB
RevLine 
[2]1[% USE CGI %]
2[% INCLUDE header.tt %]
[288]3[% INCLUDE banner.tt %]
[181]4<div id="content">
[962]5[% IF !config.content_above_navbar_in_html %]
6  [% INCLUDE navbar.tt %]
7[% END %]
[811]8<div id="maincontent" class="hreview">
[634]9[% IF oldid %]
[710]10<div id="redirect_message">(redirected from <a href="[% full_cgi_url %]?id=[% oldid %];redirect=0">[% oldid.replace('_', ' ') %]</a>)</div>
[634]11[% END %]
12
[730]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());
[811]19    map.centerAndZoom(new GPoint([% wgs84_long %], [% wgs84_lat %]), 3);
[730]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
[1036]30<div id="node_title">
[2]31[% IF current %]
[531]32  [% IF backlinks_in_title AND is_indexable_node %]
[353]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>
[531]34  [% ELSIF backlinks_in_title %]
[867]35    <h2 class="node_name"><a href="[% cgi_url %]?action=show_backlinks;id=[% CGI.escape(node_name) %]">[% node_name %]</a></h2>
[2]36  [% ELSE %]
[531]37    <h2 class="node_name">[% node_name %]</h2>
[2]38  [% END %]
39[% ELSE %]
[831]40  <h2><em>
41  [% IF moderated %]
42    Historical
43  [% ELSE %]
44    Un-moderated
45  [% END %]
46    version [% version %] of
[581]47    <span class="node_name">[% node_name %]</span></em>
48  </h2>
[2]49[% END %]
[699]50[% IF not (content || coord_field_1_value || coord_field_2_value || latitude || longitude) %]
[1036]51</div>
[715]52We 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>?
[699]53[% ELSE %]
[1036]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>
[15]58[% INCLUDE display_metadata.tt %]
[289]59
60<!-- NODE CONTENT STARTS -->
[811]61<div id="content_text" class="description">
[2]62[% content %]
[811]63</div>
[289]64<!-- NODE CONTENT ENDS -->
65
[712]66[% TRY %]
67  [% INCLUDE custom_node.tt %]
68[% CATCH %]
[715]69[% END %]
[712]70                         
[559]71[% IF coord_field_1_value AND coord_field_2_value %]
72  <br clear="all" />
73  <div id="find_within_distance">
[716]74    <form action="search.cgi">
[559]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>
[2]88[% END %]
[691]89[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y) %]
[811]90<div id="coordinates" class="geo">
[288]91[% END %]
92[% IF os_x AND os_y %]
[811]93  <small>OS X co-ord:
94    <abbr class="osgb_x" title="[% CGI.escapeHTML(os_x) %]">[% CGI.escapeHTML(os_x) %]</abbr>
95  </small>
[288]96  &nbsp;&nbsp;&nbsp;
[811]97  <small>OS Y co-ord:
98    <abbr class="osgb_y" title="[% CGI.escapeHTML(os_y) %]">[% CGI.escapeHTML(os_y) %]</abbr>
99  </small>
[288]100  &nbsp;&nbsp;&nbsp;
[691]101[% ELSIF osie_x AND osie_y %]
[811]102  <small>OS IE X co-ord:
103    <abbr class="osie_x" title="[% CGI.escapeHTML(osie_x) %]">[% CGI.escapeHTML(osie_x) %]</abbr>
104  </small>
[691]105  &nbsp;&nbsp;&nbsp;
[811]106  <small>OS IE Y co-ord:
107    <abbr class="osie_y" title="[% CGI.escapeHTML(osie_y) %]">[% CGI.escapeHTML(osie_y) %]</abbr>
108  </small>
[691]109  &nbsp;&nbsp;&nbsp;
[288]110[% END %]
111[% IF latitude AND longitude %]
[811]112  <small>
113    (Latitude:
114    <abbr class="latitude" title="[% wgs84_lat %]">[% latitude %]</abbr>
115        Longitude:
116        <abbr class="longitude" title="[% wgs84_long %]">[% longitude %]</abbr>)
117  </small>
[288]118[% END %]
[691]119[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y)%]
[288]120</div>
121[% END %]
[490]122<div id="rdf_link">
123  <a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML for this
124  node</a>
[522]125  [% IF rss_locale_url %]
126    / <a href="[% rss_locale_url %]">RSS feed for this locale</a>
[490]127  [% END %]
[522]128  [% IF rss_category_url %]
129    / <a href="[% rss_category_url %]">RSS feed for this category</a>
130  [% END %]
[490]131</div>
[288]132<div id="version">
[2]133[% IF current %]
[602]134  Last edited [% last_modified %]
135  [% IF version == 1 %]
136    (version [% version %])
137  [% ELSE %]
138    (version [% version %];
139    <a href="[% cgi_url %]?id=[% node_param %];version=[% version - 1 %];diffversion=[% version %]">diff</a>).
140  [% END %]
[2]141[% ELSE %]
[811]142  This is version <span class="version">[% version %]</span>
143  (as of [% last_modified %]).
[602]144  <a href="[% cgi_url %]?[% node_param %]">View current version.</a>
[2]145[% END %]
[311]146[% IF version AND version > 1 %]
[288]147<a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all
148versions.</a>
[2]149[% END %]
[279]150</div>
[699]151[% END %]
[617]152</div>
[844]153
[962]154[% IF config.content_above_navbar_in_html %]
155  [% INCLUDE navbar.tt %]
156[% END %]
157
[508]158[% INCLUDE footer.tt %]
Note: See TracBrowser for help on using the repository browser.