Sha256: ed71f6f0e81a5b3dd8eb6df784021ed04190fb332af3dfe6fe6b6d60e3f6490b

Contents?: true

Size: 809 Bytes

Versions: 1

Compression:

Stored size: 809 Bytes

Contents

<h3>Search Results</h3>
<div class="results">
	<%if @results.blank?%>
		<p>No Results Found.</p>
	<%else%>
		<%@results.each do |result|%>
			<div class="result">
				<%if result.class.name == 'SpudPost'%>
					<%if result.is_news == true%>
						<h4><%=link_to result.title,news_post_path(result.url_name)%></h4>
					<%else%>
						<h4><%=link_to result.title,blog_post_path(result.url_name)%></h4>
					<%end%>					
					<p><%=truncate(sanitize(result.content),:length => 200, :separator => ' ')%></p>
				<%elsif result.class.name == 'SpudPage'%>
					<h4><%=link_to result.name,page_path(:id => result.url_name)%></h4>
					
					<p><%=truncate(sanitize(result.meta_description),:length => 200, :separator => ' ')%></p>
					
				<%end%>
			</div>
		<%end%>
		<%=will_paginate @results%>
	<%end%>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spud_search-0.1.4 app/views/search/_index.html.erb