Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abstracted forms into partials and created edit actions where they we…
…re missing.
- Loading branch information
Showing
9 changed files
with
44 additions
and
29 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
app/views/chromatographic_columns/_chromatographic_column_form.html.haml
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,16 @@ | ||
= simple_form_for @chromatographic_column do |f| | ||
= f.input :name | ||
= f.input :instrument_id, :collection => Instrument.all, :as => :select | ||
%h2 Add dynamic method association select here! | ||
= f.input :brand | ||
%p | ||
= f.label :description | ||
%br/ | ||
= f.text_area :description, :rows => 2, :cols => 40 | ||
= f.input :serial | ||
= f.input :received | ||
%p | ||
= f.label :notes | ||
%br/ | ||
= f.text_area :notes, :rows => 2, :cols => 40 | ||
= f.submit @chromatographic_column.new_record? ? 'Add column' : 'Edit column' |
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,3 @@ | ||
%h1 Edit column | ||
|
||
= render :partial => 'chromatographic_columns/chromatographic_column_form' |
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,3 +1,4 @@ | ||
%h1 Column index | ||
%h2= link_to "New column", new_chromatographic_column_path | ||
|
||
= render @chromatographic_columns |
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,12 +1,3 @@ | ||
%h1 New column | ||
|
||
= simple_form_for @chromatographic_column do |f| | ||
= f.input :name | ||
= f.input :instrument_id, :collection => Instrument.all, :as => :select | ||
%h2 Add dynamic method association select here! | ||
= f.input :brand | ||
= f.input :description | ||
= f.input :serial | ||
= f.input :received | ||
= f.input :notes | ||
= f.submit 'Add column' | ||
= render :partial => 'chromatographic_columns/chromatographic_column_form' |
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,5 +1,6 @@ | ||
- title "Instrument index" | ||
|
||
%h1 Instrument index | ||
%h2= link_to "New instrument", new_instrument_path | ||
|
||
= render @instruments |
17 changes: 17 additions & 0 deletions
17
app/views/maintenance_events/_maintenance_event_form.html.haml
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,17 @@ | ||
= simple_form_for @maintenance_event do |f| | ||
= f.input :instrument_id, :collection => Instrument.all, :as => :select | ||
= f.input :user_id, :label => "Technician", :collection => User.all, :as => :select | ||
= f.input :date | ||
%p | ||
= f.label :problem | ||
%br/ | ||
= f.text_area :problem, :rows => 2, :cols => 40 | ||
%p | ||
= f.label :maintenance_performed | ||
%br/ | ||
= f.text_area :maintenance_performed, :rows => 2, :cols => 40 | ||
%p | ||
= f.label :result | ||
%br/ | ||
= f.text_area :result, :rows => 2, :cols => 40 | ||
= f.submit @maintenance_event.new_record? ? 'Log maintenance event' : 'Update maintenance event' |
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,3 @@ | ||
%h1 Edit maintenance event | ||
|
||
= render :partial => 'maintenance_events/maintenance_event_form' |
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,19 +1,3 @@ | ||
%h1 Add a maintenance event | ||
|
||
= simple_form_for @maintenance_event do |f| | ||
= f.input :instrument_id, :collection => Instrument.all, :as => :select | ||
= f.input :user_id, :label => "Technician", :collection => User.all, :as => :select | ||
= f.input :date | ||
%p | ||
= f.label :problem | ||
%br/ | ||
= f.text_area :problem, :rows => 2, :cols => 40 | ||
%p | ||
= f.label :maintenance_performed | ||
%br/ | ||
= f.text_area :maintenance_performed, :rows => 2, :cols => 40 | ||
%p | ||
= f.label :result | ||
%br/ | ||
= f.text_area :result, :rows => 2, :cols => 40 | ||
= f.button :submit | ||
= render :partial => 'maintenance_events/maintenance_event_form' |