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
5a9a1219
Commit
5a9a1219
authored
Oct 10, 2018
by
Zach Perkins
Browse files
Fixed some merged things
parent
6808de7e
Pipeline
#3211
failed with stage
in 2 minutes and 9 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
schedules/app/assets/javascripts/search.js
View file @
5a9a1219
...
...
@@ -5,7 +5,7 @@ const sectionWithCrn = crn => document.getElementById('search-list').querySelect
const
addCourse
=
(
event
,
id
)
=>
{
const
courseCard
=
document
.
getElementById
(
`course-
${
id
}
`
);
const
title
=
courseCard
.
querySelector
(
'
#
title
'
).
innerText
;
const
title
=
courseCard
.
querySelector
(
'
.
title
'
).
innerText
;
const
sectionsItems
=
Array
.
from
(
courseCard
.
querySelectorAll
(
'
li
'
));
const
sections
=
sectionsItems
.
map
(
li
=>
({
...
li
.
dataset
}));
...
...
schedules/app/views/search/index.html.erb
View file @
5a9a1219
...
...
@@ -3,7 +3,7 @@
<%
if
result
.
type
==
:course
%>
<%=
render
partial:
'shared/course'
,
object:
result
.
data
%>
<%
elsif
result
.
type
==
:instructor
%>
<%=
render
partial:
'shared/instructor'
,
object:
result
.
data
%>
<%=
render
partial:
'shared/instructor'
,
object:
result
.
data
%>
<%
end
%>
<%
end
%>
<%
else
%>
...
...
schedules/app/views/shared/_course.html.erb
View file @
5a9a1219
...
...
@@ -2,7 +2,7 @@
<div
class=
"card"
id=
"course-
<%=
course
.
id
%>
"
onclick=
"toggleSections(this)"
>
<div
class=
"card-header"
>
<h4>
<%=
"
#{
course
.
subject
}
#{
course
.
course_number
}
"
%>
</h4>
<h4
class=
"title"
>
<%=
"
#{
course
.
subject
}
#{
course
.
course_number
}
"
%>
</h4>
<h5><em>
<%=
course
.
title
%>
</em>
.
<%=
course
.
credits
%>
credits.
</h5>
<h4
id=
"add-course-btn"
onclick=
"addCourse(event, '
<%=
course
.
id
%>
');"
>
<i
class=
"fas fa-plus"
style=
"color: green"
></i>
...
...
@@ -29,9 +29,9 @@
<!-- List of Course Sections -->
<div
class=
"list-group list-group-flush sections"
style=
"display:
<%=
expanded
?
"flex"
:
"none"
%>
"
>
<%
if
defined?
(
@instructor
)
%>
<%=
render
partial:
'shared/section'
,
collection:
course
.
course_sections
.
where
(
instructor:
@instructor
),
locals:
{
in_cart:
fal
se
}
%>
<%=
render
partial:
'shared/section'
,
collection:
course
.
course_sections
.
where
(
instructor:
@instructor
),
locals:
{
course:
cour
se
}
%>
<%
else
%>
<%=
render
partial:
'shared/section'
,
collection:
course
.
course_sections
,
locals:
{
in_cart:
fal
se
}
%>
<%=
render
partial:
'shared/section'
,
collection:
course
.
course_sections
,
locals:
{
course:
cour
se
}
%>
<%
end
%>
</div>
</div>
...
...
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