Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
509d7b2
add ability to merge Orgs
briri Dec 15, 2020
23187c3
Merge branch 'development' into merge-orgs
briri Dec 15, 2020
177f66e
fix to plan merges for org.merge
briri Feb 10, 2021
d1e7b73
Merge branch 'development' into merge-orgs
briri Mar 10, 2021
2fcab79
fixed some rubocop issues
briri Mar 10, 2021
42ea9c1
Merge branch 'master' into merge-orgs
briri Mar 10, 2021
875632a
Merge branch 'development' into merge-orgs
briri Mar 10, 2021
48e9472
Merge branch 'development' into merge-orgs
briri Mar 25, 2021
bcce080
Merge branch 'development' into merge-orgs
briri Apr 1, 2021
d0d5da0
Merge branch 'development' into merge-orgs
briri Apr 12, 2021
e448d88
Merge branch 'development' into merge-orgs
briri Apr 18, 2021
6a3e001
Merge branch 'development' into merge-orgs
briri Apr 20, 2021
0cbc81f
fix rubocop and eslinter issues
briri Apr 26, 2021
2641e26
Merge branch 'merge-orgs' of github.com:DMPRoadmap/roadmap into merge…
briri Apr 26, 2021
a740764
bumped caches for gihub actions
briri Apr 26, 2021
8e7fcce
fix for failing test
briri Apr 26, 2021
7c914bf
fix for failing test
briri Apr 26, 2021
fe644e5
run application within RAILS_RELATIVE_URL_ROOT
nicolasfranck May 12, 2021
6ecbfad
bug fix: customization upgrade #2898
raycarrick-ed Jun 11, 2021
9c96cbf
fixed issue where users who create an account rather than accept an i…
briri Jun 15, 2021
95d7612
update to transfer customizations controller to first publish the cus…
briri Jun 18, 2021
ac936e0
added tasks to fix up template and its children that have nil version…
briri Jun 18, 2021
5af595b
cleanup and a small reorg of the rake tasks
briri Jun 18, 2021
df0ec0f
update to cover prior versions of a customized template and stop chan…
briri Jun 18, 2021
857b713
Merge branch 'master' into versionable_id-fix
briri Jun 18, 2021
1e49dc8
patch for typo in customization updates
briri Jun 18, 2021
34488a5
Merge branch 'versionable_id-fix' of github.com:DMPRoadmap/roadmap in…
briri Jun 18, 2021
b9b3013
make rubocop ignore line length issues
briri Jun 18, 2021
6d20a91
minor update to catch records missed when resetting versionable_id
briri Jun 21, 2021
80ffa02
rubocop cleanup
briri Jun 21, 2021
3546d71
rubocop fixes for other rake tasks
briri Jun 21, 2021
3859fa0
removed obsolete NotificationType from seeds.rb
briri Jun 21, 2021
86fc3f2
Merge branch 'development' into versionable_id-fix
briri Jun 21, 2021
081aad2
add 'other' role to contributors page
briri Jun 29, 2021
a812b42
fixed layout of roles on contributor form
briri Jun 29, 2021
4aa1d93
found a better spinner gif and updated to restrict the size of the sp…
briri Jun 29, 2021
525596a
Merge branch 'DMPRoadmap:master' into deploy/dmponline
raycarrick-ed Jul 10, 2021
525d7a2
Issue #462 - Fix for the case where API calls for Plans was failing in
Jul 5, 2021
e72bbee
Merge branch 'development' into bug_462_api_not_possible_to_get_plan_…
briri Jul 12, 2021
8b9de21
Merge pull request #2965 from DigitalCurationCentre/bug_462_api_not_p…
raycarrick-ed Jul 14, 2021
52e6986
added tr-TR language and ran translation:sync
briri Jun 23, 2021
00a98d3
tried to sync tr-TR
briri Jun 23, 2021
65508f8
added tr-TR to the correct Translation.io account and ran translation…
briri Jun 23, 2021
bc4db89
could still create new orgs when adding contributor
raycarrick-ed Jul 1, 2021
565825b
Update contributors_controller.rb
raycarrick-ed Jul 5, 2021
9af7ace
Update contributors_controller.rb
raycarrick-ed Jul 5, 2021
f69aa57
Update contributors_controller_spec.rb
raycarrick-ed Jul 5, 2021
b2dfc11
fix and add more tests for restrict_orgs
raycarrick-ed Jul 6, 2021
7c4829d
fixes for rubocop
raycarrick-ed Jul 6, 2021
a287642
translation:sync 2021/07/14
raycarrick-ed Jul 14, 2021
cbb0ada
Issue #462 - Fix for error messaging when you attempt Merge accounts
Jul 14, 2021
d0b078f
Change application name so it's not always lowercase
martaribeiro Jul 15, 2021
a496343
Merge branch 'development' into add-other-role
raycarrick-ed Jul 15, 2021
eb50fe6
Merge branch 'development' into add-spinner
raycarrick-ed Jul 15, 2021
7444b95
Merge pull request #2961 from DMPRoadmap/add-other-role
raycarrick-ed Jul 15, 2021
4db93fc
Merge branch 'development' into add-spinner
raycarrick-ed Jul 15, 2021
6e1d0d3
Merge pull request #2960 from DMPRoadmap/add-spinner
raycarrick-ed Jul 15, 2021
553ef57
removed ror/fundref ids from the project details page
briri Jul 16, 2021
11a6ca5
Merge branch 'development' into translation_sync_july_2021
briri Jul 16, 2021
fdccc29
Merge pull request #2969 from DMPRoadmap/translation_sync_july_2021
briri Jul 16, 2021
927e5ee
fix for issue adding records to exported_plans table
briri Jul 16, 2021
4229942
made user optional on exported_plans for public dmp downloads
briri Jul 16, 2021
acde674
attempt to fix randomly failing test
briri Jul 19, 2021
d50356f
Merge branch 'master' into issue2859
briri Jul 19, 2021
9698f11
Merge branch 'master' into issue2968
briri Jul 19, 2021
861721a
Merge branch 'development' into bug_423_merging_accounts
briri Jul 19, 2021
2c8eccd
Merge pull request #2970 from DigitalCurationCentre/bug_423_merging_a…
briri Jul 19, 2021
bb1ba88
Merge branch 'development' into pagination-in-query-string
briri Jul 19, 2021
8393d95
Merge branch 'development' into versionable_id-fix
briri Jul 19, 2021
1b97135
Merge branch 'development' into invitation-fix
briri Jul 19, 2021
776a91f
updated csv export to record user if available
briri Jul 19, 2021
6161b2c
Merge branch 'issue2859' of github.com:DMPRoadmap/roadmap into issue2859
briri Jul 19, 2021
207afa8
Fix Spec related to the previous commit
martaribeiro Jul 20, 2021
06551ef
Fix Spec related to the previous commit
martaribeiro Jul 20, 2021
c3b2d1f
fixed typo
briri Jul 20, 2021
961efeb
Merge branch 'development' into merge-orgs
briri Jul 20, 2021
3c9cbef
Merge branch 'development' into merge-orgs
briri Jul 20, 2021
ab9fea3
Fix Spec related to the removing down case in application name
martaribeiro Jul 20, 2021
f4ed7f4
patch to allow toggleSpinner() to be called via js.erb templates
briri Jul 20, 2021
f249aea
fix rubocop
briri Jul 20, 2021
e69b85d
Issue related to removing down case in application name fix the api r…
martaribeiro Jul 20, 2021
8653a9d
Merge branch 'development' into fix_issue_2897
briri Jul 23, 2021
44a171c
Merge branch 'master' into remove_lowercase_from_application_name
briri Jul 23, 2021
753a0f5
Merge pull request #2974 from DigitalCurationCentre/remove_lowercase_…
briri Jul 23, 2021
39f80ec
Merge branch 'master' into issue2859
briri Jul 23, 2021
a5720bd
Merge branch 'master' into issue2968
briri Jul 23, 2021
4e59a8b
Issue #2972 - Add project Start and End Dates, ID and Grant Number to…
Jul 26, 2021
70a16cc
Merge pull request #2900 from nicolasfranck/fix_issue_2897
raycarrick-ed Jul 26, 2021
7200145
Merge branch 'development' into update-spinner
briri Jul 26, 2021
18462c2
Merge branch 'master' into bug_template_customization
briri Jul 26, 2021
cabe6d3
Merge pull request #2975 from DMPRoadmap/issue2859
briri Jul 26, 2021
f6ebf03
Merge branch 'master' into issue2968
briri Jul 26, 2021
30f4590
Merge pull request #2973 from DMPRoadmap/issue2968
briri Jul 26, 2021
b82e4bf
Merge pull request #2976 from DMPRoadmap/update-spinner
briri Jul 26, 2021
38ac86a
added logic to hide spinner after merge analysis runs
briri Jul 26, 2021
8dc0f92
Merge branch 'development' into merge-orgs
briri Jul 26, 2021
01c4781
Merge pull request #2763 from DMPRoadmap/merge-orgs
briri Jul 26, 2021
cc87c01
Merge branch 'development' into invitation-fix
briri Jul 26, 2021
8e40ce1
Merge branch 'master' into bug_template_customization
briri Jul 26, 2021
c6acbc7
Merge pull request #2946 from DMPRoadmap/invitation-fix
briri Jul 26, 2021
cfbe830
Merge branch 'development' into pagination-in-query-string
briri Jul 26, 2021
8e93c60
Merge pull request #2959 from DMPRoadmap/pagination-in-query-string
briri Jul 26, 2021
6a0f813
Merge branch 'master' into development
briri Jul 26, 2021
9370080
Remove memoization
raycarrick-ed Jul 27, 2021
08eb0bb
Guard against nil funder template
raycarrick-ed Jul 27, 2021
62432b9
Merge pull request #2944 from DMPRoadmap/bug_template_customization
raycarrick-ed Jul 27, 2021
25f4971
Merge branch 'master' into development
raycarrick-ed Jul 27, 2021
c469b5c
fix up tests for org merging
raycarrick-ed Jul 27, 2021
e24b0aa
Merge branch 'development' into bug_2972_project_start-end_date_to_pd…
briri Jul 27, 2021
90c9dd3
fix merge issue with app.pot
briri Jul 27, 2021
6849416
Merge pull request #2982 from DMPRoadmap/bug_2972_project_start-end_d…
briri Jul 27, 2021
c707405
Merge branch 'development' of github.com:DMPRoadmap/roadmap into deve…
briri Jul 27, 2021
f196f62
Merge branch 'master' of github.com:DMPRoadmap/roadmap into roadmap-main
briri Jul 27, 2021
da82308
Merge branch 'development' of github.com:DMPRoadmap/roadmap into road…
briri Jul 27, 2021
02f1dfb
Merge pull request #2981 from DMPRoadmap/development
briri Jul 27, 2021
6650bba
Merge branch 'master' of github.com:DMPRoadmap/roadmap into roadmap-main
briri Jul 30, 2021
44cbfe6
Merge branch 'roadmap-main' into development
briri Jul 30, 2021
728b389
Merge branch 'master' into versionable_id-fix
briri Aug 2, 2021
75feacd
Merge pull request #2950 from DMPRoadmap/versionable_id-fix
briri Aug 2, 2021
4bb80e9
Added maDMP features to the project details page
briri Jul 30, 2021
f3c70f7
merged in latest from master
briri Aug 2, 2021
9734a67
2 small tweaks to get fix to run on dcc live
raycarrick-ed Aug 3, 2021
8f499e5
Update templates.rake
raycarrick-ed Aug 4, 2021
6dd49b1
Update templates.rake
raycarrick-ed Aug 4, 2021
241f537
Merge pull request #2987 from DMPRoadmap/fix_versionable_fix
raycarrick-ed Aug 4, 2021
1e9749d
Merge pull request #2986 from DMPRoadmap/madmp-project-details
raycarrick-ed Aug 4, 2021
1433dc6
change migration classname
raycarrick-ed Aug 4, 2021
c3b1b6a
Merge pull request #2991 from DMPRoadmap/fix_migration_classname
briri Aug 4, 2021
893b950
added research outputs to plan
briri Aug 3, 2021
6ffbcfd
offerings to the rubocop gods
briri Aug 4, 2021
2d04b50
cleanup of unused code and added config for license opts
briri Aug 4, 2021
fa9f817
fixed tests
briri Aug 4, 2021
184cd20
Merge branch 'development' into madmp-research-outputs
briri Aug 4, 2021
203e43a
cleaned up schema
briri Aug 4, 2021
0889797
Fix for postgres regex matching
briri Aug 4, 2021
e2c0332
Fix for postgres regex matching
briri Aug 4, 2021
9baedad
trying to fix postgres
briri Aug 5, 2021
2604e50
Merge branch 'development' of github.com:DMPRoadmap/roadmap into road…
briri Aug 5, 2021
fdedfbc
Merge branch 'madmp-research-outputs' of github.com:DMPRoadmap/roadma…
briri Aug 5, 2021
cf0f636
Merge branch 'roadmap-development' into development
briri Aug 5, 2021
57c07bb
fixed typo in config
briri Aug 5, 2021
ee70249
upgrade dependencies and then consolidate madmp PRs from roadmap back…
briri Aug 5, 2021
b52f735
added research outputs to plan
briri Aug 3, 2021
54e724b
fixing stuff broken by merge
briri Aug 6, 2021
5ced696
Merge branch 'madmp-research-outputs' of github.com:DMPRoadmap/roadma…
briri Aug 6, 2021
70a0393
fixed up tests and merge conflicts
briri Aug 6, 2021
de9de1b
fix for failing test
briri Aug 9, 2021
70d63ec
fixed bug with saving api_client model and also updated v2 api code t…
briri Aug 9, 2021
906efb8
fixing tests
briri Aug 9, 2021
a3e4ac5
patch bug in API v1
briri Aug 10, 2021
8afb814
Merge branch 'master' of github.com:DMPRoadmap/roadmap into development
briri Aug 10, 2021
7c841f2
fixed bug on api v0
briri Aug 10, 2021
34ae86f
bug fix for creating plan with dataset via api v2
briri Aug 10, 2021
915fe40
fixing issue with create for api v2
briri Aug 10, 2021
b6b5328
switched api to use template family_id instead of id
briri Aug 12, 2021
8da9911
fixed bug with new org specific emails for plans created via api v2
briri Aug 13, 2021
80124f2
fix for issue with DMP ID displaying RAMS link
briri Aug 13, 2021
04c5dc0
fixed issue with funding status saving on api v2 plan creation
briri Aug 16, 2021
74983cb
cleanup after PR review
briri Aug 17, 2021
70a2b65
added missing allow_doi_minting config flag
briri Aug 17, 2021
6f7ff65
added allow_doi_minting to yaml. Fixed issue with spinner on DMP ID r…
briri Aug 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

