-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2254 from MushroomObserver/shared-notes-partial
Tidy up third and fourth panels: Identification and Projects/Lists
- Loading branch information
Showing
22 changed files
with
273 additions
and
285 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
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 |
---|---|---|
|
@@ -175,3 +175,8 @@ form { | |
display: inline-block; | ||
} | ||
} | ||
|
||
.overflow-scroll-checklist { | ||
max-height: 30rem; | ||
overflow-y: auto; | ||
} |
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
36 changes: 15 additions & 21 deletions
36
app/views/controllers/observations/form/_collection_number.html.erb
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,23 +1,17 @@ | ||
<%# specimen/collection_number section of create_observation form %> | ||
|
||
<div class="row mb-3"> | ||
|
||
<div class="col-sm-6"> | ||
<%= fields_for(:collection_number) do |fcn| %> | ||
<%= text_field_with_label(form: fcn, field: :name, | ||
value: @collectors_name, | ||
label: :collection_number_name.t + ":") %> | ||
<%= text_field_with_label( | ||
form: fcn, field: :number, value: @collectors_number, | ||
label: :collection_number_number.t + ":", | ||
data: { action: "specimen#checkCheckbox" }) %> | ||
<% end # fields_for %> | ||
</div> | ||
<div class="col-sm-6"> | ||
<%= help_block_with_arrow("left", id: "collection_number_help") do %> | ||
<%= :form_observations_collection_number_help.t %> | ||
<% end # help_block_with_arrow do %> | ||
</div> | ||
|
||
</div><!--.row--> | ||
<%= tag.div(class: "mt-3") do %> | ||
<% fields_for(:collection_number) do |fcn| %> | ||
<%= text_field_with_label( | ||
form: fcn, field: :name, | ||
value: @collectors_name, | ||
label: :collection_number_name.t + ":", | ||
help: :form_observations_collection_number_help.t | ||
) %> | ||
<%= text_field_with_label( | ||
form: fcn, field: :number, value: @collectors_number, | ||
label: :collection_number_number.t + ":", | ||
data: { action: "specimen#checkCheckbox" } | ||
) %> | ||
<% end %> | ||
<% end %> |
49 changes: 19 additions & 30 deletions
49
app/views/controllers/observations/form/_herbarium_record.html.erb
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,32 +1,21 @@ | ||
<%# specimen/herbarium_record section of create_observation form %> | ||
|
||
<div class="row mb-3"> | ||
|
||
<div class="col-sm-6"> | ||
<%= fields_for(:herbarium_record) do |fhr| %> | ||
|
||
<%= autocompleter_field( | ||
form: fhr, field: :herbarium_name, type: :herbarium, | ||
value: @herbarium_name, hidden: @herbarium_id, | ||
label: "#{:herbarium_record_herbarium_name.t}:", | ||
) %> | ||
|
||
<%= text_field_with_label( | ||
form: fhr, field: :accession_number, value: @accession_number, | ||
label: "#{:herbarium_record_accession_number.t}:", | ||
data: { action: "specimen#checkCheckbox" } | ||
) %> | ||
|
||
<%= text_field_with_label(form: fhr, field: :notes, value: "", | ||
label: "#{:herbarium_record_notes.t}:") %> | ||
|
||
<% end # fields_for(:herbarium_record) %> | ||
</div> | ||
<div class="col-sm-6"> | ||
<%= help_block_with_arrow("left", id: "herbarium_record_help") do %> | ||
<%= :form_observations_herbarium_record_help.t %> | ||
<% end # help_block_with_arrow do %> | ||
</div> | ||
|
||
</div><!--.row--> | ||
<%= tag.div(class: "mt-3") do %> | ||
<% fields_for(:herbarium_record) do |fhr| %> | ||
<%= autocompleter_field( | ||
form: fhr, field: :herbarium_name, type: :herbarium, | ||
value: @herbarium_name, hidden: @herbarium_id, | ||
label: "#{:herbarium_record_herbarium_name.t}:", | ||
help: :form_observations_herbarium_record_help.t | ||
) %> | ||
<%= text_field_with_label( | ||
form: fhr, field: :accession_number, value: @accession_number, | ||
label: "#{:herbarium_record_accession_number.t}:", | ||
data: { action: "specimen#checkCheckbox" } | ||
) %> | ||
<%= text_field_with_label( | ||
form: fhr, field: :notes, value: "", | ||
label: "#{:herbarium_record_notes.t}:" | ||
) %> | ||
<% end %> | ||
<% end %> |
27 changes: 27 additions & 0 deletions
27
app/views/controllers/observations/form/_identification.html.erb
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 @@ | ||
<%= panel_block(id: "observation_identification", | ||
heading: :IDENTIFICATION.l) do %> | ||
<%= tag.div(class: "row mt-3") do %> | ||
<%= tag.div(class: "col-xs-12 col-sm-6") do %> | ||
<% if include_naming | ||
naming_locals = { | ||
f: f, | ||
action: action, | ||
button_name: button_name, | ||
show_reasons: false, | ||
unfocused: true, | ||
name_help: :form_naming_name_help_leave_blank.t | ||
} %> | ||
<%= render(partial: "observations/namings/fields", | ||
locals: naming_locals) %> | ||
<% end %> | ||
<%= render(partial: "observations/form/specimen_section", | ||
locals: { f:, button_name: }) %> | ||
<% end %> | ||
<%= tag.div(class: "col-xs-12 col-sm-6") do %> | ||
<%= render(partial: "shared/notes_fields", | ||
locals: { form: f, | ||
fields: @observation.form_notes_parts(@user) }) %> | ||
<% end %> | ||
<% end %> | ||
<%= submit_button(form: f, button: button_name, center: true) %> | ||
<% end %> |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.