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
Showing
10 changed files
with
178 additions
and
50 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
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 |
---|---|---|
@@ -1,37 +1 @@ | ||
<%= form_for(@offering) do |f| %> | ||
<% if @offering.errors.any? %> | ||
<div id="error_explanation"> | ||
<h2><%= pluralize(@offering.errors.count, "error") %> prohibited this offering from being saved:</h2> | ||
|
||
<ul> | ||
<% @offering.errors.full_messages.each do |msg| %> | ||
<li><%= msg %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
|
||
<div class="field"> | ||
<%= f.label :term_id, "Term" %><br /> | ||
<%= f.collection_select :term_id, AcademicTerm.all, :id, :title, :prompt => "Select a Term" %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :course_id, "Course" %><br /> | ||
<%= f.collection_select :course_id, Course.find(:all), :id, :course_field, :prompt => "Select a Course" %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :section %><br /> | ||
<%= f.text_field :section %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :crn %><br /> | ||
<%= f.text_field :crn %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :location %><br /> | ||
<%= f.text_field :location %> | ||
</div> | ||
<div class="actions"> | ||
<%= f.submit %> | ||
</div> | ||
<% end %> | ||
<h1 class='fail'>Nothing here</h1> |
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 |
---|---|---|
@@ -1,2 +1,86 @@ | ||
<h1 class="fail">Nothing here</h1> | ||
<%= form_for(@offering, :html => {:class => 'form-horizontal edit-offering'}) do |f| %> | ||
<% if @offering.errors.any? %> | ||
<div id="error_explanation"> | ||
<h2><%= pluralize(@offering.errors.count, "error") %> prohibited this offering from being saved:</h2> | ||
|
||
<ul> | ||
<% @offering.errors.full_messages.each do |msg| %> | ||
<li><%= msg %></li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
|
||
<div class="field"> | ||
<%= f.label :crn %> | ||
<%= f.text_field :crn %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :term_id, "Term" %> | ||
<%= f.collection_select :term_id, AcademicTerm.all, :id, :title, :prompt => "Select a Term" %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :course_id, "Course" %> | ||
<%= f.collection_select :course_id, Course.find(:all), :id, :course_field, :prompt => "Select a Course" %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :section %> | ||
<%= f.text_field :section %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :credits %> | ||
<%= f.text_field :credits %> | ||
</div> | ||
|
||
<div class="field"> | ||
<%= f.label :required %> | ||
<%= | ||
options = [ | ||
["Required for BSCE", "Required for BSCE"], | ||
["Required for BSENVE", "Required for BSENVE"], | ||
["Elective for BSCE", "Elective for BSCE"], | ||
["Elective for BSENVE", "Elective for BSENVE"] | ||
] | ||
#f.select(:required_or_elective, options, {}, {:multiple=>true}) | ||
|
||
# FIXME Use a control like a multi-select or radio button groups | ||
# instead of a textfield for required_or_elective | ||
f.text_field :required_or_elective | ||
%> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :instructors %> | ||
<%= | ||
f.collection_select :instructor_ids, User.with_role(:instructor).all, :id, | ||
:name, {}, {:multiple => true} | ||
%> | ||
</div> | ||
<div class="field"> | ||
<%= f.label "Day/Time" %> | ||
<%= f.text_field :day_and_time %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :prerequisites %> | ||
<%= f.text_area :prerequisites %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :textbook %> | ||
<%= f.text_area :textbook %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :additional_textbooks %> | ||
<%= f.text_area :additional_textbooks %> | ||
</div> | ||
<div class="field"> | ||
<%= f.label :location %> | ||
<%= f.text_field :location %> | ||
</div> | ||
<div class="actions"> | ||
<%= f.submit %> | ||
</div> | ||
<% end %> | ||
|
||
<p> | ||
<%= link_to 'View', offering_details_path(@offering) %> | | ||
<%= link_to 'Return to offering List', offerings_path %> | ||
</p> |
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 |
---|---|---|
@@ -1,2 +1,74 @@ | ||
<h1 class="fail">Nothing here</h1> | ||
|
||
<table class='offering-details-view'> | ||
<tr> | ||
<td>CRN#</td><td><%= @offering.crn %></td> | ||
</tr> | ||
<tr> | ||
<td>Term</td><td><%= @term.title %></td> | ||
</tr> | ||
<tr> | ||
<td>Course</td><td><%= "#{@course.dept_code} #{@course.course_num}" %></td> | ||
</tr> | ||
<tr> | ||
<td>Title</td><td><%= @course.title %></td> | ||
</tr> | ||
<tr> | ||
<td>Section</td><td><%= @offering.section %></td> | ||
</tr> | ||
<tr> | ||
<td>Credits</td><td><%= @offering.credits %></td> | ||
</tr> | ||
<tr> | ||
<td>Required/Elective</td> | ||
<td> | ||
<%= @offering.required_or_elective %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Instructor(s)</td> | ||
<td> | ||
<%= | ||
str = "" | ||
@instructors.each { |instructor| str << "#{instructor.name}, " } | ||
str.chomp!(", ") | ||
str | ||
%> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Day/Time</td> | ||
<td> | ||
<%= @offering.day_and_time %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Prerequisites</td> | ||
<td> | ||
<%= @offering.prerequisites %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Textbook</td> | ||
<td> | ||
<%= @offering.textbook %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Additional Textbook(s)</td> | ||
<td> | ||
<%= @offering.additional_textbooks %> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Location</td> | ||
<td> | ||
<%= @offering.location %> | ||
</td> | ||
</tr> | ||
</table> | ||
<p> | ||
<%= | ||
link_to_if can?(:edit, @offering), 'Edit', | ||
edit_offering_details_path(@offering) | ||
%> | ||
| <%= link_to 'Return to offering List', offerings_path %> | ||
</p> |
This file was deleted.
Oops, something went wrong.
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