Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
schedules
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SRCT
schedules
Commits
61eedd93
Commit
61eedd93
authored
Nov 16, 2018
by
Zac Wood
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaned up view structure
parent
9add1e0f
Pipeline
#3370
failed with stage
in 2 minutes and 8 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
16 deletions
+14
-16
schedules/app/controllers/search_controller.rb
schedules/app/controllers/search_controller.rb
+1
-1
schedules/app/views/layouts/application.html.erb
schedules/app/views/layouts/application.html.erb
+3
-1
schedules/app/views/shared/_cart.html.erb
schedules/app/views/shared/_cart.html.erb
+0
-6
schedules/app/views/shared/_navbar.html.erb
schedules/app/views/shared/_navbar.html.erb
+10
-8
No files found.
schedules/app/controllers/search_controller.rb
View file @
61eedd93
class
SearchController
<
ApplicationController
def
index
results
=
SearchHelper
::
GenericItem
.
fetchall
(
params
[
:query
]
,
semester:
@semester
).
group_by
(
&
:type
)
results
=
SearchHelper
::
GenericItem
.
fetchall
(
String
.
new
(
params
[
:query
])
,
semester:
@semester
).
group_by
(
&
:type
)
@instructors
=
results
[
:instructor
]
@courses
=
results
[
:course
]
end
...
...
schedules/app/views/layouts/application.html.erb
View file @
61eedd93
...
...
@@ -13,7 +13,9 @@
<body>
<%=
render
partial:
'shared/navbar'
%>
<%=
yield
%>
<%=
render
'shared/page'
do
%>
<%=
yield
%>
<%
end
%>
<%=
render
partial:
'shared/cart'
%>
</body>
</html>
schedules/app/views/shared/_cart.html.erb
View file @
61eedd93
</div>
<!-- List of sections in the cart -->
</div>
</div>
<template
id=
"cart-data"
data-cart=
"
<%=
@cart
.
to_json
%>
"
></template>
schedules/app/views/shared/_navbar.html.erb
View file @
61eedd93
...
...
@@ -36,7 +36,16 @@
<div
class=
"col order-1 order-sm-0"
>
<form
action=
"/search"
class=
"form"
>
<div
class=
"input-group"
style=
"width:100%;"
>
<input
name=
"query"
type=
"text"
class=
"form-control"
placeholder=
"Search by CRN, course, professor..."
aria-describedby=
"basic-addon2"
>
<input
id=
"searchbar"
value=
"
<%=
params
[
:query
]
%>
"
name=
"query"
type=
"text"
class=
"form-control"
placeholder=
"Search by CRN, course, professor..."
aria-describedby=
"basic-addon2"
autocomplete=
"off"
>
<div
class=
"input-group-append"
>
<button
class=
"btn btn-secondary"
type=
"button"
>
<i
class=
"fas fa-search"
></i>
...
...
@@ -47,10 +56,3 @@
</div>
</div>
</div>
<div
class=
"container-fluid"
>
<!-- The main screen consists of a row with two columns: the search results, and the cart -->
<div
class=
"row"
>
<!-- Search result, List of Courses -->
<div
class=
"col-lg-8 col-md-10 mx-auto order-2 order-lg-0"
id=
"search-list"
>
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