Skip to content

Commit

Permalink
Merge pull request #473 from CDLUC3/v4.1.0-beta
Browse files Browse the repository at this point in the history
V4.1.0 beta
  • Loading branch information
briri authored May 10, 2023
2 parents 885d162 + 0e9cac1 commit 457a573
Show file tree
Hide file tree
Showing 97 changed files with 3,506 additions and 691 deletions.
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,42 @@

## DMPTool Releases

### v4.1.0
**Note: This version includes a change to the research_outputs table!** We have added a new `research_outputs.research_output_type` field that stores a string value. It is a replacement for the old `research_outputs.output_type` integer field. You will need to run: `bin/rails db:migrate && bin/rails v4:upgrade_4_1_0` to make the change to your data model and migrate your existing data to the new field.

Updated the Admin Template edit page with a new 'Preferences' tab. This new tab allows admins to specify whether or not the Research Outputs tab will be available to the researcher when filling out their plan. If enabled, the admin can specify preferred/recommended output types, licenses, metadata standards and repositories. They can also provide guidance to the research to help them with their selections of those items.

- Added the following columns to the `templates` table
- `enable_research_outputs`
- `user_guidance_output_types`
- `user_guidance_repositories`
- `user_guidance_metadata_standards`
- `user_guidance_licenses`
- `customize_output_types`
- `customize_repositories`
- `customize_metadata_standards`
- `customize_licenses`
- Updated the Templates model (and RSpec factory and tests) to use new field
- Created the Template Preferences View
- Removed 'Embargoed' from the list of Research Output Type's initial access level and changed the names of the other options. (Left the enum intact on the model for now so that data can be migrated)
- Added a new 'OTHER' license type (does not appear in JSON output because it has no valid URI)
- Added column `research_output_type` to the `research_outputs` table
- Added `v4:upgrade_4_1_0` rake task to migrate data from `output_type` and `output_type_description` to the new `research_output_type` field. The task also adds a default 'OTHER' license and migrates `resource_output.access` from embargoed to closed
- Updated the ResearchOutput model (and RSpec factory and tests) to use new field
- Replaced the old `output_types` enum on the ResearchOutput model with `DEFAULT_OUTPUT_TYPES` array
- Updated presenters (and RSpec tests) and controller to work with the new field
- Created table template_licenses
- Created UI to save preferred Licenses for a Template
- Created table template_output_types
- Created UI to save preferred Output Types for a Template
- Created table template_repositories
- Customize modal search to populate this relation
- Created table template_metadata_standards
- Customize modal search to populate this relation
- Modify repositories table to allow for the definition of customized repositories for a template.
- UI to create customized repositories
- UI to select customized, preferred and/or standard repositories for a research output.

### v4.0.8

