Author: dom Date: 2013-04-20 22:14:12 +0100 (Sat, 20 Apr 2013) New Revision: 1465
Added: sites/oxford.openguides.org/templates/custom_auto_map_link.tt sites/oxford.openguides.org/templates/display_metadata.tt Log: restore streetmap links. Note: display_metadata.tt should be removed once we're running a version including
https://github.com/OpenGuides/OpenGuides/commit/111c9339858fad183cabde469518...
Added: sites/oxford.openguides.org/templates/custom_auto_map_link.tt =================================================================== --- sites/oxford.openguides.org/templates/custom_auto_map_link.tt (rev 0) +++ sites/oxford.openguides.org/templates/custom_auto_map_link.tt 2013-04-20 21:14:12 UTC (rev 1465) @@ -0,0 +1,7 @@ +[% IF os_x AND os_y %] +[% IF auto_map_link_in_address %] +<a href="http://www.streetmap.co.uk/streetmap.dll?grid2map?[% os_x %]&[% os_y %]&arrow=yes">(map of this place)</a> +[% ELSE %] +<a href="http://www.streetmap.co.uk/streetmap.dll?grid2map?[% os_x %]&[% os_y %]&arrow=yes">Map of this place</a> +[% END %] +[% END %]
Added: sites/oxford.openguides.org/templates/display_metadata.tt =================================================================== --- sites/oxford.openguides.org/templates/display_metadata.tt (rev 0) +++ sites/oxford.openguides.org/templates/display_metadata.tt 2013-04-20 21:14:12 UTC (rev 1465) @@ -0,0 +1,100 @@ +[% 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"> + + <!-- 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:</span> <span class="tel">[% CGI.escapeHTML(phone) %]</span> + </li> + [% END %] + [% IF fax %] + <li class="fax"> + <span class="metadata_label">Fax:</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> + [% ELSE %] + [% TRY %] + [% SET auto_map_link_in_address = 1 %] + [% INCLUDE custom_auto_map_link.tt %] + [% CATCH %] + [% END %] + [% END %] + </li> + [% ELSIF map_link %] + <li class="map"> + <span class="metadata_label"><a href="[% map_link %]">Map of this place</a></span> + </li> + [% ELSE %] + [% TRY %] + [% INCLUDE custom_auto_map_link.tt %] + [% CATCH %] + [% END %] + [% 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 -->
openguides-commits@lists.openguides.org