# Try to retrieve the yarn JS dependencies from the cache
- name: 'Cache Yarn Packages'
uses: actions/cache@v1
uses: actions/cache@v2.1.5
with:
path: node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down
121 changes: 121 additions & 0 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Tests - PostgreSQL

on: [pull_request]

jobs:
postgresql:
runs-on: ubuntu-latest

services:
# Postgres installation
db:
image: postgres
env:
# Latest version of Postgres has increased security. We can use the default
# user/password in this testing scenario though so use the following env
# variable to bypass this changes:
# https://github.com/docker-library/postgres/issues/681
POSTGRES_HOST_AUTH_METHOD: trust
ports: ['5432:5432']
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5

env:
RAILS_ENV: test
DATABASE_URL: postgres://postgres:@localhost:5432/roadmap_test

steps:
# Checkout the repo
- uses: actions/checkout@v2
with:
fetch-depth: 1

- name: 'Install Postgresql Packages'
run: |
sudo apt-get update
sudo apt-get install libpq-dev

- name: 'Determine Ruby and Bundler Versions from Gemfile.lock'
run: |
echo "RUBY_VERSION=`cat ./Gemfile.lock | grep -A 1 'RUBY VERSION' | grep 'ruby' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV
echo "BUNDLER_VERSION=`cat ./Gemfile.lock | grep -A 1 'BUNDLED WITH' | grep -oE '[0-9]\.[0-9]'`" >> $GITHUB_ENV

