Sha256: 61348f8de20fde51033d0228bb7ebfa1fdf4b7799f7996dec8af8abbdb9e5a8e

Contents?: true

Size: 1.69 KB

Versions: 1

Compression:

Stored size: 1.69 KB

Contents

<% @title = @results.length > 0 ? "#{@results.length} pages contains \"#{@params["query"]}\"" : "No pages contains \"#{@query}\"" %><%= sub_template "top" %>

<% if @results.length > 0 %>
  <h3>Matching Pages:</h3>
  <ul>
    <% for page in @results %>
      <li><a href="../show/<%= page.name %>"><%= page.plain_name %></a><br />
      <% 
        idxs = page.content.scan(/.{0,30}#{@params["query"]}.{0,30}/im)
        idxs.each do |i|
          begin %>
            ...<%= i.to_s %>...<br /><%
          rescue Exception => e
            %><%= e.message %><%
          end
        end
      %>
      </li>
    <% end %>
  </ul>
<% end %>
<% if @bliki_results.length > 0 %>
  <h3>Matching Bliki Entries:</h3>
  <ul>
    <% for entry in @bliki_results %>
      <li><a href="../bliki_revision/<%= entry.name %>?rev=<%= entry.revisions.size-1 %>"><%= entry.name %></a><br />
      <% 
        idxs = entry.content.scan(/.{0,30}#{@params["query"]}.{0,30}/im)
        idxs.each do |i|
          begin %>
            ...<%= i.to_s %>...<br /><%
          rescue Exception => e
            %><%= e.message %><%
          end
        end
      %>
      </li>
    <% end %>
  </ul>
<% end %>

<% if @results.length == 0 && @bliki_results.length == 0 %>
  <p>Perhaps you should try expanding your query. Remember that Instiki searches for entire phrases, so if you search for "all that jazz" it will not match pages that contain these words in separation&mdash;only as a sentence fragment.</p>

  <p>If you're a high-tech computer wizard, you might even want try constructing a regular expression. That's actually what Instiki uses, so go right ahead and flex your "[a-z]*Leet?RegExpSkill(s|z)"</p>
<% end %>

<%= sub_template "bottom" %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
Pimki-1.4.092 app/views/wiki/search.rhtml