Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
schedules
Commits
dc9634b8
Commit
dc9634b8
authored
Sep 23, 2018
by
Zac Wood
Browse files
integrated new filtering w/ front end
parent
90617364
Pipeline
#2974
passed with stage
in 2 minutes and 13 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
schedules/app/controllers/search_controller.rb
View file @
dc9634b8
class
SearchController
<
ApplicationController
def
index
@courses
=
Course
.
where
(
subject:
params
[
:q
]
).
select
do
|
course
|
@courses
=
Course
.
fetch
(
params
).
select
do
|
course
|
course
.
course_sections
.
count
.
positive?
end
end
...
...
schedules/app/views/shared/_navbar.html.erb
View file @
dc9634b8
...
...
@@ -25,7 +25,7 @@
<form
action=
"/search"
class=
"form-inline"
>
<div
class=
"form-group"
>
<div
class=
"input-group"
>
<input
name=
"q"
type=
"text"
class=
"form-control"
placeholder=
"Search by CRN, course, professor..."
aria-describedby=
"basic-addon2"
>
<input
name=
"q
uery
"
type=
"text"
class=
"form-control"
placeholder=
"Search by CRN, course, professor..."
aria-describedby=
"basic-addon2"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-secondary"
type=
"button"
>
<i
class=
"fas fa-search"
></i>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment