Commit 2a340f08 authored by Zac Wood's avatar Zac Wood

layout changes, link_to courses on instructor page

parent 8ecb3aa9
Pipeline #3373 passed with stage
in 2 minutes and 12 seconds
<div class="row">
<div class="col-5">
<div class="col-12 col-lg">
<h1><%= @course.full_name %></h1>
<h4><%= @course.title %></h4>
......@@ -24,7 +24,7 @@
<p><%= @course.description %></p>
</div>
<div class="col-7">
<div class="col-12 col-lg">
<%= render partial: 'shared/section', collection: @course.course_sections %>
</div>
</div>
......
<div class="row">
<div class="col-md-4 col-sm-12">
<div class="col-lg-4 col-12">
<h1><%= @instructor.name %></h1>
<% prev = @instructor.course_sections.reject { |s| s.course.semester == @semester }.map { |s| s.name.split[0..1].join(' ') }.uniq %>
<% prev = @instructor.course_sections.map(&:course).reject { |c| c.semester == @semester } %>
<% if prev.count.positive? %>
<strong>Previously taught: </strong>
<ul>
<% prev.each do |s| %>
<li><%= s %></li>
<li><%= link_to s.full_name, course_path(s) %></li>
<% end %>
</ul>
<% end %>
</div>
<div class ="col-md-8 col-sm-12">
<div class ="col-lg-8 col-12">
<h3><%= @semester.to_s %></h3>
<% if @courses.any? %>
<%= render partial: 'shared/course', collection: @courses, locals: { expanded: true } %>
......
......@@ -3,6 +3,7 @@
<head>
<title>Schedules</title>
<%= csrf_meta_tags %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%= javascript_include_tag 'masonstrap.min' %>
<%= javascript_include_tag 'application' %>
......
......@@ -3,7 +3,7 @@
<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">
<div class="col-lg-8 col-12 col-sm-10 mx-auto order-2 order-lg-0" id="search-list">
<%= yield %>
</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