-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aff3c1e
commit 393eb4f
Showing
11 changed files
with
78 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class PlannerController < ApplicationController | ||
def index | ||
end | ||
|
||
def show | ||
@course = Course.find_by_code(params[:course_code]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module PlannerHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
class Planner extends React.Component { | ||
|
||
} | ||
|
||
export default Planner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<h1> Course Planner </h1> | ||
|
||
<h4> Please select the course you would like to plan: </h4> | ||
<br /> | ||
<%= | ||
react_component("Search", { | ||
searchUrl: api_search_courses_path, | ||
selectUrl: planner_path(':code') | ||
}) | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<h1> Course Planner </h1> | ||
<h5> <%= @course.name %> </h5> | ||
|
||
<% if @course.streams.count > 0 %> | ||
<br /> | ||
<h4> This course has streams. Please select which stream you wish to plan </h4> | ||
<ul class="list-group"> | ||
<li class="list-group-item"> <span class="tip" data-toggle="tooltip" data-placement="top" title="Select a stream to see its unit breakdown."><strong>Streams</strong></span> </li> | ||
<% @course.streams.each do |stream| %> | ||
<li class="list-group-item"> <a href="<%= planner_path(stream.code) %>"> <%= stream.code %> - <%= stream.name %> </a> </li> | ||
<% end %> | ||
</ul> | ||
<% else %> | ||
|
||
<p> | ||
|
||
<i class="fas fa-book"> </i> <a href="<%= @course.url %>" target="_blank"> Handbook </a> <br /> | ||
<% if @course.stream_parent %> | ||
<i class="fas fa-stream"> </i> Stream of <%= @course.stream_parent.code %> - <%= @course.stream_parent.name %><br /> | ||
<% end %> | ||
<br /> | ||
|
||
<i class="fas fa-project-diagram"> </i> <a href="<%= course_path(@course.code) %>"> Go to course page </a> | ||
</p> | ||
|
||
|
||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
require 'test_helper' | ||
|
||
class PlannerControllerTest < ActionDispatch::IntegrationTest | ||
# test "the truth" do | ||
# assert true | ||
# end | ||
end |