Changeset 1059


Ignore:
Timestamp:
Jun 10, 2007, 4:31:06 PM (14 years ago)
Author:
Dagfinn Ilmari Mannsåker
Message:

Include <os:map_link> in node RDF (fixes #26)

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r1057 r1059  
    1717        If an unknown action is supplied to wiki.cgi, redirect to
    1818          action=display (partial fix for #102)
     19        Include <os:map_link> in node RDF (fixes #26).
    1920
    20210.60    13 May 2007
  • trunk/lib/OpenGuides/RDF.pm

    r1052 r1059  
    8282    foreach my $var ( qw( phone fax website opening_hours_text address
    8383                          postcode city country latitude longitude username
    84                           os_x os_y summary ) ) {
     84                          os_x os_y summary map_link ) ) {
    8585        my $val = $metadata{$var}[0] || $defaults{$var} || "";
    8686        $tt_vars{$var} = $val;
     
    104104    my $is_geospatial;
    105105    foreach my $var ( qw( os_x os_y latitude longitude address postcode
    106                           opening_hours_text ) ) {
     106                          opening_hours_text map_link ) ) {
    107107        $is_geospatial = 1 if $tt_vars{$var};
    108108    }
  • trunk/t/21_rdf.t

    r1016 r1059  
    1616}
    1717
    18 plan tests => 27;
     18plan tests => 28;
    1919
    2020Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
     
    5757        latitude           => "51.524193",
    5858        longitude          => "-0.114436",
     59        map_link           => "http://pubsite.com/calthorpe/get_there.htm",
    5960        summary            => "a nice pub",
    6061    }
     
    8182    qr|<dc:title>Wiki::Toolkit Test Site: Calthorpe Arms</dc:title>|,
    8283    "sets the title correctly" );
     84
     85like( $rdfxml,
     86    qr|<os:map_link rdf:resource="http://pubsite.com/calthorpe/get_there.htm" />|,
     87    "includes map link" );
    8388
    8489like( $rdfxml, qr|<foaf:Person rdf:ID="Kake">|,
  • trunk/templates/node_rdf.tt

    r1051 r1059  
    7878      [% END %]
    7979
     80      [% IF map_link %]
     81        <os:map_link rdf:resource="[% map_link %]" />
     82      [% END %]
     83
    8084    [% END %]
    8185
Note: See TracChangeset for help on using the changeset viewer.