Author: earle Date: 2005-10-10 00:40:37 +0100 (Mon, 10 Oct 2005) New Revision: 685
Modified: trunk/Changes trunk/README.CSS trunk/lib/OpenGuides/SuperSearch.pm Log: add node summary to search results
Modified: trunk/Changes =================================================================== --- trunk/Changes 2005-10-09 23:37:43 UTC (rev 684) +++ trunk/Changes 2005-10-09 23:40:37 UTC (rev 685) @@ -1,7 +1,10 @@ 0.51 New "summary" metadata field for one-line summaries of nodes. Add "summary" field to RDF as dc:description. + Show node summary in search results. Add "address" field that had got missed out from the RDF. + Fix bug that was breaking coordinate entry fields on search page if lat/lon + was being used. Replace underscores in node names in redirection message with spaces. Redirection message now links to a rendered version of the old page rather than the editing view.
Modified: trunk/README.CSS =================================================================== --- trunk/README.CSS 2005-10-09 23:37:43 UTC (rev 684) +++ trunk/README.CSS 2005-10-09 23:40:37 UTC (rev 685) @@ -84,6 +84,10 @@ Used in: recent_changes.tt Purpose: User who made a change
+div.hit_summary + Used in: supersearch.tt + Purpose: One-line summary of individual search result. + IDs ---
Modified: trunk/lib/OpenGuides/SuperSearch.pm =================================================================== --- trunk/lib/OpenGuides/SuperSearch.pm 2005-10-09 23:37:43 UTC (rev 684) +++ trunk/lib/OpenGuides/SuperSearch.pm 2005-10-09 23:40:37 UTC (rev 685) @@ -252,6 +252,11 @@ my $formatter = $self->wiki->formatter; foreach my $i ( 0 .. $#results ) { my $name = $results[$i]{name}; + + # Add the one-line summary of the node, if there is one. + my %node = $self->wiki->retrieve_node($name); + $results[$i]{summary} = $node{metadata}{summary}[0]; + my $node_param = $formatter->node_name_to_node_param( $name ); $results[$i]{url} = $self->{wikimain} . "?$node_param"; }
openguides-commits@lists.openguides.org