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

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 ...@@ -5,7 +5,7 @@ const sectionWithCrn = crn => document.getElementById('search-list').querySelect
const addCourse = (event, id) => { const addCourse = (event, id) => {
const courseCard = document.getElementById(`course-${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 sectionsItems = Array.from(courseCard.querySelectorAll('li'));
const sections = sectionsItems.map(li => ({ ...li.dataset })); const sections = sectionsItems.map(li => ({ ...li.dataset }));
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<% if result.type == :course %> <% if result.type == :course %>
<%= render partial: 'shared/course', object: result.data %> <%= render partial: 'shared/course', object: result.data %>
<% elsif result.type == :instructor %> <% elsif result.type == :instructor %>
<%= render partial: 'shared/instructor', object: result.data%> <%= render partial: 'shared/instructor', object: result.data %>
<% end %> <% end %>
<% end %> <% end %>
<% else %> <% else %>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="card" id="course-<%= course.id %>" onclick="toggleSections(this)"> <div class="card" id="course-<%= course.id %>" onclick="toggleSections(this)">
<div class="card-header"> <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> <h5><em><%= course.title %></em>. <%= course.credits %> credits.</h5>
<h4 id="add-course-btn" onclick="addCourse(event, '<%= course.id %>');"> <h4 id="add-course-btn" onclick="addCourse(event, '<%= course.id %>');">
<i class="fas fa-plus" style="color: green"></i> <i class="fas fa-plus" style="color: green"></i>
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
<!-- List of Course Sections --> <!-- List of Course Sections -->
<div class="list-group list-group-flush sections" style="display: <%= expanded ? "flex" : "none" %>"> <div class="list-group list-group-flush sections" style="display: <%= expanded ? "flex" : "none" %>">
<% if defined?(@instructor) %> <% 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 %> <% 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 %> <% end %>
</div> </div>
</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