Sha256: 4dff50d0246dd78b30d7437799fc1bb6e7bb65547ce48668dc900e7dcd9dc1b0

Contents?: true

Size: 968 Bytes

Versions: 5

Compression:

Stored size: 968 Bytes

Contents

<span class='pagename'>Search Results</span>

<%
search_regexp = /#{query['regex'].strip}/i
title_results = @wiki.select { |name,apage| name=~ search_regexp }
text_results = @wiki.select { |name,apage| apage.content=~ search_regexp }
%>

<h1>Results of Search for &#8220;<%= query['regex'] %>&#8221;</h1>

<% unless title_results.empty? %>
	<h2>Matches in the titles of pages</h2>
	<ul>
	<% title_results.each do |name, page| %>
		<li><a href='<%= url name %>' ><%= name %></a></li>
	<% end %>
	</ul>
<% else %>
	<p>No matches in the titles of pages</p>
<% end %>

<% unless text_results.empty? %>
	<h2>Matches in the text of pages</h2>
	<ul>
	<% text_results.each do |name, page| %>
		<li><a href='<%= url name %>' ><%= name %></a></li>
	<% end %>
	</ul>
<% else %>
	<p>No matches in the text of pages</p>
<% end %>

<div class='command'>
	<a href='<%= url query['regex'], "edit" %>' accesskey="E" >Create a page titled &#8220;<%= query['regex'] %>&#8221;</a>
</div>

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
gf-Soks-1.0.4 templates/default/views/Page_find.rhtml
Soks-1.0.0 templates/default/views/Page_find.rhtml
Soks-1.0.1 templates/default/views/Page_find.rhtml
Soks-1.0.2 templates/default/views/Page_find.rhtml
Soks-1.0.3 templates/default/views/Page_find.rhtml