# Install Ruby - using the version found in the Gemfile.lock
- name: 'Install Ruby'
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ env.RUBY_VERSION }}

# Copy all of the example configs over
- name: 'Setup Default Configuration'
run: |
# Make copies of all the example config files
cp config/database.yml.sample config/database.yml
cp config/initializers/contact_us.rb.example config/initializers/contact_us.rb
cp config/initializers/wicked_pdf.rb.example config/initializers/wicked_pdf.rb

# Try to retrieve the gems from the cache
- name: 'Cache Gems'
uses: actions/cache@v2.1.5
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-

- name: 'Bundle Install'
run: |
gem install bundler -v ${{ env.BUNDLER_VERSION }}
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3 --without mysql rollbar aws

- name: 'Setup Credentials'
run: |
# generate a default credential file and key
EDITOR='echo "$(cat config/credentials.yml.example)" >' bundle exec rails credentials:edit

# Try to retrieve the yarn JS dependencies from the cache
- name: 'Cache Yarn Packages'
uses: actions/cache@v2.1.5
with:
path: node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-yarn-
${{ runner.os }}-

- name: 'Determine wkhtmltopdf location'
run: echo "WICKED_PDF_PATH=`bundle exec which wkhtmltopdf`" >> $GITHUB_ENV

- name: 'Yarn Install'
run: |
yarn install