### Features
Expand Down
54 changes: 29 additions & 25 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ GEM
activerecord (6.1.7.3)
activemodel (= 6.1.7.3)
activesupport (= 6.1.7.3)
activerecord_json_validator (2.1.3)
activerecord_json_validator (2.1.4)
activerecord (>= 4.2.0, < 8)
json_schemer (~> 0.2.18)
activestorage (6.1.7.3)
Expand All @@ -83,15 +83,15 @@ GEM
rake (>= 10.4, < 14.0)
annotate_gem (0.0.14)
bundler (>= 1.1)
anyway_config (2.4.0)
anyway_config (2.4.1)
ruby-next-core (>= 0.14.0)
api-pagination (5.0.0)
ast (2.4.2)
autoprefixer-rails (10.4.13.0)
execjs (~> 2)
aws-eventstream (1.2.0)
aws-partitions (1.750.0)
aws-sdk-core (3.171.0)
aws-partitions (1.762.0)
aws-sdk-core (3.172.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
Expand All @@ -102,10 +102,10 @@ GEM
aws-sigv4 (1.5.2)
aws-eventstream (~> 1, >= 1.0.2)
bcrypt (3.1.18)
better_errors (2.9.1)
coderay (>= 1.0.0)
better_errors (2.10.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
rouge (>= 1.0.0)
bibtex-ruby (6.0.0)
latex-decode (~> 0.0)
bindex (0.8.1)
Expand Down Expand Up @@ -225,7 +225,7 @@ GEM
faraday (2.7.4)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-http-cache (2.4.1)
faraday-http-cache (2.5.0)
faraday (>= 0.8)
faraday-net_http (3.0.2)
ffi (1.15.5)
Expand Down Expand Up @@ -280,7 +280,7 @@ GEM
httparty (0.21.0)
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.12.0)
i18n (1.13.0)
concurrent-ruby (~> 1.0)
jbuilder (2.11.5)
actionview (>= 5.0.0)
Expand Down Expand Up @@ -319,7 +319,7 @@ GEM
rb-inotify (~> 0.9, >= 0.9.10)
locale (2.1.3)
logger (1.5.3)
loofah (2.20.0)
loofah (2.21.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
Expand Down Expand Up @@ -386,9 +386,9 @@ GEM
options (2.3.2)
orm_adapter (0.5.0)
parallel (1.23.0)
parser (3.2.2.0)
parser (3.2.2.1)
ast (~> 2.4.1)
pg (1.4.6)
pg (1.5.3)
prime (0.1.2)
forwardable
singleton
Expand All @@ -404,10 +404,10 @@ GEM
nio4r (~> 2.0)
pundit (2.3.0)
activesupport (>= 3.0.0)
pundit-matchers (2.0.0)
pundit-matchers (2.1.0)
rspec-rails (>= 3.0.0)
racc (1.6.2)
rack (2.2.6.4)
rack (2.2.7)
rack-attack (6.6.1)
rack (>= 1.0, < 3)
rack-mini-profiler (3.1.0)
Expand Down Expand Up @@ -459,24 +459,25 @@ GEM
railties (>= 5.2)
rexml (3.2.5)
rollbar (3.4.0)
rouge (4.1.0)
rspec-collection_matchers (1.2.0)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.1)
rspec-rails (6.0.2)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.11)
rspec-expectations (~> 3.11)
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-core (~> 3.12)
rspec-expectations (~> 3.12)
rspec-mocks (~> 3.12)
rspec-support (~> 3.12)
rspec-support (3.12.0)
rss (0.2.9)
rexml
Expand All @@ -490,10 +491,12 @@ GEM
rubocop-ast (>= 1.28.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.28.0)
rubocop-ast (1.28.1)
parser (>= 3.2.1.0)
rubocop-capybara (2.17.1)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.22.0)
rubocop (~> 1.33)
rubocop-i18n (3.0.0)
rubocop (~> 1.0)
rubocop-performance (1.17.1)
Expand All @@ -503,9 +506,10 @@ GEM
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.20.0)
rubocop-rspec (2.22.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
ruby-next-core (0.15.3)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
Expand All @@ -514,7 +518,7 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
selenium-webdriver (4.8.6)
selenium-webdriver (4.9.1)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
Expand Down Expand Up @@ -550,7 +554,7 @@ GEM
text (1.3.1)
thor (1.2.1)
tomparse (0.4.2)
translation (1.35)
translation (1.36)
gettext (~> 3.2, >= 3.2.5, <= 3.4.3)
turbo-rails (1.4.0)
actionpack (>= 6.0.0)
Expand Down Expand Up @@ -598,7 +602,7 @@ GEM
tomparse (>= 0.4.0)
yard
zaru (1.0.0)
zeitwerk (2.6.7)
zeitwerk (2.6.8)

PLATFORMS
arm64-darwin-21
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/blocks/_modal_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
margin: 5px 2px;
}
.tags .facet {
background-color: $color-white;
color: $color-blue;
border: 1px solid $color-blue;
border-radius: 25px;
padding: 2px 5px;
Expand Down
4 changes: 3 additions & 1 deletion app/assets/stylesheets/dmptool/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@
@use 'oauth';
@use 'search';
@use 'sso_bypass';
@use 'static_pages';
@use 'static_pages';
@use 'template_preferences';
@use 'tinymce';
66 changes: 66 additions & 0 deletions app/assets/stylesheets/dmptool/_template_preferences.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
@use '../variables/colours' as *;

.selectable_items ul {
padding-left: 0px;
}

li.selectable_item {
display: inline-block;
}

span.selectable_item_label {
padding: 4px;
border: thin solid $color-grey-darker;
border-radius: 5px; margin: 3px;
display: inline-block;
}

button.selectable_item_button {
color: $color-secondary-text;
background-color: $color-secondary-background;
padding-right: 4px;
border: none;
}

li.selectable_item .standard {
color: $color-secondary-text;
background-color: $color-secondary-background;
}

li.selectable_item .custom {
color: $color-primary-text;
background-color: $color-primary-background;
}

fieldset.selectable_items {
border: thin solid $color-grey-darker;
padding: 10px;
border-radius: 5px;
}

div.selectable_items {
margin-bottom: 30px;
}

div.selectable_items input {
border-color: $color-grey-darker
}

fieldset.user-guidance {
padding: 4px;
border: thin solid $color-grey-darker;
border-radius: 5px; margin: 3px;
}

#new_license {
display: inline-block;
width: 60%;
}

.customized_repositories button.modal-search-result-unselector {
margin-left: 4px;
}

ul#preference-errors {
list-style: none;
}
3 changes: 3 additions & 0 deletions app/assets/stylesheets/dmptool/_tinymce.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.tinymce-help {
margin-top: 5px;
}
3 changes: 2 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ def obj_name_for_display(obj)
Perm: _('permission'),
Pref: _('preferences'),
User: obj == current_user ? _('profile') : _('user'),
QuestionOption: _('question option')
QuestionOption: _('question option'),
ResearchOutput: _('Research Output')
}
if obj.respond_to?(:customization_of) && obj.send(:customization_of).present?
display_name[:Template] = 'customization'
Expand Down
Loading

0 comments on commit 457a573

Please sign in to comment.