Author: dom Date: 2013-01-02 17:22:32 +0000 (Wed, 02 Jan 2013) New Revision: 1454
Removed: sites/oxford.openguides.org/templates/custom_header.tt sites/oxford.openguides.org/templates/display_metadata.tt sites/oxford.openguides.org/templates/map_index.tt sites/oxford.openguides.org/templates/node.tt Log: remove stuff related to mapnik
Deleted: sites/oxford.openguides.org/templates/custom_header.tt =================================================================== --- sites/oxford.openguides.org/templates/custom_header.tt 2013-01-02 16:37:06 UTC (rev 1453) +++ sites/oxford.openguides.org/templates/custom_header.tt 2013-01-02 17:22:32 UTC (rev 1454) @@ -1,3 +0,0 @@ -[% IF enable_gmaps AND display_google_maps AND gmaps_api_key %] - <script src="http://oxford.openguides.org/resources/mapnik.js" type="text/javascript"></script> -[% END %]
Deleted: sites/oxford.openguides.org/templates/display_metadata.tt =================================================================== --- sites/oxford.openguides.org/templates/display_metadata.tt 2013-01-02 16:37:06 UTC (rev 1453) +++ sites/oxford.openguides.org/templates/display_metadata.tt 2013-01-02 17:22:32 UTC (rev 1454) @@ -1,115 +0,0 @@ -[% USE CGI %] -<!-- METADATA STARTS --> -[% IF phone OR fax OR address OR postcode OR formatted_website_text - OR hours_text OR map_link OR categories.size OR locales.size OR - node_image %] -<div id="metadata" class="vcard"> -[% IF node_image %] - <div id="node_image_box"> - [% IF node_image_url %]<a href="[% node_image_url %]">[% END %] - <img id="node_image" src="[% node_image %]" - alt="Picture of [% node_name %]" /> - [% IF node_image_url %]</a>[% END %] - [% IF node_image_copyright %] - <div id="node_image_copyright"> - [% IF node_image_licence %] - <a href="[% node_image_licence %]">© - [% node_image_copyright %]</a> - [% ELSE %] - © [% node_image_copyright %] - [% END %] - </div> - [% END %] - </div> -[% ELSE %] - <span id="node_no_image" /> -[% END %] - - <!-- For the vcard --> - <span class="fn" style="display:none">[% node_name %]</span> -[% IF phone OR fax OR address OR postcode OR formatted_website_text - OR hours_text OR map_link %] - <ul id="general_metadata"> - - [% IF phone %] - <li class="telephone"> - <span class="metadata_label">Telephone (01865 if omitted):</span> <span class="tel">[% CGI.escapeHTML(phone) %]</span> - </li> - [% END %] - [% IF fax %] - <li class="fax"> - <span class="metadata_label">Fax (01865 if omitted):</span> [% CGI.escapeHTML(fax) %] - </li> - [% END %] - [% IF address %] - <li class="address"> - <span class="metadata_label">Address:</span> - <span class="adr"><span class="street-address">[% CGI.escapeHTML(address) %]</span></span><!--, [% default_city %] --> [%# uncomment at left to show city %] - [% IF map_link %] - <a href="[% map_link %]">(map of this place)</a> - [% ELSIF os_x AND os_y %] - <a href="http://www.streetmap.co.uk/streetmap.dll?grid2map?[% os_x %]&[% os_y %]&arrow=yes">(map of this place)</a> - [% END %] - </li> - [% ELSIF map_link %] - <li class="map"> - <span class="metadata_label"><a href="[% map_link %]">Map of this place</a></span> - </li> - [% ELSIF os_x AND os_y %] - <li class="map"> - <span class="metadata_label"><a href="http://www.streetmap.co.uk/streetmap.dll?grid2map?[% os_x %]&[% os_y %]&arrow=yes">(map of this place)</a></span> - </li> - [% END %] - [% IF postcode %] - <li class="postcode"> - <span class="metadata_label">Postcode:</span> - <span class="adr"><span class="postal-code">[% CGI.escapeHTML(postcode) %]</span></span> - </li> - [% END %] - [% IF formatted_website_text %] - <li class="website_link"> - <span class="metadata_label">Website:</span> <span class="url">[% formatted_website_text %]</span> - </li> - [% END %] - [% IF hours_text %] - <li class="opening_hours"> - <span class="metadata_label">Opening Hours:</span> - [% CGI.escapeHTML(hours_text) %] - </li> - [% END %] - </ul> -[% END %] - -[% IF (categories.size AND categories.size > 0) - OR (locales.size AND locales.size > 0) %] - <ul id="categories_and_locales"> - [% IF categories.size AND categories.size > 0 %] - <li class="categories_list"> - <span class="metadata_label">Categories:</span> - [% FOREACH category = categories %] - [% IF category.url != "" %] - <a href="[% category.url %]" class="category">[% category.name %]</a>[%- "," UNLESS loop.last %] - [% ELSE %] - [% category.name %][%- "," UNLESS loop.last %] - [% END %] - [% END %] - </li> - [% END %] - - [% IF locales.size AND locales.size > 0 %] - <li class="locales_list"> - <span class="metadata_label">Locales:</span> - [% FOREACH locale = locales %] - [% IF locale.url != "" %] - <a href="[% locale.url %]" class="addr locality">[% locale.name %]</a>[%- "," UNLESS loop.last %] - [% ELSE %] - [% locale.name %][%- "," UNLESS loop.last %] - [% END %] - [% END %] - </li> - [% END %] - </ul> -[% END %] -</div> -[% END %] -<!-- METADATA ENDS -->
Deleted: sites/oxford.openguides.org/templates/map_index.tt =================================================================== --- sites/oxford.openguides.org/templates/map_index.tt 2013-01-02 16:37:06 UTC (rev 1453) +++ sites/oxford.openguides.org/templates/map_index.tt 2013-01-02 17:22:32 UTC (rev 1454) @@ -1,85 +0,0 @@ -[% INCLUDE header.tt page_title = criterion.name || "Map of all nodes" %] -[% INCLUDE banner.tt %] -<div id="content"> -<a href="" id="permalink">Link to this page</a> - -<div id="maincontent"> - -[% IF gmaps_api_key %] - <ul style="height:400px; overflow:auto;float:right; width:30%;"> - [% i = 0 %] - [% FOREACH node = nodes %] - [% metadata = node.node_data.metadata %] - [% i = i + 1 %] - [% IF metadata.wgs84_lat.list.first AND metadata.wgs84_long.list.first %] - [% NEXT IF metadata.wgs84_lat.list.first.match('m') %] - [% NEXT IF metadata.wgs84_long.list.first.match('m') %] - <li><a href='#' onclick="marker[% i %].openInfoWindowHtml(htmlString[% i %]); return false;">[% node.name %]</a>[% IF metadata.city.list.first %], [% metadata.city.list.first %][% END %]</li> - [% END %] - [% END %] - </ul> - - <table width="100%" height="100%"> - <tr><td><div id="map" style=" width: 65%; height: 450px"></div></td></tr> - </table> - - <script defer="defer" type="text/javascript"> - //<![CDATA[ - var map = new GMap2(document.getElementById("map")); - - var copycol = new GCopyrightCollection(""); - var copy = new GCopyright(1, new GLatLngBounds(new GLatLng(-90,-180),new GLatLng(90,180)), 0, "©2007 <a href='http://www.openstreetmap.org>OpenStreetMap</a> contributors"); - copycol.addCopyright(copy); - var tileMapnik = new GTileLayer(copycol,1,18); - tileMapnik.myBaseURL = "http://tile.openstreetmap.org/"; - tileMapnik.getTileUrl=MapnikGetTileUrl; - tileMapnik.isPng = function () { return true;} - tileMapnik.getOpacity = function() {return 1.0;} - - var layer0 = [tileMapnik]; - var mapnikMap = new GMapType(layer0, G_SATELLITE_MAP.getProjection(), "OSM", G_SATELLITE_MAP); - map.addMapType(mapnikMap); - - map.addControl(new GLargeMapControl()); - map.addControl(new GMapTypeControl()); - - map.setCenter(new GLatLng([% IF lat %][% lat %][% ELSE %][% centre_lat %][% END %],[% IF long %][% long %][% ELSE %][% centre_long %][% END %]), [% IF zoom %][% zoom %][% ELSE %][% default_gmaps_zoom %][% END %]); - //map.centerAndZoom(new GPoint([% IF long %][% long %][% ELSE %][% centre_long %][% END %],[% IF lat %][% lat %][% ELSE %][% centre_lat %][% END %]), [% IF zoom %][% zoom %][% ELSE %][% default_gmaps_zoom %][% END %]); - map.setMapType(mapnikMap); - - [% i = 0 %] - [% FOREACH node = nodes %] - [% i = i + 1 %] - [% metadata = node.node_data.metadata %] - [% IF metadata.wgs84_lat.list.first AND metadata.wgs84_long.list.first %] - [% NEXT IF metadata.wgs84_lat.list.first.match('m') %] - [% NEXT IF metadata.wgs84_long.list.first.match('m') %] - var point[% i %] = new GPoint([% metadata.wgs84_long.list.first %], [% metadata.wgs84_lat.list.first %]); - var marker[% i %] = new GMarker(point[% i %],baseIcon); - [% IF metadata.source %] - [% source_url = metadata.source.list.first.match('^(.*?)\?(?:\?|$)').first %] - [% END %] - var htmlString[% i %] = "<a href=\"?[% node.param %]\">[% node.name %]</a> <a style='text-decoration:none;' href=\"[% source_url %]?id=[% node.param %];action=edit\">(edit)</a><br />[% metadata.address.list.first %]<br />[% metadata.city.list.first %]"; - GEvent.addListener(marker[% i %], "click", function() { - marker[% i %].openInfoWindowHtml(htmlString[% i %]); - }); - map.addOverlay(marker[% i %]); - [% END %] - [% END %] - function map_recenter() { - var center = map.getCenterLatLng(); - var link = document.getElementById('permalink'); - var zoom = map.getZoomLevel(); - link.href = "?action=index;format=map&long="+center.x+"&lat="+center.y+"&zoom="+zoom; - } - GEvent.addListener(map, "moveend", map_recenter ); - //]]> - </script> -[% ELSE %] - Sorry, this guide doesn't have Google Maps functionality enabled. -[% END %] - -</div> -</div> - -[% INCLUDE footer.tt %]
Deleted: sites/oxford.openguides.org/templates/node.tt =================================================================== --- sites/oxford.openguides.org/templates/node.tt 2013-01-02 16:37:06 UTC (rev 1453) +++ sites/oxford.openguides.org/templates/node.tt 2013-01-02 17:22:32 UTC (rev 1454) @@ -1,177 +0,0 @@ -[% USE CGI %] -[% INCLUDE header.tt %] -[% INCLUDE banner.tt %] -<div id="content"> -[% IF !config.content_above_navbar_in_html %] - [% INCLUDE navbar.tt %] -[% END %] -<div id="maincontent" class="hreview"> -[% IF oldid %] -<div id="redirect_message">(redirected from <a href="[% full_cgi_url %]?id=[% oldid %];redirect=0">[% oldid.replace('_', ' ') %]</a>)</div> -[% END %] - -[% IF wgs84_lat AND wgs84_long AND display_google_maps and gmaps_api_key %] - <div id="map" style="float:right; width: 300px; height: 200px"></div> - <script defer="defer" type="text/javascript"> - //<![CDATA[ - var map = new GMap2(document.getElementById("map")); - new GKeyboardHandler(map); - var copycol = new GCopyrightCollection(""); - var copy = new GCopyright(1, new GLatLngBounds(new GLatLng(-90,-180),new GLatLng(90,180)), 0, "<a href='http://www.openstreetmap.org>OpenStreetMap</a>"); - copycol.addCopyright(copy); - var tileMapnik = new GTileLayer(copycol,1,18); - tileMapnik.myBaseURL = "http://tile.openstreetmap.org/"; - tileMapnik.getTileUrl=MapnikGetTileUrl; - tileMapnik.isPng = function () { return true;} - tileMapnik.getOpacity = function() {return 1.0;} - - var layer0 = [tileMapnik]; - var mapnikMap = new GMapType(layer0, G_SATELLITE_MAP.getProjection(), "OSM", G_SATELLITE_MAP); - map.addMapType(mapnikMap); - - - map.addControl(new GMapTypeControl()); - map.setCenter(new GLatLng([% wgs84_lat %], [% wgs84_long %]), 14); - map.setMapType(mapnikMap); - map.addControl(new GSmallMapControl()); - var point0 = new GPoint([% wgs84_long %], [% wgs84_lat %]); - var marker0 = new GMarker(point0,baseIcon); - GEvent.addListener(marker0, "click", function() { - marker0.openInfoWindowHtml("[% node_name %]"); - }); - map.addOverlay(marker0); - - //]]> - </script> -[% END %] - -<div id="node_title"> -[% IF current %] - [% IF backlinks_in_title AND is_indexable_node %] - <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> - [% ELSIF backlinks_in_title %] - <h2 class="node_name"><a href="[% cgi_url %]?action=show_backlinks;id=[% CGI.escape(node_name) %]">[% node_name %]</a></h2> - [% ELSE %] - <h2 class="node_name">[% node_name %]</h2> - [% END %] -[% ELSE %] - <h2><em> - [% IF moderated %] - Historical - [% ELSE %] - Un-moderated - [% END %] - version [% version %] of - <span class="node_name">[% node_name %]</span></em> - </h2> -[% END %] -[% IF not (content || coord_field_1_value || coord_field_2_value || latitude || longitude) %] -</div> -<div id="nonexistent_node_message">We 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>?</div> -[% ELSE %] -<div id="title_edit_link"> -<a href="[% full_cgi_url %]?action=edit;id=[% node_param %]">Edit this page</a> -</div> -</div> -[% INCLUDE display_metadata.tt %] - -<!-- NODE CONTENT STARTS --> -<div id="content_text" class="description"> -[% content %] -</div> -<!-- NODE CONTENT ENDS --> - -[% TRY %] - [% INCLUDE custom_node.tt %] -[% CATCH %] -[% END %] - -[% IF coord_field_1_value AND coord_field_2_value %] - <br clear="all" /> - <div id="find_within_distance"> - <form action="search.cgi"> - <label for="distance">Find all things within</label> - <select name="[% dist_field %]" id="distance"> - <option value="500">500 metres</option> - <option value="1000">1 kilometre</option> - <option value="1500">1.5 kilometres</option> - <option value="2000">2 kilometres</option> - </select> - of here. - <input type="hidden" name="[% coord_field_1 %]" value="[% coord_field_1_value %]" /> - <input type="hidden" name="[% coord_field_2 %]" value="[% coord_field_2_value %]" /> - <input type="submit" name="Go" value="Go" class="form_button" /> - </form> - </div> -[% END %] -[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y) %] -<div id="coordinates" class="geo"> -[% END %] -[% IF os_x AND os_y %] - <small>OS X co-ord: - <abbr class="osgb_x" title="[% CGI.escapeHTML(os_x) %]">[% CGI.escapeHTML(os_x) %]</abbr> - </small> - - <small>OS Y co-ord: - <abbr class="osgb_y" title="[% CGI.escapeHTML(os_y) %]">[% CGI.escapeHTML(os_y) %]</abbr> - </small> - -[% ELSIF osie_x AND osie_y %] - <small>OS IE X co-ord: - <abbr class="osie_x" title="[% CGI.escapeHTML(osie_x) %]">[% CGI.escapeHTML(osie_x) %]</abbr> - </small> - - <small>OS IE Y co-ord: - <abbr class="osie_y" title="[% CGI.escapeHTML(osie_y) %]">[% CGI.escapeHTML(osie_y) %]</abbr> - </small> - -[% END %] -[% IF latitude AND longitude %] - <small> - (Latitude: - <!-- titles using the wgs84 versions here are for microformats --> - <abbr class="latitude" title="[% wgs84_lat %]">[% latitude %]</abbr> - Longitude: - <abbr class="longitude" title="[% wgs84_long %]">[% longitude %]</abbr>) - </small> -[% END %] -[% IF (latitude AND longitude) OR (os_x AND os_y) OR (osie_x AND osie_y)%] -</div> -[% END %] -<div id="rdf_link"> - <a href="[% cgi_url %]?id=[% node_param %];format=rdf">RDF/XML for this - node</a> - [% IF rss_locale_url %] - / <a href="[% rss_locale_url %]">RSS feed for this locale</a> - [% END %] - [% IF rss_category_url %] - / <a href="[% rss_category_url %]">RSS feed for this category</a> - [% END %] -</div> -<div id="version"> -[% IF current %] - Last edited [% last_modified %] - [% IF version == 1 %] - (version [% version %]) - [% ELSE %] - (version [% version %]; - <a href="[% cgi_url %]?id=[% node_param %];version=[% version - 1 %];diffversion=[% version %]">diff</a>). - [% END %] -[% ELSE %] - This is version <span class="version">[% version %]</span> - (as of [% last_modified %]). - <a href="[% cgi_url %]?[% node_param %]">View current version.</a> -[% END %] -[% IF version AND version > 1 %] -<a href="[% cgi_url %]?action=list_all_versions;id=[% node_param %]">List all -versions.</a> -[% END %] -</div> -[% END %] -</div> - -[% IF config.content_above_navbar_in_html %] - [% INCLUDE navbar.tt %] -[% END %] - -[% INCLUDE footer.tt %]
openguides-commits@lists.openguides.org