Commit 5a9a1219 authored by Zach Perkins's avatar Zach Perkins

Fixed some merged things

parent 6808de7e
Pipeline #3211 failed with stage
in 2 minutes and 9 seconds
......@@ -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 }));
......
......@@ -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 %>
......
......@@ -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: false } %>
<%= render partial: 'shared/section', collection: course.course_sections.where(instructor: @instructor), locals: { course: course } %>
<% else %>
<%= render partial: 'shared/section', collection: course.course_sections, locals: { in_cart: false } %>
<%= render partial: 'shared/section', collection: course.course_sections, locals: { course: course } %>
<% end %>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment