first attempt of people crawler incl. detail view
This commit is contained in:
@@ -5,33 +5,19 @@ class TissCrawlerController < ApplicationController
|
||||
def index
|
||||
end
|
||||
|
||||
def show_basic
|
||||
def people_search
|
||||
end
|
||||
|
||||
def show_detail
|
||||
end
|
||||
|
||||
def search
|
||||
context = params[:context]
|
||||
case context
|
||||
when "People"
|
||||
result = TissCrawler.search(params)
|
||||
@people = result.map { |person| Tiss::Person.new(person) }
|
||||
# render(people_show_path, detail: false)
|
||||
render template: people_show_basic_path
|
||||
else
|
||||
flash.write[:alert] = "Unknown search context"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
require 'tiss/tiss_crawler'
|
||||
|
||||
def show_basic
|
||||
def people_show_basic
|
||||
result = TissCrawler.search(params)
|
||||
@people = result.map { |person| Tiss::Person.new(person) }
|
||||
# render(people_show_path, detail: false)
|
||||
render template: people_show_basic_path
|
||||
$people = result.map { |person| Tiss::Person.new(person) }
|
||||
@people = $people
|
||||
end
|
||||
|
||||
def people_show_detail
|
||||
people = $people
|
||||
index = params[:index]
|
||||
@person = people[Integer(index)]
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user