-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additions to the observation unit UI #1975
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
664540d
Add observation unit feature filter
AndrewWood94 98ade7c
updated Config and tests to reflect new explicit observation_units_en…
stuzart a20309b
refactored the edit/new forms into a shared _form partial
stuzart e512210
Add create obs unit page
AndrewWood94 fc147ba
replace => style syntax, and fix test that now requires a study present
stuzart 9ef3ac4
Allow create observation unit
AndrewWood94 c89746a
revert changes to the controller create action
stuzart b591593
UI to link data files to an observation unit #1961
stuzart 52efdb7
associate samples via the fancy-multiselect #1961
stuzart e4833d8
implement the resource preview for samples #1961
stuzart df41d59
updated text following review, which still referred to assay instead …
stuzart File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<div class="asset_form"> | ||
<%= f.error_messages %> | ||
|
||
<div class="form-group"> | ||
<label class="required">Title</label> | ||
<%= f.text_field :title, class: "form-control" -%> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label>Description</label> | ||
<%= f.text_area :description, class: "form-control rich-text-edit", rows: 5 -%> | ||
</div> | ||
|
||
<%= render partial: 'extended_metadata/extended_metadata_type_selection', locals: { f: f, resource: @observation_unit } %> | ||
<%= render partial: 'extended_metadata/extended_metadata_attribute_input', locals: { f: f, resource: @observation_unit } %> | ||
|
||
<% if action == :new %> | ||
<%= render partial: "projects/project_selector", locals: { resource: @observation_unit } %> | ||
<% end %> | ||
|
||
<div class="form-group"> | ||
<label class="required"><%= t('study') -%></label> | ||
|
||
<%= resource_study_selection('observation_unit[study_id]', @observation_unit.study) %> | ||
</div> | ||
|
||
<%= render partial: "assets/asset_form_bottom", locals: {show_publications:false, attribution_enable: false, f: f} %> | ||
<%= f.fancy_multiselect :data_files, other_projects_checkbox: true %> | ||
<%= f.fancy_multiselect :samples, other_projects_checkbox: true %> | ||
|
||
|
||
<%= form_submit_buttons(@observation_unit) %> | ||
|
||
</div> |
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,35 +1,21 @@ | ||
|
||
<h1>New <%= t('observation_unit') %></h1> | ||
|
||
<%= form_for(@observation_unit) do |f| %> | ||
<div class="asset_form"> | ||
<%= f.error_messages %> | ||
|
||
<div class="form-group"> | ||
<label class="required">Title</label> | ||
<%= f.text_field :title, class: "form-control" -%> | ||
<% if Investigation.authorized_for('view').none? %> | ||
<%= alert_box('info') do %> | ||
<%= "No #{t('study')} and #{t('investigation')} available, you have to create a new #{t('investigation')} first before creating your #{t('study')} and #{t('observation_unit')}!" %> | ||
<% end %> | ||
<div class="text-center"> | ||
<%= button_link_to("New #{t('investigation')}", 'arrow_right', new_investigation_path) -%> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<label>Description</label> | ||
<%= f.text_area :description, class: "form-control rich-text-edit", rows: 5 -%> | ||
<% elsif Study.authorized_for('view').none? %> | ||
<%= alert_box('info') do %> | ||
<%= "No #{t('study')} available, you have to create a new #{t('study')} before creating your #{t('observation_unit')}!" %> | ||
<% end %> | ||
<div class="text-center"> | ||
<%= button_link_to("New #{t('study')}", 'arrow_right', new_study_path) -%> | ||
</div> | ||
|
||
<%= render partial: 'extended_metadata/extended_metadata_type_selection', locals: { f: f, resource: @observation_unit } %> | ||
<%= render partial: 'extended_metadata/extended_metadata_attribute_input', locals: { f: f, resource: @observation_unit } %> | ||
|
||
<%= render partial: "projects/project_selector", locals: { resource: @observation_unit } %> | ||
|
||
<div class="form-group"> | ||
<label class="required"><%= t('study') -%></label> | ||
|
||
<%= resource_study_selection('observation_unit[study_id]', @observation_unit.study) %> | ||
</div> | ||
|
||
<%= render partial: "assets/asset_form_bottom", locals: {show_publications:false, attribution_enable: false, f: f}-%> | ||
|
||
|
||
<%= form_submit_buttons(@observation_unit) %> | ||
|
||
</div> | ||
<% end %> | ||
<% else %> | ||
<h1>New <%= t('observation_unit') %></h1> | ||
<%= index_and_new_help_icon controller_name %> | ||
<%= form_for @observation_unit do |f| %> | ||
<%= render partial: "form", locals: { f: f, action: :new } -%> | ||
<% 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 |
---|---|---|
@@ -1 +1,16 @@ | ||
<strong>Preview Not Yet Implemented</strong> | ||
<% unless resource.nil? -%> | ||
|
||
<div data-tooltip='<%= tooltip(h(resource.title)) %>'> | ||
<p class="title"> | ||
<%= list_item_title resource -%> | ||
</p> | ||
|
||
<%= render :partial => 'projects/show_project_relationship', :locals => {:resource => resource, :list_item => false} -%> | ||
|
||
<%= list_item_contributors resource -%> | ||
|
||
<%= list_item_simple_list resource.creators, t('creator').capitalize.pluralize -%> | ||
<%= sample_type_list_item_attribute(t('sample_type'),resource) %> | ||
</div> | ||
|
||
<% 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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Text for no Investigation/Study available is still referencing Assay not Obs Unit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good spot