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

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="row">
<div class="col-5"> <div class="col-12 col-lg">
<h1><%= @course.full_name %></h1> <h1><%= @course.full_name %></h1>
<h4><%= @course.title %></h4> <h4><%= @course.title %></h4>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<p><%= @course.description %></p> <p><%= @course.description %></p>
</div> </div>
<div class="col-7"> <div class="col-12 col-lg">
<%= render partial: 'shared/section', collection: @course.course_sections %> <%= render partial: 'shared/section', collection: @course.course_sections %>
</div> </div>
</div> </div>
......
<div class="row"> <div class="row">
<div class="col-md-4 col-sm-12"> <div class="col-lg-4 col-12">
<h1><%= @instructor.name %></h1> <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? %> <% if prev.count.positive? %>
<strong>Previously taught: </strong> <strong>Previously taught: </strong>
<ul> <ul>
<% prev.each do |s| %> <% prev.each do |s| %>
<li><%= s %></li> <li><%= link_to s.full_name, course_path(s) %></li>
<% end %> <% end %>
</ul> </ul>
<% end %> <% end %>
</div> </div>
<div class ="col-md-8 col-sm-12"> <div class ="col-lg-8 col-12">
<h3><%= @semester.to_s %></h3> <h3><%= @semester.to_s %></h3>
<% if @courses.any? %> <% if @courses.any? %>
<%= render partial: 'shared/course', collection: @courses, locals: { expanded: true } %> <%= render partial: 'shared/course', collection: @courses, locals: { expanded: true } %>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<head> <head>
<title>Schedules</title> <title>Schedules</title>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<%= javascript_include_tag 'masonstrap.min' %> <%= javascript_include_tag 'masonstrap.min' %>
<%= javascript_include_tag 'application' %> <%= javascript_include_tag 'application' %>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="row"> <div class="row">
<!-- Search result, List of Courses --> <!-- 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 %> <%= yield %>
</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