- name: 'Setup Test DB'
run: bin/rails db:setup RAILS_ENV=test

- name: 'Migrate DB'
run: bin/rails db:migrate RAILS_ENV=test

- name: 'Compile Assets'
run: |
bin/rails webpacker:compile
bin/rails assets:precompile

- name: 'Run Karma Tests'
run: yarn test

- name: 'Run Rspec Unit and Functional Tests'
run: |
bin/rspec spec/models/ spec/policies/ spec/services/ spec/helpers/
bin/rspec spec/controllers/ spec/presenters/ spec/requests/ spec/views
bin/rspec spec/mixins/

# Integration Tests are only run if PR or Push is to master or development branches
- name: 'Run Integration Tests'
run: bin/rspec spec/features/
48 changes: 25 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ GEM
api-pagination (4.8.2)
arel (9.0.0)
ast (2.4.2)
autoprefixer-rails (10.2.5.1)
execjs (> 0)
autoprefixer-rails (10.3.1.0)
execjs (~> 2)
aws-eventstream (1.1.1)
aws-partitions (1.479.0)
aws-sdk-core (3.117.0)
aws-partitions (1.483.0)
aws-sdk-core (3.119.0)
aws-eventstream (~> 1, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-ssm (1.112.0)
aws-sdk-core (~> 3, >= 3.112.0)
aws-sdk-ssm (1.114.0)
aws-sdk-core (~> 3, >= 3.119.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.2.4)
aws-eventstream (~> 1, >= 1.0.2)
Expand All @@ -88,9 +88,9 @@ GEM
bindex (0.8.1)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
bootsnap (1.7.5)
bootsnap (1.7.7)
msgpack (~> 1.0)
brakeman (5.0.4)
brakeman (5.1.1)
builder (3.2.4)
bullet (6.1.4)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -178,14 +178,15 @@ GEM
railties (>= 5.0.0)
faker (2.18.0)
i18n (>= 1.6, < 2)
faraday (1.5.1)
faraday (1.6.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
Expand All @@ -195,9 +196,10 @@ GEM
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
ffi (1.15.3)
flag_shih_tzu (0.3.23)
fog-aws (3.10.0)
fog-aws (3.11.0)
fog-core (~> 2.1)
fog-json (~> 1.1)
fog-xml (~> 0.1)
Expand All @@ -222,8 +224,8 @@ GEM
gettext (3.3.7)
locale (>= 2.0.5)
text (>= 1.3.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
globalid (0.5.2)
activesupport (>= 5.0)
guard (2.18.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
Expand Down Expand Up @@ -272,12 +274,12 @@ GEM
addressable (~> 2.7)
ledermann-rails-settings (2.5.0)
activerecord (>= 4.2)
listen (3.5.1)
listen (3.6.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
locale (2.1.3)
logger (1.4.3)
loofah (2.10.0)
loofah (2.11.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.2.8)
Expand All @@ -292,7 +294,7 @@ GEM
nokogiri (~> 1)
rake
mini_mime (1.1.0)
mini_portile2 (2.5.3)
mini_portile2 (2.6.1)
minitest (5.14.4)
mocha (1.13.0)
msgpack (1.4.2)
Expand All @@ -304,9 +306,9 @@ GEM
net-scp (3.0.0)
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
nio4r (2.5.7)
nokogiri (1.11.7)
mini_portile2 (~> 2.5.0)
nio4r (2.5.8)
nokogiri (1.12.2)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
Expand Down Expand Up @@ -344,7 +346,7 @@ GEM
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
puma (5.3.2)
puma (5.4.0)
nio4r (~> 2.0)
pundit (2.1.0)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -422,13 +424,13 @@ GEM
rspec-mocks (~> 3.10)
rspec-support (~> 3.10)
rspec-support (3.10.2)
rubocop (1.18.3)
rubocop (1.18.4)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.7.0, < 2.0)
rubocop-ast (>= 1.8.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.8.0)
Expand Down Expand Up @@ -529,8 +531,8 @@ GEM
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (>= 3.0, < 4.0)
webmock (3.13.0)
addressable (>= 2.3.6)
webmock (3.14.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webpacker (5.4.0)
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/blocks/_modal_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
font-size: 1.3rem;
}
.modal-search-result .modal-search-result-selector {
border: 1px solid $color-green;
color: $color-green;
background-color: $color-green;
color: $color-white;
}
.modal-search-result .modal-search-result-unselector {
border: 1px solid $color-red;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/blocks/_spinner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
}

.spinner-border img {
width: 80px;
height: 80px;
width: 80px;
}
3 changes: 2 additions & 1 deletion app/assets/stylesheets/variables/_colours.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

$color-black: #000;
$color-white: #FFF;
$color-red: #B30000;
$color-red: #b94a48;
$color-green: #4c8d3f;
$color-grey: #4F5253;
$color-grey-darkest: #222;
$color-grey-darker: #333;
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/api/v0/plans_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def index
params[:per_page] = max_pages if params[:per_page].to_i > max_pages
end

@plans = @user.org.plans.includes([{ roles: :user }, { answers: :question_options },
# Get all the Org Admin plans
org_admin_plans = @user.org.org_admin_plans
@plans = org_admin_plans.includes([{ roles: :user }, { answers: :question_options },
template: [{ phases: {
sections: { questions: %i[question_format themes] }
} }, :org]])
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v1/plans_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class PlansController < BaseApiController
def show
plans = Api::V1::PlansPolicy::Scope.new(client, Plan).resolve
.where(id: params[:id]).limit(1)

if plans.present? && plans.any?
@items = paginate_response(results: plans)
render "/api/v1/plans/index", status: :ok
Expand All @@ -33,6 +32,7 @@ def create

# Convert the JSON into a Plan and it's associations
plan = Api::V1::Deserialization::Plan.deserialize(json: dmp)

if plan.present?
save_err = _("Unable to create your DMP")
exists_err = _("Plan already exists. Send an update instead.")
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v2/datasets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def create
unless errs.any?
ResearchOutput.transaction do
datasets.each do |dataset_json|
object = Api::V1::Deserialization::Dataset.deserialize(plan: @plan, json: dataset_json)
object = Api::V2::Deserialization::Dataset.deserialize(plan: @plan, json: dataset_json)
# This is a create endpoint so only allow inserts!
next unless object.new_record?

Expand Down
2 changes: 1 addition & 1 deletion app/controllers/api/v2/plans_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def prep_for_pdf
@public_plan = @plan.publicly_visible?
@formatting =

@hash = @plan.as_pdf(@show_coversheet)
@hash = @plan.as_pdf(nil, @show_coversheet)
@formatting = @plan.settings(:export).formatting || @plan.template.settings(:export).formatting
@selected_phase = @plan.phases.order("phases.updated_at DESC").first

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/org_admin/plans_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def index

@super_admin = current_user.can_super_admin?
@clicked_through = params[:click_through].present?
@plans = @super_admin ? Plan.all.page(1) : current_user.org.plans.page(1)
@plans = @super_admin ? Plan.all.page(1) : current_user.org.org_admin_plans.page(1)
end

# GET org_admin/plans/:id/feedback_complete
Expand Down Expand Up @@ -61,7 +61,7 @@ def download_plans

plans = CSV.generate do |csv|
csv << header_cols
org.plans.includes(template: :org).order(updated_at: :desc).each do |plan|
org.org_admin_plans.includes(template: :org).order(updated_at: :desc).each do |plan|
csv << [
plan.title.to_s,
plan.template.title.to_s,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

class OrgAdmin::TemplateCustomizationTransfersController < ApplicationController

include Versionable

after_action :verify_authorized

# POST /org_admin/templates/:id/transfer_customization
Expand All @@ -11,7 +13,15 @@ def create
@template = Template.find(params[:template_id])
authorize @template, :transfer_customization?
if @template.upgrade_customization?
# If the customized template is not published it will not version, so publish it!
previously_published = @template.published?
@template.publish unless previously_published

@new_customization = @template.upgrade_customization!

# Reset the published flag if the customized template was not previously published
@template.update(published: false) unless previously_published

redirect_to org_admin_template_path(@new_customization)
else
flash[:alert] = _("That template is no longer customizable.")
Expand Down
Loading