source: trunk/templates/node.tt @ 712

Last change on this file since 712 was 712, checked in by Dominic Hargreaves, 16 years ago

Add custom_node content in note.tt (fixes #20)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.7 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">
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 current %]
12  [% IF backlinks_in_title AND is_indexable_node %]
13    <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>
14  [% ELSIF backlinks_in_title %]
15    <h2 class="node_name"><a href="[% cgi_url %]?action=show_backlinks&id=[% CGI.escape(node_name) %]">[% node_name %]</a></h2>
16  [% ELSE %]
17    <h2 class="node_name">[% node_name %]</h2>
18  [% END %]
19[% ELSE %]
20  <h2>
21    <em>Historical version [% version %] of
22    <span class="node_name">[% node_name %]</span></em>
23  </h2>
24[% END %]
25[% IF not (content || coord_field_1_value || coord_field_2_value || latitude || longitude) %]
26We don't have a node called "[% node_param %]". Would you like to <a href="[% full_cgi_url %]?action=edit;id=[% node_param %]">make
27[% ELSE %]
28[% INCLUDE display_metadata.tt %]
29
30<!-- NODE CONTENT STARTS -->
31[% content %]
32<!-- NODE CONTENT ENDS -->
33
34[% TRY %]
35  [% INCLUDE custom_node.tt %]
36[% CATCH %]
37                         
38[% IF coord_field_1_value AND coord_field_2_value %]
39  <br clear="all" />
40  <div id="find_within_distance">
41    <form action="supersearch.cgi">
42      <label for="distance">Find all things within</label>
43      <select name="[% dist_field %]" id="distance">
44        <option value="500">500 metres</option>
45        <option value="1000">1 kilometre</option>
46        <option value="1500">1.5 kilometres</option>
47        <option value="2000">2 kilometres</option>
48      </select>
49      of here.
50      <input type="hidden" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" />
51      <input type="hidden" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" />
52      <input type="submit" name="Go" value="Go" class="form_button" />
53    </form>
54  </div>
55[% END %]
56[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y) %]
57<div id="coordinates">
58[% END %]
59[% IF os_x AND os_y %]
60  <small>OS X co-ord: [% CGI.escapeHTML(os_x) %]</small>
61  &nbsp;&nbsp;&nbsp;
62  <small>OS Y co-ord: [% CGI.escapeHTML(os_y) %]</small>
63  &nbsp;&nbsp;&nbsp;
64[% ELSIF osie_x AND osie_y %]
65  <small>OS IE X co-ord: [% CGI.escapeHTML(osie_x) %]</small>
66  &nbsp;&nbsp;&nbsp;
67  <small>OS IE Y co-ord: [% CGI.escapeHTML(osie_y) %]</small>
68  &nbsp;&nbsp;&nbsp;
69[% END %]
70[% IF latitude AND longitude %]
71  <small>(Latitude: [% latitude %] Longitude: [% longitude %])</small>
72[% END %]
73[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y)%]
74</div>
75[% END %]
76<div id="rdf_link">
77  <a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML for this
78  node</a>
79  [% IF rss_locale_url %]
80    / <a href="[% rss_locale_url %]">RSS feed for this locale</a>
81  [% END %]
82  [% IF rss_category_url %]
83    / <a href="[% rss_category_url %]">RSS feed for this category</a>
84  [% END %]
85</div>
86<div id="version">
87[% IF current %]
88  Last edited [% last_modified %]
89  [% IF version == 1 %]
90    (version [% version %])
91  [% ELSE %]
92    (version [% version %];
93    <a href="[% cgi_url %]?id=[% node_param %];version=[% version - 1 %];diffversion=[% version %]">diff</a>).
94  [% END %]
95[% ELSE %]
96  This is version [% version %] (as of [% last_modified %]).
97  <a href="[% cgi_url %]?[% node_param %]">View current version.</a>
98[% END %]
99[% IF version AND version > 1 %]
100<a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all
101versions.</a>
102[% END %]
103</div>
104[% END %]
105</div>
106[% INCLUDE footer.tt %]
Note: See TracBrowser for help on using the repository browser.