render search crawlers header as partial
This commit is contained in:
parent
fcc07a75b4
commit
80bf9dbc5b
@ -1,5 +1,2 @@
|
||||
module Crawlers::TissCrawlerHelper
|
||||
def back_to_search_button
|
||||
button_to 'Search again', crawlers_tiss_crawler_search_url, :method => 'get'
|
||||
end
|
||||
end
|
||||
|
||||
9
app/views/crawlers/_header.html.erb
Normal file
9
app/views/crawlers/_header.html.erb
Normal file
@ -0,0 +1,9 @@
|
||||
<h2><%= context %> Search</h2>
|
||||
<div class="searchResultHeader">
|
||||
<p>
|
||||
Results for "<%= params[:search_term] %>"
|
||||
</p>
|
||||
<span>
|
||||
<%= button_to 'Search again', crawlers_tiss_crawler_search_url, :method => 'get' %>
|
||||
</span>
|
||||
</div>
|
||||
@ -1,6 +1,4 @@
|
||||
<h2>Courses Search ("<%= params[:search_term] %>")</h2>
|
||||
|
||||
<%= back_to_search_button %>
|
||||
<%= render :partial => "crawlers/header", :locals => {:context => "Courses"} %>
|
||||
|
||||
<ul class="courses-list">
|
||||
<% if @courses %>
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
<h2>People Search ("<%= params[:search_term] %>")</h2>
|
||||
|
||||
<%= back_to_search_button %>
|
||||
<%= render :partial => "crawlers/header", :locals => {:context => "People"} %>
|
||||
|
||||
<ul class="people-list">
|
||||
<% @people.each_with_index do |person| %>
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
<h2>Projects Search ("<%= params[:search_term] %>")</h2>
|
||||
|
||||
<%= back_to_search_button %>
|
||||
<%= render :partial => "crawlers/header", :locals => {:context => "Projects"} %>
|
||||
|
||||
<ul class="projects-list">
|
||||
<% if @projects %>
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
<h2>Theses Search ("<%= params[:search_term] %>")</h2>
|
||||
|
||||
<%= back_to_search_button %>
|
||||
<%= render :partial => "crawlers/header", :locals => {:context => "Theses"} %>
|
||||
|
||||
<ul class="theses-list">
|
||||
<% if @theses %>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user