├── .browserslistrc ├── .editorconfig ├── .env.mysql2 ├── .env.postgresql ├── .eslintrc.json ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── brakeman.yml │ ├── danger.yml │ ├── eslint.yml │ ├── mysql.yml │ ├── postgres.yml │ └── rubocop.yml ├── .gitignore ├── .rubocop.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── Dangerfile ├── Gemfile ├── Gemfile.lock ├── LICENSE.md ├── Procfile ├── Procfile.dev ├── README.md ├── Rakefile ├── app ├── assets │ ├── builds │ │ └── .gitkeep │ ├── config │ │ └── manifest.js │ ├── fonts │ │ └── GillSans-Light.ttf │ ├── images │ │ ├── asc.gif │ │ ├── background.jpg │ │ ├── bg.gif │ │ ├── dcc_logo.png │ │ ├── dcc_logo_white.png │ │ ├── desc.gif │ │ ├── download.png │ │ ├── favicon.ico │ │ ├── fullscreen.png │ │ ├── help_button.png │ │ ├── logo.png │ │ ├── minus_laranja.png │ │ ├── plus_laranja.png │ │ ├── question-mark.png │ │ ├── remove.png │ │ ├── roadmap_logo_orange_grey.png │ │ ├── roadmap_logo_orange_white.png │ │ ├── select2-spinner.gif │ │ ├── select2.png │ │ ├── select2x2.png │ │ ├── spinner.gif │ │ ├── uc3_logo.jpg │ │ ├── uc3_logo_white.png │ │ └── ue_logo.png │ ├── javascripts │ │ ├── application.js │ │ └── cable.js │ ├── stylesheets │ │ ├── .gitkeep │ │ ├── application.scss │ │ ├── blocks │ │ │ ├── .gitkeep │ │ │ ├── README.md │ │ │ ├── _accessibility.scss │ │ │ ├── _accordion.scss │ │ │ ├── _alerts.scss │ │ │ ├── _autocomplete.scss │ │ │ ├── _buttons.scss │ │ │ ├── _cards.scss │ │ │ ├── _clearable_field.scss │ │ │ ├── _datepicker.scss │ │ │ ├── _display.scss │ │ │ ├── _dropdowns.scss │ │ │ ├── _font_awesomes.scss │ │ │ ├── _footers.scss │ │ │ ├── _forms.scss │ │ │ ├── _help_blocks.scss │ │ │ ├── _html.scss │ │ │ ├── _index.scss │ │ │ ├── _input_groups.scss │ │ │ ├── _inverse_dropdowns.scss │ │ │ ├── _labels.scss │ │ │ ├── _lists.scss │ │ │ ├── _logos.scss │ │ │ ├── _modal_dialogs.scss │ │ │ ├── _modal_permissions.scss │ │ │ ├── _modal_search.scss │ │ │ ├── _navbars.scss │ │ │ ├── _navs.scss │ │ │ ├── _new_plans_form.scss │ │ │ ├── _new_window_popup.scss │ │ │ ├── _notification_areas.scss │ │ │ ├── _org_links.scss │ │ │ ├── _profile_form.scss │ │ │ ├── _progress.scss │ │ │ ├── _project_details.scss │ │ │ ├── _question_container.scss │ │ │ ├── _question_form.scss │ │ │ ├── _rda.scss │ │ │ ├── _readonly_textarea.scss │ │ │ ├── _selectpicker.scss │ │ │ ├── _spinner.scss │ │ │ ├── _statuses.scss │ │ │ ├── _tables.scss │ │ │ ├── _template_filters.scss │ │ │ ├── _tinymce_content.scss │ │ │ ├── _tooltips.scss │ │ │ ├── _ui_sortable_handle.scss │ │ │ └── _usage.scss │ │ ├── utils │ │ │ ├── .gitkeep │ │ │ ├── README.md │ │ │ ├── _backgrounds.scss │ │ │ ├── _bordered.scss │ │ │ ├── _break_words.scss │ │ │ ├── _colours.scss │ │ │ ├── _font_size.scss │ │ │ ├── _functions.scss │ │ │ ├── _icons.scss │ │ │ ├── _index.scss │ │ │ └── _margins.scss │ │ └── variables │ │ │ ├── .gitkeep │ │ │ ├── README.md │ │ │ ├── _bold.scss │ │ │ ├── _bootstrap.scss │ │ │ ├── _colours.scss │ │ │ ├── _index.scss │ │ │ ├── _site_overrides.scss │ │ │ ├── _tinymce.scss │ │ │ └── _typography.scss │ ├── vendor │ │ └── jquery-ui │ │ │ └── datepicker │ │ │ └── images │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-icons_444444_256x240.png │ │ │ ├── ui-icons_555555_256x240.png │ │ │ ├── ui-icons_777620_256x240.png │ │ │ ├── ui-icons_777777_256x240.png │ │ │ ├── ui-icons_FFF_256x240.png │ │ │ └── ui-icons_cc0000_256x240.png │ ├── videos │ │ └── index.files │ │ │ └── html5video │ │ │ ├── .htaccess │ │ │ ├── flashfox.swf │ │ │ ├── fullscreen.png │ │ │ ├── html5ext.js │ │ │ ├── screencast.jpg │ │ │ ├── screencast.m4v │ │ │ ├── screencast.mp4 │ │ │ ├── screencast.ogv │ │ │ └── screencast.webm │ └── xslt │ │ └── htmltoword │ │ ├── functions.xslt │ │ └── numbering.xslt ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── controllers │ ├── answers_controller.rb │ ├── api │ │ ├── v0 │ │ │ ├── base_controller.rb │ │ │ ├── departments_controller.rb │ │ │ ├── guidance_groups_controller.rb │ │ │ ├── plans_controller.rb │ │ │ ├── statistics_controller.rb │ │ │ └── templates_controller.rb │ │ └── v1 │ │ │ ├── authentication_controller.rb │ │ │ ├── base_api_controller.rb │ │ │ ├── plans_controller.rb │ │ │ └── templates_controller.rb │ ├── application_controller.rb │ ├── concerns │ │ ├── allowed_question_formats.rb │ │ ├── conditional_user_mailer.rb │ │ ├── org_selectable.rb │ │ ├── paginable.rb │ │ ├── template_methods.rb │ │ └── versionable.rb │ ├── contact_us │ │ └── contacts_controller.rb │ ├── contributors_controller.rb │ ├── feedback_requests_controller.rb │ ├── guidance_groups_controller.rb │ ├── guidances_controller.rb │ ├── home_controller.rb │ ├── identifiers_controller.rb │ ├── notes_controller.rb │ ├── org_admin │ │ ├── conditions_controller.rb │ │ ├── departments_controller.rb │ │ ├── phase_versions_controller.rb │ │ ├── phases_controller.rb │ │ ├── plans_controller.rb │ │ ├── question_options_controller.rb │ │ ├── questions_controller.rb │ │ ├── sections_controller.rb │ │ ├── template_copies_controller.rb │ │ ├── template_customization_transfers_controller.rb │ │ ├── template_customizations_controller.rb │ │ ├── templates_controller.rb │ │ └── users_controller.rb │ ├── orgs_controller.rb │ ├── paginable │ │ ├── contributors_controller.rb │ │ ├── departments_controller.rb │ │ ├── guidance_groups_controller.rb │ │ ├── guidances_controller.rb │ │ ├── notifications_controller.rb │ │ ├── orgs_controller.rb │ │ ├── plans_controller.rb │ │ ├── templates_controller.rb │ │ ├── themes_controller.rb │ │ └── users_controller.rb │ ├── passwords_controller.rb │ ├── plan_exports_controller.rb │ ├── plans_controller.rb │ ├── public_pages_controller.rb │ ├── question_formats_controller.rb │ ├── registrations_controller.rb │ ├── research_outputs_controller.rb │ ├── research_projects_controller.rb │ ├── roles_controller.rb │ ├── session_locales_controller.rb │ ├── sessions_controller.rb │ ├── settings.rb │ ├── settings │ │ └── plans_controller.rb │ ├── static_pages_controller.rb │ ├── super_admin │ │ ├── api_clients_controller.rb │ │ ├── notifications_controller.rb │ │ ├── org_swaps_controller.rb │ │ ├── orgs_controller.rb │ │ ├── themes_controller.rb │ │ └── users_controller.rb │ ├── template_options_controller.rb │ ├── usage_controller.rb │ ├── usage_downloads_controller.rb │ ├── users │ │ ├── invitations_controller.rb │ │ └── omniauth_callbacks_controller.rb │ └── users_controller.rb ├── helpers │ ├── annotations_helper.rb │ ├── application_helper.rb │ ├── conditions_helper.rb │ ├── customizable_template_link_helper.rb │ ├── exports_helper.rb │ ├── feedbacks_helper.rb │ ├── identifier_helper.rb │ ├── languages_helper.rb │ ├── mailer_helper.rb │ ├── manifests_helper.rb │ ├── notifications_helper.rb │ ├── orgs_helper.rb │ ├── paginable_helper.rb │ ├── perms_helper.rb │ ├── plans_helper.rb │ ├── sections_helper.rb │ ├── settings_template_helper.rb │ ├── super_admin │ │ └── orgs │ │ │ └── merge_helper.rb │ ├── template_helper.rb │ └── usage_helper.rb ├── javascript │ ├── README.md │ ├── application.js │ ├── channels │ │ ├── consumer.js │ │ ├── example_channel.js │ │ └── index.js │ └── src │ │ ├── answers │ │ ├── conditions.js │ │ ├── edit.js │ │ └── rdaMetadata.js │ │ ├── contributors │ │ └── form.js │ │ ├── devise │ │ ├── invitations │ │ │ └── edit.js │ │ ├── passwords │ │ │ └── edit.js │ │ └── registrations │ │ │ ├── edit.js │ │ │ └── new.js │ │ ├── guidances │ │ └── newEdit.js │ │ ├── locale │ │ ├── de │ │ │ ├── app.js │ │ │ └── timeago.js │ │ ├── en_GB │ │ │ ├── app.js │ │ │ └── timeago.js │ │ ├── en_US │ │ │ ├── app.js │ │ │ └── timeago.js │ │ ├── es │ │ │ ├── app.js │ │ │ └── timeago.js │ │ ├── fr_FR │ │ │ ├── app.js │ │ │ └── timeago.js │ │ └── pt_BR │ │ │ └── timeago.js │ │ ├── notes │ │ └── index.js │ │ ├── orgAdmin │ │ ├── conditions │ │ │ └── updateConditions.js │ │ ├── phases │ │ │ ├── newEdit.js │ │ │ ├── preview.js │ │ │ └── show.js │ │ ├── questionOptions │ │ │ └── index.js │ │ ├── questions │ │ │ └── sharedEventHandlers.js │ │ ├── sections │ │ │ └── index.js │ │ └── templates │ │ │ ├── edit.js │ │ │ ├── index.js │ │ │ └── new.js │ │ ├── orgs │ │ ├── adminEdit.js │ │ └── shibbolethDs.js │ │ ├── plans │ │ ├── download.js │ │ ├── editDetails.js │ │ ├── index.js │ │ ├── index.js.erb │ │ ├── new.js │ │ └── share.js │ │ ├── publicTemplates │ │ └── show.js │ │ ├── researchOutputs │ │ └── form.js │ │ ├── roles │ │ └── edit.js │ │ ├── shared │ │ ├── createAccountForm.js │ │ └── signInForm.js │ │ ├── superAdmin │ │ ├── apiClients │ │ │ └── form.js │ │ ├── notifications │ │ │ └── edit.js │ │ ├── themes │ │ │ └── newEdit.js │ │ └── users │ │ │ └── edit.js │ │ ├── usage │ │ └── index.js │ │ ├── users │ │ ├── adminGrantPermissions.js │ │ └── notificationPreferences.js │ │ └── utils │ │ ├── accordion.js │ │ ├── array.js │ │ ├── autoComplete.js │ │ ├── charts.js │ │ ├── conditionalFields.js │ │ ├── constants.js │ │ ├── datePicker.js │ │ ├── debounce.js │ │ ├── externalLink.js │ │ ├── isType.js │ │ ├── isValidInputType.js │ │ ├── links.js │ │ ├── modalSearch.js │ │ ├── notificationHelper.js │ │ ├── outOfFocus.js │ │ ├── paginable.js │ │ ├── panelHeading.js │ │ ├── passwordHelper.js │ │ ├── requiredField.js │ │ ├── scrollTo.js │ │ ├── sectionUpdate.js │ │ ├── spinner.js │ │ ├── tabHelper.js │ │ ├── timeagoFactory.js.erb │ │ ├── tinymce.js │ │ └── tooltipHelper.js ├── jobs │ └── application_job.rb ├── mailers │ ├── .gitkeep │ └── user_mailer.rb ├── models │ ├── annotation.rb │ ├── answer.rb │ ├── api_client.rb │ ├── application_record.rb │ ├── concerns │ │ ├── acts_as_sortable.rb │ │ ├── date_rangeable.rb │ │ ├── exportable_plan.rb │ │ ├── identifiable.rb │ │ ├── json_link_validator.rb │ │ ├── validation_messages.rb │ │ ├── validation_values.rb │ │ └── versionable_model.rb │ ├── condition.rb │ ├── contributor.rb │ ├── department.rb │ ├── exported_plan.rb │ ├── guidance.rb │ ├── guidance_group.rb │ ├── identifier.rb │ ├── identifier_scheme.rb │ ├── language.rb │ ├── license.rb │ ├── metadata_standard.rb │ ├── note.rb │ ├── notification.rb │ ├── org.rb │ ├── perm.rb │ ├── phase.rb │ ├── plan.rb │ ├── pref.rb │ ├── question.rb │ ├── question_format.rb │ ├── question_option.rb │ ├── region.rb │ ├── repository.rb │ ├── research_domain.rb │ ├── research_output.rb │ ├── research_project.rb │ ├── role.rb │ ├── section.rb │ ├── section_sorter.rb │ ├── settings │ │ └── template.rb │ ├── stat.rb │ ├── stat_created_plan.rb │ ├── stat_created_plan │ │ └── create_or_update.rb │ ├── stat_exported_plan.rb │ ├── stat_exported_plan │ │ └── create_or_update.rb │ ├── stat_joined_user.rb │ ├── stat_joined_user │ │ └── create_or_update.rb │ ├── stat_shared_plan.rb │ ├── stat_shared_plan │ │ └── create_or_update.rb │ ├── template.rb │ ├── theme.rb │ ├── token_permission_type.rb │ ├── tracker.rb │ ├── user.rb │ └── user │ │ └── at_csv.rb ├── policies │ ├── annotation_policy.rb │ ├── answer_policy.rb │ ├── api │ │ ├── v0 │ │ │ ├── departments_policy.rb │ │ │ ├── guidance_group_policy.rb │ │ │ ├── guidance_policy.rb │ │ │ ├── plans_policy.rb │ │ │ ├── statistics_policy.rb │ │ │ └── template_policy.rb │ │ └── v1 │ │ │ └── plans_policy.rb │ ├── api_client_policy.rb │ ├── application_policy.rb │ ├── department_policy.rb │ ├── guidance_group_policy.rb │ ├── guidance_policy.rb │ ├── identifier_policy.rb │ ├── note_policy.rb │ ├── notification_policy.rb │ ├── org_policy.rb │ ├── paginable │ │ └── plan_policy.rb │ ├── phase_policy.rb │ ├── plan_policy.rb │ ├── public_page_policy.rb │ ├── question_option_policy.rb │ ├── question_policy.rb │ ├── research_output_policy.rb │ ├── role_policy.rb │ ├── section_policy.rb │ ├── settings │ │ ├── plan_policy.rb │ │ └── project_policy.rb │ ├── template_policy.rb │ ├── theme_policy.rb │ ├── token_permission_type_policy.rb │ ├── usage_policy.rb │ └── user_policy.rb ├── presenters │ ├── api │ │ └── v1 │ │ │ ├── api_presenter.rb │ │ │ ├── contributor_presenter.rb │ │ │ ├── funding_presenter.rb │ │ │ ├── language_presenter.rb │ │ │ ├── org_presenter.rb │ │ │ ├── pagination_presenter.rb │ │ │ ├── plan_presenter.rb │ │ │ ├── research_output_presenter.rb │ │ │ └── template_presenter.rb │ ├── contributor_presenter.rb │ ├── guidance_presenter.rb │ ├── identifier_presenter.rb │ ├── org_selection_presenter.rb │ ├── plan_presenter.rb │ ├── research_output_presenter.rb │ └── super_admin │ │ └── orgs │ │ └── merge_presenter.rb ├── scrubbers │ └── table_free_scrubber.rb ├── services │ ├── api │ │ └── v1 │ │ │ ├── auth │ │ │ └── jwt │ │ │ │ ├── authentication_service.rb │ │ │ │ ├── authorization_service.rb │ │ │ │ └── json_web_token.rb │ │ │ ├── contextual_error_service.rb │ │ │ ├── conversion_service.rb │ │ │ ├── deserialization │ │ │ ├── contributor.rb │ │ │ ├── dataset.rb │ │ │ ├── funding.rb │ │ │ ├── identifier.rb │ │ │ ├── org.rb │ │ │ └── plan.rb │ │ │ ├── deserialization_service.rb │ │ │ ├── json_validation_service.rb │ │ │ ├── persistence_service.rb │ │ │ └── validation_service.rb │ ├── application_service.rb │ ├── external_apis │ │ ├── base_service.rb │ │ ├── doi_service.rb │ │ ├── open_aire_service.rb │ │ ├── rdamsc_service.rb │ │ ├── re3data_service.rb │ │ ├── ror_service.rb │ │ └── spdx_service.rb │ ├── locale_service.rb │ ├── org │ │ ├── create_created_plan_service.rb │ │ ├── create_exported_plan_service.rb │ │ ├── create_joined_user_service.rb │ │ ├── create_last_month_created_plan_service.rb │ │ ├── create_last_month_exported_plan_service.rb │ │ ├── create_last_month_joined_user_service.rb │ │ ├── create_last_month_shared_plan_service.rb │ │ ├── create_shared_plan_service.rb │ │ ├── monthly_usage_service.rb │ │ ├── total_count_created_plan_service.rb │ │ ├── total_count_joined_user_service.rb │ │ └── total_count_stat_service.rb │ ├── org_selection │ │ ├── hash_to_org_service.rb │ │ ├── org_to_hash_service.rb │ │ └── search_service.rb │ └── template │ │ └── upgrade_customization_service.rb ├── validators │ ├── after_validator.rb │ ├── answer_for_correct_template_validator.rb │ ├── email_validator.rb │ ├── org_links_validator.rb │ ├── template_links_validator.rb │ └── url_validator.rb └── views │ ├── answers │ ├── _locking.html.erb │ ├── _new_edit.html.erb │ └── _status.html.erb │ ├── api │ ├── v0 │ │ ├── departments │ │ │ ├── index.json.jbuilder │ │ │ └── users.json.jbuilder │ │ ├── guidance_groups │ │ │ └── index.json.jbuilder │ │ ├── plans │ │ │ ├── create.json.jbuilder │ │ │ ├── index.json.jbuilder │ │ │ └── show.json.jbuilder │ │ ├── statistics │ │ │ ├── plans.json.jbuilder │ │ │ ├── plans_by_template.json.jbuilder │ │ │ ├── users_joined.json.jbuilder │ │ │ └── using_template.json.jbuilder │ │ └── templates │ │ │ └── index.json.jbuilder │ └── v1 │ │ ├── _standard_response.json.jbuilder │ │ ├── contributors │ │ └── _show.json.jbuilder │ │ ├── datasets │ │ └── _show.json.jbuilder │ │ ├── error.json.jbuilder │ │ ├── heartbeat.json.jbuilder │ │ ├── identifiers │ │ └── _show.json.jbuilder │ │ ├── orgs │ │ └── _show.json.jbuilder │ │ ├── plans │ │ ├── _cost.json.jbuilder │ │ ├── _funding.json.jbuilder │ │ ├── _project.json.jbuilder │ │ ├── _show.json.jbuilder │ │ └── index.json.jbuilder │ │ ├── templates │ │ └── index.json.jbuilder │ │ └── token.json.jbuilder │ ├── contact_us │ ├── contact_mailer │ │ ├── contact_email.html.erb │ │ └── contact_email.text.plain.erb │ └── contacts │ │ ├── _new_left.html.erb │ │ ├── _new_right.html.erb │ │ └── new.html.erb │ ├── contributors │ ├── _form.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ └── new.html.erb │ ├── devise │ ├── invitations │ │ └── edit.html.erb │ ├── mailer │ │ ├── confirmation_instructions.html.erb │ │ ├── invitation_instructions.html.erb │ │ ├── reset_password_instructions.html.erb │ │ └── unlock_instructions.html.erb │ ├── passwords │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── registrations │ │ ├── _api_token.html.erb │ │ ├── _external_identifier.html.erb │ │ ├── _password_confirmation.html.erb │ │ ├── _password_details.html.erb │ │ ├── _personal_details.html.erb │ │ ├── edit.html.erb │ │ └── new.html.erb │ └── shared │ │ └── _links.erb │ ├── guidance_groups │ ├── _guidance_group_form.html.erb │ ├── _index_by_theme.html.erb │ ├── _show.html.erb │ ├── admin_edit.html.erb │ └── admin_new.html.erb │ ├── guidances │ ├── _guidance_display.html.erb │ ├── admin_index.html.erb │ └── new_edit.html.erb │ ├── home │ ├── _welcome.html.erb │ └── index.html.erb │ ├── kaminari │ ├── _first_page.html.erb │ ├── _gap.html.erb │ ├── _last_page.html.erb │ ├── _next_page.html.erb │ ├── _page.html.erb │ ├── _paginator.html.erb │ └── _prev_page.html.erb │ ├── layouts │ ├── _branding.html.erb │ ├── _footer.html.erb │ ├── _header.html.erb │ ├── _navigation.html.erb │ ├── _notifications.html.erb │ ├── _paginable.html.erb │ ├── _signin_signout.html.erb │ ├── application.html.erb │ ├── mailer.html.erb │ ├── mailer.text.erb │ └── modal_search │ │ ├── README.md │ │ ├── _form.html.erb │ │ ├── _result.html.erb │ │ ├── _results.html.erb │ │ └── _selections.html.erb │ ├── notes │ ├── _archive.html.erb │ ├── _edit.html.erb │ ├── _layout.html.erb │ ├── _list.html.erb │ ├── _new.html.erb │ ├── _show.html.erb │ └── _title.html.erb │ ├── org_admin │ ├── annotations │ │ ├── _form.html.erb │ │ └── _show.html.erb │ ├── conditions │ │ ├── _add.html.erb │ │ ├── _container.html.erb │ │ ├── _existing_condition_display.erb │ │ ├── _form.html.erb │ │ ├── _new_condition_form.erb │ │ └── _webhook_form.html.erb │ ├── departments │ │ ├── edit.html.erb │ │ └── new.html.erb │ ├── phases │ │ ├── _edit.html.erb │ │ ├── _form.html.erb │ │ ├── _index.html.erb │ │ ├── _new.html.erb │ │ ├── _overview.html.erb │ │ ├── _phase.html.erb │ │ ├── _show.html.erb │ │ ├── container.html.erb │ │ └── preview.html.erb │ ├── plans │ │ └── index.html.erb │ ├── question_options │ │ └── _option_fields.html.erb │ ├── questions │ │ ├── _container.html.erb │ │ ├── _edit.html.erb │ │ ├── _form.html.erb │ │ ├── _index.html.erb │ │ ├── _new.html.erb │ │ └── _show.html.erb │ ├── sections │ │ ├── _edit.html.erb │ │ ├── _form.html.erb │ │ ├── _index.html.erb │ │ ├── _new.html.erb │ │ ├── _progress.html.erb │ │ ├── _section.html.erb │ │ ├── _section_group.html.erb │ │ └── _show.html.erb │ ├── shared │ │ └── _theme_selector.html.erb │ ├── templates │ │ ├── _edit.html.erb │ │ ├── _form.html.erb │ │ ├── _navigation.html.erb │ │ ├── _row.html.erb │ │ ├── _show.html.erb │ │ ├── container.html.erb │ │ ├── history.html.erb │ │ ├── index.html.erb │ │ └── new.html.erb │ └── users │ │ ├── edit.html.erb │ │ └── plans.html.erb │ ├── orgs │ ├── _departments.html.erb │ ├── _external_identifiers.html.erb │ ├── _feedback_form.html.erb │ ├── _merge_form.html.erb │ ├── _profile_form.html.erb │ ├── admin_edit.html.erb │ └── shibboleth_ds.html.erb │ ├── paginable │ ├── api_clients │ │ └── _index.html.erb │ ├── contributors │ │ └── _index.html.erb │ ├── departments │ │ └── _index.html.erb │ ├── guidance_groups │ │ └── _index.html.erb │ ├── guidances │ │ └── _index.html.erb │ ├── notifications │ │ └── _index.html.erb │ ├── orgs │ │ └── _index.html.erb │ ├── plans │ │ ├── _index.html.erb │ │ ├── _org_admin.html.erb │ │ ├── _organisationally_or_publicly_visible.html.erb │ │ ├── _privately_visible.html.erb │ │ └── _publicly_visible.html.erb │ ├── research_outputs │ │ └── _index.html.erb │ ├── templates │ │ ├── _customisable.html.erb │ │ ├── _history.html.erb │ │ ├── _index.html.erb │ │ ├── _organisational.html.erb │ │ └── _publicly_visible.html.erb │ ├── themes │ │ └── _index.html.erb │ └── users │ │ └── _index.html.erb │ ├── phases │ ├── _edit_plan_answers.html.erb │ ├── _guidances_notes.html.erb │ ├── _overview.html.erb │ └── edit.html.erb │ ├── plan_exports │ └── show.erb │ ├── plans │ ├── _download_form.html.erb │ ├── _edit_details.html.erb │ ├── _guidance_choices.html.erb │ ├── _guidance_selection.html.erb │ ├── _navigation.html.erb │ ├── _overview_details.html.erb │ ├── _progress.html.erb │ ├── _project_details.html.erb │ ├── _request_feedback_form.html.erb │ ├── _share_form.html.erb │ ├── _show_details.html.erb │ ├── download.html.erb │ ├── export.xml.builder │ ├── index.html.erb │ ├── new.html.erb │ ├── overview.html.erb │ ├── request_feedback.html.erb │ ├── share.html.erb │ └── show.html.erb │ ├── public_pages │ ├── plan_export.pdf.erb │ ├── plan_index.html.erb │ └── template_index.html.erb │ ├── questions │ ├── _new_edit_question_datefield.html.erb │ ├── _new_edit_question_option_based.html.erb │ ├── _new_edit_question_textarea.html.erb │ ├── _new_edit_question_textfield.html.erb │ └── _preview_question.html.erb │ ├── research_outputs │ ├── _form.html.erb │ ├── edit.html.erb │ ├── index.html.erb │ ├── licenses │ │ └── _form.html.erb │ ├── metadata_standard_search.js.erb │ ├── metadata_standards │ │ ├── _search.html.erb │ │ └── _search_result.html.erb │ ├── new.html.erb │ ├── repositories │ │ ├── _search.html.erb │ │ └── _search_result.html.erb │ ├── repository_search.js.erb │ ├── select_license.js.erb │ └── select_output_type.js.erb │ ├── shared │ ├── _access_controls.html.erb │ ├── _copy_link_modal.html.erb │ ├── _create_account_form.html.erb │ ├── _create_plan_modal.html.erb │ ├── _links.html.erb │ ├── _modal.html.erb │ ├── _popover.html.erb │ ├── _search.html.erb │ ├── _sign_in_form.html.erb │ ├── _table_filter.html.erb │ ├── export │ │ ├── _plan.erb │ │ ├── _plan_coversheet.erb │ │ ├── _plan_outputs.erb │ │ ├── _plan_styling.erb │ │ └── _plan_txt.erb │ └── org_selectors │ │ ├── _combined.html.erb │ │ ├── _external_only.html.erb │ │ └── _local_only.html.erb │ ├── static_pages │ ├── about_us.html.erb │ ├── help.html.erb │ ├── privacy.html.erb │ └── termsuse.html.erb │ ├── super_admin │ ├── api_clients │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── email_credentials.js.erb │ │ ├── index.html.erb │ │ ├── new.html.erb │ │ └── refresh_credentials.js.erb │ ├── notifications │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ └── new.html.erb │ ├── orgs │ │ ├── _analysis.html.erb │ │ ├── index.html.erb │ │ ├── merge_analyze.js.erb │ │ └── new.html.erb │ ├── themes │ │ ├── _form.html.erb │ │ ├── edit.html.erb │ │ ├── index.html.erb │ │ └── new.html.erb │ └── users │ │ ├── _confirm_merge.html.erb │ │ └── edit.html.erb │ ├── template_exports │ ├── template_export.docx.erb │ └── template_export.pdf.erb │ ├── template_options │ └── index.json.jbuilder │ ├── usage │ ├── _plans_by_template_chart.html.erb │ ├── _plans_created_chart.html.erb │ ├── _template_statistics.html.erb │ ├── _template_statistics_accordion.html.erb │ ├── _total_usage.html.erb │ ├── _user_statistics.html.erb │ ├── _user_statistics_accordion.html.erb │ ├── _users_joined_chart.html.erb │ ├── index.html.erb │ └── plans_by_template.js.erb │ ├── user_mailer │ ├── _email_signature.html.erb │ ├── admin_privileges.html.erb │ ├── api_credentials.html.erb │ ├── feedback_complete.html.erb │ ├── feedback_notification.html.erb │ ├── new_comment.html.erb │ ├── permissions_change_notification.html.erb │ ├── plan_access_removed.html.erb │ ├── plan_visibility.html.erb │ ├── question_answered.html.erb │ ├── sharing_notification.html.erb │ └── welcome_notification.html.erb │ └── users │ ├── _admin_grant_permissions.html.erb │ ├── _current_privileges.html.erb │ ├── _notification_preferences.html.erb │ ├── admin_index.html.erb │ └── refresh_token.js.erb ├── babel.config.js ├── bin ├── _guard-core ├── annotate ├── annotate-gem ├── annotate_gem ├── brakeman ├── bundle ├── bundle-audit ├── byebug ├── coderay ├── convert_to_should_syntax ├── dev ├── dotenv ├── faker ├── guard ├── htmldiff ├── htmltoword ├── httparty ├── launchy ├── ldiff ├── listen ├── nokogiri ├── pry ├── puma ├── pumactl ├── rackup ├── rails ├── rake ├── rmsgcat ├── rmsgfmt ├── rmsginit ├── rmsgmerge ├── rspec ├── rubocop ├── ruby-parse ├── ruby-rewrite ├── rxgettext ├── safe_yaml ├── setup ├── spring ├── sprockets ├── test.bash ├── thin ├── thor ├── tilt ├── update ├── wkhtmltopdf ├── yard ├── yardoc ├── yarn └── yri ├── config.ru ├── config ├── application.rb ├── base_site.html ├── boot.rb ├── brakeman.ignore ├── branding.yml.sample ├── cable.yml ├── credentials.yml ├── credentials.yml.mysql2 ├── credentials.yml.postgresql ├── database.yml.sample ├── environment.rb ├── environments │ ├── development.rb │ ├── production.rb │ └── test.rb ├── initializers │ ├── _dmproadmap.rb │ ├── api_pagination.rb │ ├── application_controller_renderer.rb │ ├── asset_url_processor.rb │ ├── assets.rb │ ├── backtrace_silencers.rb │ ├── bullet.rb │ ├── contact_us.rb │ ├── contact_us.rb.example │ ├── content_security_policy.rb │ ├── cookies_serializer.rb │ ├── devise.rb │ ├── dmproadmap_schema_dumper.rb │ ├── dragonfly.rb │ ├── external_apis │ │ ├── doi.rb │ │ ├── open_aire.rb │ │ ├── rdamsc.rb │ │ ├── re3data.rb │ │ ├── ror.rb │ │ └── spdx.rb │ ├── filter_parameter_logging.rb │ ├── htmlto_word_xslt_helper.rb │ ├── inflections.rb │ ├── jbuilder_prettify.rb │ ├── kaminari_config.rb │ ├── locale.rb │ ├── mime_types.rb │ ├── new_framework_defaults_5_2.rb │ ├── new_framework_defaults_6_1.rb │ ├── new_framework_defaults_7_1.rb │ ├── permissions_policy.rb │ ├── rack_attack.rb │ ├── recaptcha.rb │ ├── rollbar.rb │ ├── session_store.rb │ ├── translation.rb │ ├── wicked_pdf.rb.example │ └── wrap_parameters.rb ├── locale │ ├── app.pot │ ├── de │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── domain.pot │ ├── en │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── en_CA │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── en_GB │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── en_US │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── es │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── fi │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── fr_CA │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── fr_FR │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── i18n_placeholders.rb │ ├── pt_BR │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ ├── sv_FI │ │ ├── LC_MESSAGES │ │ │ └── app.mo │ │ └── app.po │ └── tr_TR │ │ ├── LC_MESSAGES │ │ └── app.mo │ │ └── app.po ├── locales │ ├── .translation_io │ ├── bootstrap │ │ ├── de.bootstrap.yml │ │ ├── en-GB.bootstrap.yml │ │ ├── en-US.bootstrap.yml │ │ ├── es.bootstrap.yml │ │ ├── fr-FR.bootstrap.yml │ │ ├── fr.bootstrap.yml │ │ ├── pt-BR.bootstrap.yml │ │ └── tr-TR.bootstrap.yml │ ├── contact_us │ │ ├── contact_us.de.yml │ │ ├── contact_us.el.yml │ │ ├── contact_us.en-GB.yml │ │ ├── contact_us.en-US.yml │ │ ├── contact_us.es.yml │ │ ├── contact_us.fr-FR.yml │ │ ├── contact_us.fr.yml │ │ ├── contact_us.he.yml │ │ ├── contact_us.it.yml │ │ ├── contact_us.ja.yml │ │ ├── contact_us.pl.yml │ │ ├── contact_us.pt-BR.yml │ │ ├── contact_us.pt-PT.yml │ │ ├── contact_us.ru.yml │ │ ├── contact_us.tr-TR.yml │ │ ├── contact_us.zh-TW.yml │ │ └── contact_us.zh.yml │ ├── de.yml │ ├── devise │ │ ├── devise.de.yml │ │ ├── devise.en-GB.yml │ │ ├── devise.en-US.yml │ │ ├── devise.es.yml │ │ ├── devise.fr-FR.yml │ │ ├── devise.fr.yml │ │ ├── devise.pt-BR.yml │ │ ├── devise.tr-TR.yml │ │ ├── devise_invitable.de.yml │ │ ├── devise_invitable.en-GB.yml │ │ ├── devise_invitable.en-US.yml │ │ ├── devise_invitable.es.yml │ │ ├── devise_invitable.fr-FR.yml │ │ ├── devise_invitable.fr.yml │ │ └── devise_invitable.tr-TR.yml │ ├── el.yml │ ├── en-GB.yml │ ├── en-US.yml │ ├── en.yml │ ├── es.yml │ ├── faker │ │ ├── faker.de.yml │ │ ├── faker.en-GB.yml │ │ ├── faker.en.yml │ │ └── faker.fr.yml │ ├── fi.yml │ ├── fr-CA.yml │ ├── fr-FR.yml │ ├── fr.yml │ ├── ja.yml │ ├── localization.de.yml │ ├── localization.en-CA.yml │ ├── localization.en-GB.yml │ ├── localization.en-US.yml │ ├── localization.es.yml │ ├── localization.fi.yml │ ├── localization.fr-CA.yml │ ├── localization.fr-FR.yml │ ├── localization.pt-BR.yml │ ├── localization.sv-FI.yml │ ├── localization.tr-TR.yml │ ├── pt-BR.yml │ ├── ro.yml │ ├── sv-FI.yml │ ├── tr-TR.yml │ ├── translation.de.yml │ ├── translation.en-CA.yml │ ├── translation.en-GB.yml │ ├── translation.en-US.yml │ ├── translation.es.yml │ ├── translation.fi.yml │ ├── translation.fr-CA.yml │ ├── translation.fr-FR.yml │ ├── translation.pt-BR.yml │ ├── translation.sv-FI.yml │ └── translation.tr-TR.yml ├── puma.rb ├── routes.rb ├── routes_test.rb ├── spring.rb ├── storage.yml ├── webpack │ ├── loaders │ │ └── erb.js │ └── webpack.config.js └── webpacker.yml ├── db ├── diagram.svg ├── migrate │ ├── 20130603140800_create_phases.rb │ ├── 20130603143109_create_versions.rb │ ├── 20130611111340_create_user_types.rb │ ├── 20130611111359_create_user_statuses.rb │ ├── 20130611113325_create_organisation_types.rb │ ├── 20130611132258_create_user_role_types.rb │ ├── 20130611133033_create_questions.rb │ ├── 20130611135155_create_answers.rb │ ├── 20130611135806_create_users.rb │ ├── 20130611140229_create_pages.rb │ ├── 20130611141026_create_projects.rb │ ├── 20130611151644_create_plans.rb │ ├── 20130611151704_create_plan_sections.rb │ ├── 20130611151729_create_project_groups.rb │ ├── 20130611151750_create_project_partners.rb │ ├── 20130611152208_create_user_org_roles.rb │ ├── 20130611153828_create_dmptemplates.rb │ ├── 20130611153921_create_sections.rb │ ├── 20130611154055_create_file_uploads.rb │ ├── 20130611154109_create_file_types.rb │ ├── 20130612113321_create_organisations.rb │ ├── 20130612133806_create_themes.rb │ ├── 20130612133938_create_guidances.rb │ ├── 20130621101824_fix_column_names.rb │ ├── 20130625125419_fix_question_theme_relation.rb │ ├── 20130705113828_add_locale_to_themes.rb │ ├── 20130705145146_update_type_column_in_questions.rb │ ├── 20130705151214_add_locale_to_templates.rb │ ├── 20130708092900_devise_create_admin_users.rb │ ├── 20130717093801_add_slug_to_projects.rb │ ├── 20130717093814_add_slug_to_phases.rb │ ├── 20130717115239_add_slug_to_plans.rb │ ├── 20130717125231_create_options.rb │ ├── 20130717125748_add_multiple_choice_and_multiple_permitted_and_is_expanded_to_questions.rb │ ├── 20130717130107_add_answer_options_relation.rb │ ├── 20130724112909_add_devise_to_users.rb │ ├── 20130724123043_rolify_create_roles.rb │ ├── 20130730102219_change_plan_section_columns.rb │ ├── 20130731124011_add_organisation_to_project.rb │ ├── 20130731124532_add_parent_to_organisation.rb │ ├── 20130731130811_update_guidance_columns.rb │ ├── 20130731131354_create_guidance_groups.rb │ ├── 20130731131846_drop_project_partners.rb │ ├── 20130731132153_link_guidance_to_guidance_groups.rb │ ├── 20130731133039_link_guidance_groups_to_projects.rb │ ├── 20130812100100_add_release_time_to_plan_section.rb │ ├── 20130902141025_add_is_default_to_dmptemplate.rb │ ├── 20130902141150_add_grant_number_to_project.rb │ ├── 20130902142403_add_organisation_id_to_user.rb │ ├── 20130903072531_remove_organisation_id_from_user.rb │ ├── 20130903084409_create_option_warnings.rb │ ├── 20130903123015_create_friendly_id_slugs.rb │ ├── 20130913134657_add_fields_to_projects.rb │ ├── 20130913161023_add_external_guidance_url_to_phases.rb │ ├── 20130918130838_add_confirmable_to_users.rb │ ├── 20130918154825_devise_invitable_add_to_users.rb │ ├── 20130926121718_add_project_administrator_to_project_groups.rb │ ├── 20130927091932_add_other_organisation_to_users.rb │ ├── 20130927092206_add_is_other_to_organisations.rb │ ├── 20131108151505_add_dmptemplate_id_to_guidance.rb │ ├── 20131111090129_create_suggested_answers.rb │ ├── 20131118094629_change_versions_published.rb │ ├── 20131126133804_add_dmponline3_to_users.rb │ ├── 20131126135301_add_accept_terms_to_users.rb │ ├── 20131127100520_create_splash_logs.rb │ ├── 20131128150644_add_sort_name_to_organisations.rb │ ├── 20131129143550_create_exported_plans.rb │ ├── 20131212111049_add_is_example_to_suggested_answers.rb │ ├── 20140210121753_add_is_text_field_to_questions.rb │ ├── 20140214120652_add_question_id_to_guidances.rb │ ├── 20140214155629_dmptemplates_guidance_groups.rb │ ├── 20140218113637_themes_in_guidance.rb │ ├── 20140331160554_question_formats.rb │ ├── 20140331162130_add_question_format_id_to_questions.rb │ ├── 20140407105254_add_optional_subset_to_guidance_groups.rb │ ├── 20140407153318_add_published_to_sections.rb │ ├── 20140423200913_remove_suggested_answer_from_questions.rb │ ├── 20140429114226_change_published_in_version_to_boolean.rb │ ├── 20140604092907_rails_settings_migration.rb │ ├── 20140707143840_add_funder_name_to_project.rb │ ├── 20150415150436_remove_fields_from_questions.rb │ ├── 20150416092404_remove_field_from_phases.rb │ ├── 20150416101954_remove_field_from_guidances.rb │ ├── 20150416103652_remove_field_from_projects.rb │ ├── 20150416105712_change_field_type_from_projects.rb │ ├── 20150416112327_add_field_to_guidance_groups.rb │ ├── 20150416113232_remove_fields_from_roles.rb │ ├── 20150416113625_add_field_to_roles.rb │ ├── 20150416114743_remove_fields_from_users.rb │ ├── 20150416120233_add_field_to_users.rb │ ├── 20150416131657_remove_pages_table.rb │ ├── 20150416133602_remove_admin_users_table.rb │ ├── 20150427110644_create_comments.rb │ ├── 20150427145433_add_field_column_to_comments.rb │ ├── 20150430135839_add_plan_id_to_comments.rb │ ├── 20150501150321_add_archived_by_to_comments.rb │ ├── 20150518153927_add_fields_to_roles.rb │ ├── 20150805105542_add_institution_logo_text_banner_to.rb │ ├── 20150809210811_add_field_to_questions.rb │ ├── 20151208142029_add_field_to_guidances.rb │ ├── 20151208142836_update_field_in_guidance_groups.rb │ ├── 20160105114044_change_wayfless_entity_format_in_organisations.rb │ ├── 20160603124621_create_structure_for_api_authentication.rb │ ├── 20160609081745_extend_structure_for_api_authentication.rb │ ├── 20160615095101_add_field_to_user.rb │ ├── 20160719102542_remove_depricated_api_structure.rb │ ├── 20160719140055_create_languages.rb │ ├── 20160729091510_add_language_to_user.rb │ ├── 20160805101216_create_regions.rb │ ├── 20160805103704_create_region_groups.rb │ ├── 20160805103912_add_default_language_to_language.rb │ ├── 20160805105928_add_region_ref_to_organisation.rb │ ├── 20160805105941_add_language_ref_to_organisation.rb │ ├── 20160810193149_add_logouid_to_organisations.rb │ ├── 20160822130601_remove_description_from_organisation.rb │ ├── 20160822130701_add_contact_email_to_organisation.rb │ ├── 20161021100420_single_organisation_for_users.rb │ ├── 20161024163546_create_user_identifier_scheme.rb │ ├── 20161024163920_create_user_identifiers.rb │ ├── 20161102221313_change_text_description_to_text_description_in_token_permission_types.rb │ ├── 20161115105808_drop_unused_user_tables.rb │ ├── 20161115114309_drop_option_warning_table.rb │ ├── 20161115121831_remove_parent_id_from_questions.rb │ ├── 20161115123658_remove_unused_fields_from_roles.rb │ ├── 20161115124634_remove_unused_fields_from_organisations.rb │ ├── 20161115132137_remove_unused_fields_from_dmptemplates.rb │ ├── 20161115143222_rename_roles_to_perms.rb │ ├── 20161122152339_new_plan_template_structure.rb │ ├── 20161205095623_removing_intermediary_tables.rb │ ├── 20161205095624_replacing_organisation_types_with_bitflags.rb │ ├── 20161205095625_replacing_plan_roles_with_bitflags.rb │ ├── 20161206122926_add_foreign_keys.rb │ ├── 20161208122123_single_group_for_guidance.rb │ ├── 20170124235829_add_visibility_to_plans.rb │ ├── 20170130173049_add_option_based_to_question_formats.rb │ ├── 20170201194502_remove_region_group_and_add_super_region_id_to_regions.rb │ ├── 20170227122226_add_locking_columns.rb │ ├── 20170302111544_question_format_to_enum.rb │ ├── 20170412143945_add_phase_id_to_exported_plan.rb │ ├── 20170421170849_add_dirty_to_templates.rb │ ├── 20170427110141_add_logo_url_to_identifier_schemes.rb │ ├── 20170428083711_add_user_landing_url_to_identifier_schemes.rb │ ├── 20170516184429_add_recovery_email_to_users.rb │ ├── 20170606215136_add_preferences_to_users.rb │ ├── 20170607154433_create_org_identifiers.rb │ ├── 20170619173045_add_data_contact_email_and_data_contact_phone_to_plans.rb │ ├── 20170702012742_ensure_indexes_in_place.rb │ ├── 20170710182442_add_principal_investigator_email_to_plans.rb │ ├── 20170712084314_move_prefs_to_table.rb │ ├── 20170719114516_add_active_flag_to_roles.rb │ ├── 20171013152425_add_principal_investigator_phone_to_plans.rb │ ├── 20171024214257_add_links_to_orgs.rb │ ├── 20171024220146_add_contact_name_to_orgs.rb │ ├── 20171025200301_add_feedback_fields_to_orgs.rb │ ├── 20171102164156_change_plan_visibility_default.rb │ ├── 20171102185518_add_feedback_requested_to_plans.rb │ ├── 20171122195828_change_prefs_settings_to_text.rb │ ├── 20171124133802_add_links_to_templates.rb │ ├── 20180123161959_change_long_strings_to_text.rb │ ├── 20180212124444_add_complete_flag_to_plans.rb │ ├── 20180312135238_add_default_to_org_links.rb │ ├── 20180312141558_add_default_to_plan_visibility.rb │ ├── 20180313120831_add_required_indices.rb │ ├── 20180315161757_add_active_to_users.rb │ ├── 20180328115455_create_notifications.rb │ ├── 20180405151713_rename_template_fields.rb │ ├── 20180405151942_remove_dirty_from_templates.rb │ ├── 20180405152454_add_family_id_index_to_templates.rb │ ├── 20180412092647_create_notification_acknowledgements.rb │ ├── 20180417124026_add_unique_index_family_id_version_to_template.rb │ ├── 20180508151824_drop_tablename.rb │ ├── 20180713145319_fix_invalid_mysql_indices.rb │ ├── 20180713145547_remove_defaults_from_links.rb │ ├── 20180713161007_remove_settings_indices.rb │ ├── 20180713164120_add_length_constraints_to_users_email.rb │ ├── 20180803105147_remove_published_from_sections.rb │ ├── 20180807114035_add_default_value_to_optional_subset_on_guidance_groups.rb │ ├── 20180807114052_add_default_value_to_published_on_guidance_groups.rb │ ├── 20180807120926_add_default_value_to_archived_on_notes.rb │ ├── 20180807121126_add_default_value_to_is_other_on_orgs.rb │ ├── 20180813114157_remove_logo_file_name_from_orgs.rb │ ├── 20180813114216_remove_parent_id_from_orgs.rb │ ├── 20180813114234_remove_wayfless_entity_from_orgs.rb │ ├── 20180813114348_remove_slug_from_phases.rb │ ├── 20180813114525_remove_slug_from_plans.rb │ ├── 20180813114550_drop_table_friendly_id_slugs.rb │ ├── 20180813114614_drop_table_file_types.rb │ ├── 20180813114622_drop_table_file_uploads.rb │ ├── 20180813114628_drop_table_splash_logs.rb │ ├── 20180813114649_remove_banner_text_from_orgs.rb │ ├── 20180813114719_remove_question_id_from_guidances.rb │ ├── 20180813114801_remove_orcid_id_from_users.rb │ ├── 20180813114813_remove_shibboleth_id_from_users.rb │ ├── 20180815180221_drop_unique_index_customization_of_version_org_id_from_templates.rb │ ├── 20180901095920_create_stats.rb │ ├── 20180903104704_add_versionable_id_to_phases_sections_and_questions.rb │ ├── 20181024120747_add_sessions_table.rb │ ├── 20181025220743_add_details_to_stats.rb │ ├── 20190507091025_create_departments.rb │ ├── 20190724134426_create_conditions.rb │ ├── 20200121190035_add_managed_to_orgs.rb │ ├── 20200123162357_create_identifiers.rb │ ├── 20200130160919_contextualize_identifier_schemes.rb │ ├── 20200203190734_add_funder_and_org_to_plans.rb │ ├── 20200207212113_create_api_clients.rb │ ├── 20200212145931_add_enabled_to_notifications.rb │ ├── 20200213203124_add_last_api_access_to_users.rb │ ├── 20200215190747_add_context_to_identifier_schemes.rb │ ├── 20200218213103_create_contributors.rb │ ├── 20200218213414_add_start_and_end_dates_to_plans.rb │ ├── 20200313153356_add_versionable_to_question_options.rb │ ├── 20200323213847_add_api_client_id_to_plans.rb │ ├── 20200514102523_create_trackers.rb │ ├── 20200601121822_add_filtered_to_stats.rb │ ├── 20200625092600_add_indexes_to_plans.rb │ ├── 20201009101541_remove_user_identifiers_table.rb │ ├── 20201113174910_add_org_id_to_api_clients.rb │ ├── 20201119201215_create_research_outputs.rb │ ├── 20201119210343_create_mime_types.rb │ ├── 20201208192403_drop_org_identifiers.rb │ ├── 20201216140226_change_last_access_api_clients.rb │ ├── 20210729204238_create_research_domains.rb │ ├── 20210729204412_add_ethical_issues_and_funding_status_to_plans.rb │ ├── 20210729204611_madmp_cleanup.rb │ ├── 20210802161057_create_repositories.rb │ ├── 20210802161108_create_licenses.rb │ ├── 20210802161120_create_metadata_standards.rb │ ├── 20210819160319_db_cleanup_2021.rb │ ├── 20220315104737_add_helpdesk_email_to_orgs.rb │ ├── 20240613141449_add_service_name_to_active_storage_blobs.active_storage.rb │ ├── 20240613141450_create_active_storage_variant_records.active_storage.rb │ ├── 20240613141451_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb │ └── 20250115102816_update_conditions_json_columns_data.rb ├── schema.rb └── seeds.rb ├── doc ├── README_FOR_APP ├── roadmap.png └── roadmap.svg ├── lib ├── cleanup.rb ├── cleanup │ ├── deprecators.rb │ └── deprecators │ │ ├── get_deprecator.rb │ │ ├── predicate_deprecator.rb │ │ └── set_deprecator.rb ├── csvable.rb ├── custom_failure.rb ├── data_cleanup.rb ├── data_cleanup │ ├── README.md │ ├── instance_check.rb │ ├── model_check.rb │ ├── reporting.rb │ └── rules.rb ├── generators │ └── data_cleanup_rule │ │ ├── USAGE │ │ ├── data_cleanup_rule_generator.rb │ │ └── templates │ │ └── data_cleanup │ │ └── rules │ │ ├── base.rb │ │ └── rule.rb.erb ├── global_helpers.rb ├── org_date_rangeable.rb ├── sort_direction.rb ├── tasks │ ├── .gitkeep │ ├── auto_annotate_models.rake │ ├── data_cleanup.rake │ ├── doc.rake │ ├── factory_bot.rake │ ├── gettext.rake │ ├── initialize_data.rake │ ├── migrate.rake │ ├── stat.rake │ ├── upgrade.rake │ ├── utils │ │ ├── external_api.rake │ │ ├── language.rake │ │ ├── templates.rake │ │ └── update.rake │ └── v3.rake ├── templates │ └── erb │ │ └── scaffold │ │ └── _form.html.erb └── unique_random.rb ├── log └── .gitkeep ├── package.json ├── postcss.config.js ├── public ├── 403.html ├── 404.html ├── 422.html ├── 429.html ├── 500.html ├── _index.html ├── files │ ├── DMP_Checklist_2013.pdf │ ├── DMPonline-DeliveryNote-May2015.pdf │ ├── DMPonline-ReleaseNote-August2015.pdf │ ├── DMPonline-user-group-IDCC-2016.pdf │ ├── DMPonline-user-group-notes-29Jan2015.pdf │ ├── DMPonline-v4-InstitutionalBranding.pdf │ ├── DMPonline-v4-InstitutionalLogin.pdf │ ├── DMPonline-v4-LocaleSupport.pdf │ ├── roadmap_logo.png │ └── roadmap_logo.svg ├── github-contributor-infographic-final.png ├── i18n.js ├── images │ └── .keep ├── robots.txt ├── tinymce │ ├── skins │ │ └── oxide │ │ │ ├── content.css │ │ │ ├── content.inline.css │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── skin.css │ │ │ ├── skin.min.css │ │ │ ├── skin.shadowdom.css │ │ │ └── skin.shadowdom.min.css │ └── tinymce.css └── videos │ └── .keep ├── spec ├── controllers │ ├── answers_controller_spec.rb │ ├── concerns │ │ └── org_selectable_spec.rb │ ├── contributors_controller_spec.rb │ ├── guidance_groups_controller_spec.rb │ ├── guidances_controller_spec.rb │ ├── notes_controller_spec.rb │ ├── orgs_controller_spec.rb │ ├── registrations_controller_spec.rb │ ├── super_admin │ │ └── orgs_controller_spec.rb │ └── usage_controller_spec.rb ├── csvable_spec.rb ├── factories │ ├── annotations.rb │ ├── answers.rb │ ├── api_clients.rb │ ├── conditions.rb │ ├── contributors.rb │ ├── departments.rb │ ├── exported_plans.rb │ ├── guidance_groups.rb │ ├── guidances.rb │ ├── identifier_schemes.rb │ ├── identifiers.rb │ ├── languages.rb │ ├── licenses.rb │ ├── metadata_standards.rb │ ├── mime_types.rb │ ├── notes.rb │ ├── notifications.rb │ ├── orgs.rb │ ├── perms.rb │ ├── phases.rb │ ├── plans.rb │ ├── prefs.rb │ ├── question_formats.rb │ ├── question_options.rb │ ├── questions.rb │ ├── regions.rb │ ├── repositories.rb │ ├── research_domains.rb │ ├── research_outputs.rb │ ├── roles.rb │ ├── sections.rb │ ├── stat_created_plan.rb │ ├── stat_joined_user.rb │ ├── templates.rb │ ├── themes.rb │ ├── token_permission_types.rb │ ├── trackers.rb │ └── users.rb ├── features │ ├── annotations │ │ └── annotations_editing_spec.rb │ ├── feedback_requests_spec.rb │ ├── locales_spec.rb │ ├── modal_search_spec.rb │ ├── plans │ │ └── exports_spec.rb │ ├── plans_spec.rb │ ├── questions │ │ ├── checkbox_questions_spec.rb │ │ ├── dropdown_questions_spec.rb │ │ ├── radiobuttons_questions_spec.rb │ │ ├── textarea_questions_spec.rb │ │ └── textfield_questions_spec.rb │ ├── registrations_spec.rb │ ├── sessions_spec.rb │ ├── super_admins │ │ ├── merge_org_spec.rb │ │ ├── org_swaps_spec.rb │ │ └── orgs_spec.rb │ ├── templates │ │ ├── templates_copying_spec.rb │ │ ├── templates_editings_spec.rb │ │ └── templates_upgrade_customisations_spec.rb │ └── templates_spec.rb ├── helpers │ ├── identifier_helper_spec.rb │ └── usage_helper_spec.rb ├── javascripts │ ├── accordion.js │ ├── autoCompleteSpec.js │ ├── debounceSpec.js │ ├── fixtures │ │ ├── accordion.html │ │ └── autoComplete.html │ ├── isTypeSpec.js │ ├── isValidInputTypeSpec.js │ └── tinymceSpec.js ├── karma │ └── unit.js ├── mixins │ └── versionable_model.rb ├── models │ ├── annotation_spec.rb │ ├── answer_spec.rb │ ├── api_client_spec.rb │ ├── concerns │ │ ├── date_rangeable_spec.rb │ │ └── identifiable_spec.rb │ ├── condition_spec.rb │ ├── contributor_spec.rb │ ├── department_spec.rb │ ├── exported_plan_spec.rb │ ├── guidance_group_spec.rb │ ├── guidance_spec.rb │ ├── identifier_scheme_spec.rb │ ├── identifier_spec.rb │ ├── language_spec.rb │ ├── license_spec.rb │ ├── metadata_standard_spec.rb │ ├── note_spec.rb │ ├── notification_spec.rb │ ├── org_spec.rb │ ├── perm_spec.rb │ ├── phase_spec.rb │ ├── plan_spec.rb │ ├── pref_spec.rb │ ├── question_format_spec.rb │ ├── question_option_spec.rb │ ├── question_spec.rb │ ├── region_spec.rb │ ├── repository_spec.rb │ ├── research_domain_spec.rb │ ├── research_output_spec.rb │ ├── role_spec.rb │ ├── section_sorter_spec.rb │ ├── section_spec.rb │ ├── stat_created_plan_spec.rb │ ├── stat_joined_user_spec.rb │ ├── template_spec.rb │ ├── theme_spec.rb │ ├── token_permission_type_spec.rb │ ├── tracker_spec.rb │ └── user_spec.rb ├── policies │ └── usage_policy_spec.rb ├── presenters │ ├── api │ │ └── v1 │ │ │ ├── contributor_presenter_spec.rb │ │ │ ├── funding_presenter_spec.rb │ │ │ ├── language_presenter_spec.rb │ │ │ ├── org_presenter_spec.rb │ │ │ ├── pagination_presenter_spec.rb │ │ │ ├── plan_presenter_spec.rb │ │ │ └── template_presenter_spec.rb │ ├── identifier_presenter_spec.rb │ ├── org_selection_presenter_spec.rb │ ├── plan_presenter.rb │ ├── research_output_presenter_spec.rb │ └── super_admin │ │ └── orgs │ │ └── merge_presenter_spec.rb ├── rails_helper.rb ├── requests │ ├── api │ │ └── v1 │ │ │ ├── authentication_controller_spec.rb │ │ │ ├── base_api_controller_spec.rb │ │ │ ├── plans_controller.rb │ │ │ └── templates_controller_spec.rb │ └── usage_downloads_spec.rb ├── services │ ├── api │ │ └── v1 │ │ │ ├── auth │ │ │ └── jwt │ │ │ │ ├── authentication_service_spec.rb │ │ │ │ ├── authorization_service_spec.rb │ │ │ │ └── json_web_token_spec.rb │ │ │ ├── contextual_error_service_spec.rb │ │ │ ├── conversion_service_spec.rb │ │ │ ├── deserialization │ │ │ ├── contributor_spec.rb │ │ │ ├── funding_spec.rb │ │ │ ├── identifier_spec.rb │ │ │ ├── org_spec.rb │ │ │ └── plan_spec.rb │ │ │ ├── deserialization_service_spec.rb │ │ │ ├── json_validation_service_spec.rb │ │ │ ├── persistence_service_spec.rb │ │ │ └── validation_service_spec.rb │ ├── application_service_spec.rb │ ├── external_apis │ │ ├── base_service_spec.rb │ │ ├── rdamsc_service_spec.rb │ │ ├── re3data_service_spec.rb │ │ ├── ror_service_spec.rb │ │ └── spdx_service_spec.rb │ ├── locale_service_spec.rb │ ├── org │ │ ├── create_created_plan_service_spec.rb │ │ ├── create_joined_user_service_spec.rb │ │ ├── create_last_month_created_plan_service_spec.rb │ │ ├── create_last_month_joined_user_service_spec.rb │ │ ├── total_count_created_plan_service_spec.rb │ │ ├── total_count_joined_user_service_spec.rb │ │ └── total_count_stat_service_spec.rb │ ├── org_selection │ │ ├── hash_to_org_service_spec.rb │ │ ├── org_to_hash_service_spec.rb │ │ └── search_service_spec.rb │ └── template │ │ └── upgrade_customization_service_spec.rb ├── spec_helper.rb ├── support │ ├── capybara.rb │ ├── database_cleaner.rb │ ├── factory_bot.rb │ ├── faker.rb │ ├── helpers │ │ ├── api.rb │ │ ├── autocomplete_helper.rb │ │ ├── capybara_helper.rb │ │ ├── identifier_helper.rb │ │ ├── links_helper.rb │ │ ├── roles_helper.rb │ │ ├── sessions_helper.rb │ │ ├── template_helper.rb │ │ ├── tiny_mce_helper.rb │ │ └── webmocks.rb │ ├── locales.rb │ ├── matchers │ │ └── has_errors_matcher.rb │ ├── mocks │ │ ├── api_json_samples.rb │ │ ├── form_field_json_values.rb │ │ └── logo_file.png │ ├── shoulda.rb │ └── wait_for_ajax.rb └── views │ ├── api │ └── v1 │ │ ├── _standard_response.json_jbuilder_spec.rb │ │ ├── contributors │ │ └── _show.json.jbuilder_spec.rb │ │ ├── datasets │ │ └── _show.json.jbuilder_spec.rb │ │ ├── error.json.jbuilder_spec.rb │ │ ├── identifiers │ │ └── _show.json.jbuilder_spec.rb │ │ ├── orgs │ │ └── _show.json.jbuilder_spec.rb │ │ ├── plans │ │ ├── _cost.json.jbuilder_spec.rb │ │ ├── _funding.json.jbuilder_spec.rb │ │ ├── _project.json.jbuilder_spec.rb │ │ └── _show.json.jbuilder_spec.rb │ │ ├── templates │ │ └── index.json.jbuilder_spec.rb │ │ └── token.json.jbuilder_spec.rb │ └── layouts │ └── modal_search │ ├── _form.html.erb_spec.rb │ ├── _result.html.erb_spec.rb │ ├── _results.html.erb_spec.rb │ └── _selections.html.erb_spec.rb └── yarn.lock /.browserslistrc: -------------------------------------------------------------------------------- 1 | defaults 2 | > .25% 3 | Firefox >= 52 4 | IE >= 10 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | 12 | # Matches multiple files with brace expansion notation 13 | # Set default charset 14 | [*.{js,scss,rb,erb}] 15 | charset = utf-8 16 | indent_style = space 17 | indent_size = 2 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Please complete the following fields as applicable: 2 | 3 | **What version of the DMPRoadmap code are you running? (e.g. v2.2.0)** 4 | 5 | **Expected behaviour:** 6 | 7 | **Actual behaviour:** 8 | 9 | **Steps to reproduce:** 10 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Fixes # . 2 | 3 | Changes proposed in this PR: 4 | - 5 | -------------------------------------------------------------------------------- /.github/workflows/brakeman.yml: -------------------------------------------------------------------------------- 1 | name: Brakeman 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | master 7 | 8 | jobs: 9 | brakeman: 10 | 11 | runs-on: ubuntu-24.04 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | 16 | # Will run Brakeman checks on dependencies 17 | # https://github.com/marketplace/actions/brakeman-action 18 | - name: Brakeman 19 | uses: artplan1/brakeman-action@v1.2.1 20 | with: 21 | flags: "--color" 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | -------------------------------------------------------------------------------- /.github/workflows/eslint.yml: -------------------------------------------------------------------------------- 1 | name: ESLint 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | eslint: 7 | 8 | runs-on: ubuntu-24.04 9 | 10 | steps: 11 | # Checkout the repo 12 | - uses: actions/checkout@v2 13 | 14 | # Install Node 15 | - uses: actions/setup-node@v2 16 | with: 17 | cache: 'yarn' 18 | node-version: 18 19 | 20 | # Run yarn install for JS dependencies 21 | - name: 'Yarn Install' 22 | run: yarn install 23 | 24 | - name: 'Run ESLint' 25 | run: yarn run eslint app/javascript/**/*.js --ext .js 26 | -------------------------------------------------------------------------------- /.github/workflows/rubocop.yml: -------------------------------------------------------------------------------- 1 | name: Rubocop 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | rubocop: 7 | runs-on: ubuntu-24.04 8 | 9 | steps: 10 | # Checkout the repo 11 | - uses: actions/checkout@v2 12 | 13 | # Install Ruby and run bundler 14 | - uses: ruby/setup-ruby@v1 15 | with: 16 | ruby-version: '3.0' 17 | bundler-cache: true 18 | 19 | # Run the Rubocop linter checks 20 | - name: 'Run Rubocop' 21 | run: bin/rubocop 22 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | # release: rake db:migrate 2 | web: bundle exec puma -C config/puma.rb 3 | -------------------------------------------------------------------------------- /Procfile.dev: -------------------------------------------------------------------------------- 1 | web: unset PORT && bin/rails server 2 | js: yarn build --watch 3 | css: yarn build:css --watch 4 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env rake 2 | # frozen_string_literal: true 3 | 4 | # Add your own tasks in files placed in lib/tasks ending in .rake, 5 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 6 | # require 'rake/testtask' 7 | # require File.expand_path('../config/application', __FILE__) 8 | 9 | # DMPRoadmap::Application.load_tasks 10 | 11 | # task default: :test 12 | 13 | require_relative 'config/application' 14 | 15 | DMPRoadmap::Application.load_tasks 16 | 17 | task default: :test 18 | -------------------------------------------------------------------------------- /app/assets/builds/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/builds/.gitkeep -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_tree ../builds 3 | //= link_tree ../fonts 4 | 5 | // We use Webpacker to manage our JS, so removed the '=' sign here to tell 6 | // Sprockets to ignore JS 7 | // link_directory ../javascripts .js 8 | -------------------------------------------------------------------------------- /app/assets/fonts/GillSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/fonts/GillSans-Light.ttf -------------------------------------------------------------------------------- /app/assets/images/asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/asc.gif -------------------------------------------------------------------------------- /app/assets/images/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/background.jpg -------------------------------------------------------------------------------- /app/assets/images/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/bg.gif -------------------------------------------------------------------------------- /app/assets/images/dcc_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/dcc_logo.png -------------------------------------------------------------------------------- /app/assets/images/dcc_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/dcc_logo_white.png -------------------------------------------------------------------------------- /app/assets/images/desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/desc.gif -------------------------------------------------------------------------------- /app/assets/images/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/download.png -------------------------------------------------------------------------------- /app/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/favicon.ico -------------------------------------------------------------------------------- /app/assets/images/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/fullscreen.png -------------------------------------------------------------------------------- /app/assets/images/help_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/help_button.png -------------------------------------------------------------------------------- /app/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/logo.png -------------------------------------------------------------------------------- /app/assets/images/minus_laranja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/minus_laranja.png -------------------------------------------------------------------------------- /app/assets/images/plus_laranja.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/plus_laranja.png -------------------------------------------------------------------------------- /app/assets/images/question-mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/question-mark.png -------------------------------------------------------------------------------- /app/assets/images/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/remove.png -------------------------------------------------------------------------------- /app/assets/images/roadmap_logo_orange_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/roadmap_logo_orange_grey.png -------------------------------------------------------------------------------- /app/assets/images/roadmap_logo_orange_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/roadmap_logo_orange_white.png -------------------------------------------------------------------------------- /app/assets/images/select2-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/select2-spinner.gif -------------------------------------------------------------------------------- /app/assets/images/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/select2.png -------------------------------------------------------------------------------- /app/assets/images/select2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/select2x2.png -------------------------------------------------------------------------------- /app/assets/images/spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/spinner.gif -------------------------------------------------------------------------------- /app/assets/images/uc3_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/uc3_logo.jpg -------------------------------------------------------------------------------- /app/assets/images/uc3_logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/uc3_logo_white.png -------------------------------------------------------------------------------- /app/assets/images/ue_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/images/ue_logo.png -------------------------------------------------------------------------------- /app/assets/javascripts/application.js: -------------------------------------------------------------------------------- 1 | // We use Webpacker instead of Sprockets to manage our JS. See the following 2 | // for the Webpacker config: 3 | // - config/webpacker.yml 4 | // - config/webpack/**/*.js 5 | // - app/javascript/packs/application.js 6 | // - app/views/layouts/application.html.erb 7 | -------------------------------------------------------------------------------- /app/assets/javascripts/cable.js: -------------------------------------------------------------------------------- 1 | // We use Webpacker to manage our JS. See the /app/javascript/channels/ dir 2 | // for our ActionCable config and channels 3 | -------------------------------------------------------------------------------- /app/assets/stylesheets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/stylesheets/.gitkeep -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/stylesheets/blocks/.gitkeep -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_alerts.scss: -------------------------------------------------------------------------------- 1 | .alert { 2 | border-radius: 0px; 3 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_clearable_field.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/stylesheets/blocks/_clearable_field.scss -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_display.scss: -------------------------------------------------------------------------------- 1 | .display-block { 2 | display: block; 3 | } 4 | 5 | .display-inline { 6 | display: inline; 7 | } 8 | 9 | .display-off { 10 | display: none; 11 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_footers.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../node_modules/bootstrap/scss/functions"; 2 | @import "../../../../node_modules/bootstrap/scss/variables"; 3 | 4 | #footer-navbar { 5 | margin-bottom: 0px; 6 | position: absolute; 7 | bottom: 0; 8 | width: 100%; 9 | border-radius:0px; 10 | z-index: 1; 11 | ul { 12 | padding-right: calc($grid-gutter-width / 2); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_forms.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | 3 | .form-control { 4 | border: 0px; 5 | } 6 | 7 | .form-control input, .form-control textarea, .form-control select{ 8 | border: 2px solid $color-border-light; 9 | } 10 | 11 | .form-check { 12 | padding-left: 0rem; 13 | } 14 | 15 | .form-inline{ 16 | margin-bottom: 5px; 17 | } 18 | 19 | .form-check-label { 20 | padding-left: 5px; 21 | } 22 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_help_blocks.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | /* Help-Block */ 3 | .help-block { 4 | color: $color-text-red; 5 | } 6 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_input_groups.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | .input-group-text { 3 | border-radius: 0rem; 4 | background-color: $color-primary-background; 5 | padding: 0.5rem; 6 | } 7 | 8 | .form-control { 9 | border-radius: 0rem; 10 | } 11 | 12 | .input-group .form-control { 13 | border: 2px solid $color-border-light; 14 | } 15 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_logos.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../node_modules/bootstrap/scss/functions"; 2 | @import "../../../../node_modules/bootstrap/scss/variables"; 3 | 4 | /* HEADER LOGOS */ 5 | .app-logo { 6 | height: 50px; 7 | padding-right: calc($grid-gutter-width / 2); 8 | } 9 | 10 | .org-logo { 11 | height: 100px; 12 | padding-right: calc($grid-gutter-width / 2); 13 | } 14 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_modal_permissions.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../node_modules/bootstrap/scss/functions"; 2 | @import "../../../../node_modules/bootstrap/scss/variables"; 3 | 4 | /* Overrides ul list */ 5 | #modal-permissions ul { 6 | list-style-type: none; 7 | } 8 | 9 | /* Overrides list-group */ 10 | #modal-permissions .list-group li:nth-child(1){ 11 | border-top: 0 none; 12 | } 13 | 14 | /* Overrides list-group-item */ 15 | #modal-permissions .list-group-item { 16 | height: 30px; 17 | padding: 5px calc($grid-gutter-width / 2); 18 | } 19 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_notification_areas.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../node_modules/bootstrap/scss/functions"; 2 | @import "../../../../node_modules/bootstrap/scss/variables"; 3 | @import "../../../../node_modules/bootstrap/scss/mixins"; 4 | 5 | .notification-area--floating { 6 | position: fixed; 7 | top: 4rem; 8 | z-index: 1000; 9 | // Take up width of the page on mobile 10 | right: 5vw; 11 | width: 90vw; 12 | 13 | // Non-mobile settings 14 | @include media-breakpoint-up(sm) { 15 | right: 4rem; 16 | width: 300px; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_org_links.scss: -------------------------------------------------------------------------------- 1 | // TODO: Refactor this. Instead of writing specific CSS rules for particular objects, 2 | // we should provide utility classes which can provide the desired style to this object 3 | .remove-org-link i { 4 | margin-left: calc($grid-gutter-width / -2); 5 | margin-top: $grid-gutter-width; 6 | } 7 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_profile_form.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../node_modules/bootstrap/scss/functions"; 2 | @import "../../../../node_modules/bootstrap/scss/variables"; 3 | 4 | // TODO: Refactor this. Instead of writing specific CSS rules for particular objects, 5 | // we should provide utility classes which can provide the desired style to this object 6 | .org-logo-controls { 7 | display: inline-block; 8 | margin-left: calc($grid-gutter-width / 2); 9 | input { display: inline-block; } 10 | strong { margin: 0 10px; } 11 | } 12 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_progress.scss: -------------------------------------------------------------------------------- 1 | .progress { 2 | border-radius: 0px; 3 | } 4 | 5 | .progress-bar { 6 | position: relative; 7 | } 8 | 9 | .progress-bar div { 10 | float: left; 11 | z-index: 99; 12 | color: #000; 13 | padding-left: 4px; 14 | } 15 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_question_container.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | .question_container { 3 | 4 | dl.dl-horizontal { 5 | padding-right: 10px; 6 | border-right: 1px solid $color-black; 7 | } 8 | .fa-plus, .fa-minus { 9 | font-size: 1.6rem; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_rda.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | 3 | .remove-standard { 4 | border: none; 5 | background: none; 6 | } 7 | 8 | .browse-standards-border { 9 | border: 1px solid $color-border-default; 10 | border-radius: 0px; 11 | padding: 10px 10px 5px 10px; 12 | margin-bottom:10px; 13 | overflow-y: scroll; 14 | max-height: 300px; 15 | width: 100%; 16 | } 17 | 18 | .rda_metadata .form-control { 19 | width: auto; 20 | } 21 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_readonly_textarea.scss: -------------------------------------------------------------------------------- 1 | /* For display of readonly textarea content without the TinyMCE editor */ 2 | .display-readonly-textarea-content { 3 | // Replicating some TinyMCE styling of textarea 4 | overflow: visible; 5 | padding-left: 1px; 6 | padding-right: 1px; 7 | padding-bottom: 10px; 8 | 9 | // Ensure table borders are not lost 10 | table { 11 | td { 12 | border: 1px solid black; 13 | } 14 | 15 | td, tr { 16 | padding: 10px; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_selectpicker.scss: -------------------------------------------------------------------------------- 1 | .bootstrap-select { 2 | border: 1px solid #D3D3D3; 3 | } 4 | 5 | 6 | .btn.dropdown-toggle:hover, .btn.dropdown-toggle:focus { 7 | color: black; 8 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_spinner.scss: -------------------------------------------------------------------------------- 1 | 2 | .spinner-border { 3 | animation: spinner-border 1.5s linear infinite !important; 4 | position: fixed !important; 5 | top: 48% !important; 6 | left: 43% !important; 7 | width: 2rem !important; 8 | height: 2rem !important; 9 | } 10 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_statuses.scss: -------------------------------------------------------------------------------- 1 | .status { 2 | display: block; 3 | float: left; 4 | clear: left; 5 | margin-bottom: 10px; 6 | } 7 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_template_filters.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | @import "../../../../node_modules/bootstrap/scss/functions"; 3 | @import "../../../../node_modules/bootstrap/scss/variables"; 4 | 5 | .template-table-filters .navbar-nav > li > a { 6 | color: $color-secondary-text; 7 | padding: 5px calc($grid-gutter-width / 2) 5px 5px; 8 | } 9 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_tinymce_content.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | 3 | .mce-content-body { 4 | 5 | a { 6 | color: $color-link-text; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_tooltips.scss: -------------------------------------------------------------------------------- 1 | .tooltip-inner { 2 | min-width: 320px; 3 | max-width: 100%; 4 | text-align: left; 5 | } 6 | 7 | @media (max-width: 320px) { 8 | .tooltip-inner { 9 | min-width: initial; 10 | max-width: 120px; 11 | text-align: left; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_ui_sortable_handle.scss: -------------------------------------------------------------------------------- 1 | .ui-sortable-handle{ 2 | margin-right: 10px; 3 | } 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/blocks/_usage.scss: -------------------------------------------------------------------------------- 1 | .single-char-input { 2 | display: inline; 3 | width: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/stylesheets/utils/.gitkeep -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/README.md: -------------------------------------------------------------------------------- 1 | # CSS Utils 2 | 3 | Use this directory to define utility classes for use throughout the app. Examples of utilities include: 4 | 5 | ``` css 6 | .font-large { 7 | font-size: 2rem; 8 | } 9 | 10 | .red { 11 | color: $color-text-red; 12 | } 13 | 14 | .border-bottom { 15 | border-bottom: thin solid $color-border-default; 16 | } 17 | ``` 18 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_backgrounds.scss: -------------------------------------------------------------------------------- 1 | [class^="bg-"] { 2 | padding: 15px; 3 | } 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_bordered.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | /* ADD a BORDER */ 3 | .bordered { 4 | border: 1px solid $color-border-default; 5 | padding: 5px 20px 15px 20px; 6 | } 7 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_break_words.scss: -------------------------------------------------------------------------------- 1 | .allow-break-words { 2 | overflow-wrap: break-word; 3 | width: 100%; 4 | } 5 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_colours.scss: -------------------------------------------------------------------------------- 1 | @use '../variables/colours' as *; 2 | .red { 3 | color: $color-text-red; 4 | } 5 | 6 | //default colour used on headings 7 | .color-heading-text{ 8 | color: $color-heading-text; 9 | } 10 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_font_size.scss: -------------------------------------------------------------------------------- 1 | 2 | //similar font size as an h2 tag 3 | .fontsize-h2{ 4 | font-size: 24 px; 5 | 6 | } 7 | 8 | //similar font size as an h3 tag 9 | .fontsize-h3{ 10 | font-size: 18.72 px; 11 | 12 | } 13 | 14 | //similar font size as an h4 tag 15 | .fontsize-h4{ 16 | font-size: 16 px; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_functions.scss: -------------------------------------------------------------------------------- 1 | @function str-replace($string, $search, $replace: '') { 2 | $index: str-index($string, $search); 3 | 4 | @if $index { 5 | @return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); 6 | } 7 | 8 | @return $string; 9 | } 10 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_icons.scss: -------------------------------------------------------------------------------- 1 | /* See `.combobox-clear-button` for an example of this mixin in use */ 2 | @mixin icon($icon) { 3 | @extend .fa; 4 | @extend .fa-#{$icon}:before; 5 | } 6 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_index.scss: -------------------------------------------------------------------------------- 1 | @use 'backgrounds'; 2 | @use 'bordered'; 3 | @use 'break_words'; 4 | @use 'colours'; 5 | @use 'font_size'; 6 | @use 'icons'; 7 | @use 'margins'; 8 | @use 'functions'; 9 | -------------------------------------------------------------------------------- /app/assets/stylesheets/utils/_margins.scss: -------------------------------------------------------------------------------- 1 | .mb-5 { 2 | margin-bottom: 5px; 3 | } 4 | .mb-10 { 5 | margin-bottom: 10px; 6 | } 7 | .mt-5 { 8 | margin-top: 5px; 9 | } 10 | .mt-10 { 11 | margin-top: 10px; 12 | } 13 | .mt-20 { 14 | margin-top: 20px; 15 | } 16 | -------------------------------------------------------------------------------- /app/assets/stylesheets/variables/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/stylesheets/variables/.gitkeep -------------------------------------------------------------------------------- /app/assets/stylesheets/variables/README.md: -------------------------------------------------------------------------------- 1 | # CSS Variables 2 | 3 | Use this directory to define all of the variable attributes that are referenced within all SCSS files. 4 | 5 | Variables should, where practicable, follow the naming convention `$[type]-[context]-[value]`. For example: 6 | 7 | ``` css 8 | $color-text-red: #FF2222; 9 | $color-border-silver: #DDDDDD; 10 | $font-size-large: 3rem; 11 | ``` 12 | -------------------------------------------------------------------------------- /app/assets/stylesheets/variables/_bold.scss: -------------------------------------------------------------------------------- 1 | .bold { 2 | font-weight: bold; 3 | } -------------------------------------------------------------------------------- /app/assets/stylesheets/variables/_index.scss: -------------------------------------------------------------------------------- 1 | @forward 'bold'; 2 | @forward 'bootstrap'; 3 | @forward 'colours'; 4 | @forward 'site_overrides'; 5 | @forward 'tinymce'; 6 | @forward 'typography'; 7 | -------------------------------------------------------------------------------- /app/assets/stylesheets/variables/_site_overrides.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/stylesheets/variables/_site_overrides.scss -------------------------------------------------------------------------------- /app/assets/stylesheets/variables/_tinymce.scss: -------------------------------------------------------------------------------- 1 | // Import the desired TinyMCE skin name 2 | //@import "lightgray/skin.min"; 3 | -------------------------------------------------------------------------------- /app/assets/stylesheets/variables/_typography.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'GillSansLight'; 3 | src: url(asset-path('GillSans-Light.ttf')) format("truetype"); 4 | font-weight: normal; 5 | } 6 | 7 | // Chosen for Accessibility 8 | $font-family: Verdana, Trebuchet, "Helvetica Neue", Helvetica, Arial, sans-serif; 9 | -------------------------------------------------------------------------------- /app/assets/vendor/jquery-ui/datepicker/images/ui-icons_444444_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/vendor/jquery-ui/datepicker/images/ui-icons_444444_256x240.png -------------------------------------------------------------------------------- /app/assets/videos/index.files/html5video/.htaccess: -------------------------------------------------------------------------------- 1 | AddType video/ogg .ogv 2 | AddType video/mp4 .mp4 3 | AddType video/mp4 .m4v 4 | AddType video/webm .webm 5 | SetEnvIfNoCase Request_URI \.(ogv|mp4|m4v|webm)$ no-gzip dont-vary 6 | -------------------------------------------------------------------------------- /app/assets/videos/index.files/html5video/flashfox.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/videos/index.files/html5video/flashfox.swf -------------------------------------------------------------------------------- /app/assets/videos/index.files/html5video/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/videos/index.files/html5video/fullscreen.png -------------------------------------------------------------------------------- /app/assets/videos/index.files/html5video/screencast.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/videos/index.files/html5video/screencast.jpg -------------------------------------------------------------------------------- /app/assets/videos/index.files/html5video/screencast.m4v: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/videos/index.files/html5video/screencast.m4v -------------------------------------------------------------------------------- /app/assets/videos/index.files/html5video/screencast.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/videos/index.files/html5video/screencast.mp4 -------------------------------------------------------------------------------- /app/assets/videos/index.files/html5video/screencast.ogv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/videos/index.files/html5video/screencast.ogv -------------------------------------------------------------------------------- /app/assets/videos/index.files/html5video/screencast.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/assets/videos/index.files/html5video/screencast.webm -------------------------------------------------------------------------------- /app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module ApplicationCable 4 | class Channel < ActionCable::Channel::Base 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module ApplicationCable 4 | class Connection < ActionCable::Connection::Base 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/controllers/concerns/allowed_question_formats.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Controller that gets Questions types that allow multiple selections 4 | # TODO: this could likely just live on the model! 5 | module AllowedQuestionFormats 6 | private 7 | 8 | # The QuestionFormat "Multi select box" is no longer being used for new templates 9 | def allowed_question_formats 10 | QuestionFormat.where.not(title: 'Multi select box').order(:title) 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/controllers/concerns/template_methods.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # This module holds helper controller methods for controllers that deal with Templates 4 | module TemplateMethods 5 | private 6 | 7 | def template_type(template) 8 | template.customization_of.present? ? _('customisation') : _('template') 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/controllers/paginable/notifications_controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Paginable 4 | # Controller for paginating/sorting/searching the notifications table 5 | class NotificationsController < ApplicationController 6 | include Paginable 7 | 8 | # /paginable/notifications/index/:page 9 | def index 10 | authorize(Notification) 11 | paginable_renderise(partial: 'index', scope: Notification.all, format: :json) 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/controllers/paginable/themes_controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Paginable 4 | # Controller for paginating/sorting/searching the themes table 5 | class ThemesController < ApplicationController 6 | include Paginable 7 | 8 | # /paginable/themes/index/:page 9 | def index 10 | authorize(Theme) 11 | paginable_renderise(partial: 'index', scope: Theme.all, format: :json) 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/controllers/question_formats_controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Controller that handles the RDA Metadata question type 4 | class QuestionFormatsController < ApplicationController 5 | # do we need authorizaton on this? it will only return the URL for the rda api 6 | # down the line we will add more methods for other external api's 7 | def rda_api_address 8 | render json: { 9 | url: QuestionFormat.rda_metadata.first.description 10 | }.to_json 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/controllers/session_locales_controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Controller that handles a language change 4 | class SessionLocalesController < ApplicationController 5 | def update 6 | session[:locale] = params[:locale] if available_locales.include?(params[:locale].intern) 7 | redirect_back(fallback_location: root_path) 8 | end 9 | 10 | private 11 | 12 | def available_locales 13 | I18n.available_locales 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/controllers/settings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Controller for the user email preferences 4 | module Settings 5 | class SettingsController < ApplicationController 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/controllers/static_pages_controller.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Controller that handles requests for static pages 4 | class StaticPagesController < ApplicationController 5 | def about_us; end 6 | 7 | def contact_us; end 8 | 9 | def privacy; end 10 | 11 | def termsuse; end 12 | 13 | def help; end 14 | end 15 | -------------------------------------------------------------------------------- /app/helpers/languages_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Helper methods for Languages 4 | module LanguagesHelper 5 | def languages 6 | Rails.cache.fetch('languages', expires_in: 1.hour) { Language.sorted_by_abbreviation } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/helpers/notifications_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Helper methods for Global notifications and Flash messages 4 | module NotificationsHelper 5 | # FA html class depending on Notification level 6 | # 7 | # Returns String 8 | def fa_classes(notification) 9 | case notification.level 10 | when 'warning' 11 | 'fa-circle-exclamation' 12 | when 'danger' 13 | 'fa-circle-xmark' 14 | else 15 | 'fa-circle-info' 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/helpers/paginable_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Helper methods for Paginable tables 4 | module PaginableHelper 5 | include Paginable 6 | end 7 | -------------------------------------------------------------------------------- /app/javascript/channels/consumer.js: -------------------------------------------------------------------------------- 1 | // By default, ActionCable channels use the App.cable consumer created in the 2 | // app/assets/javascripts/cable.js file. To avoid polluting the global namespace 3 | // we use webpack’s module system to provide a consumer for our channels. 4 | import { createConsumer } from '@rails/actioncable'; 5 | 6 | export default createConsumer(); 7 | -------------------------------------------------------------------------------- /app/javascript/channels/example_channel.js: -------------------------------------------------------------------------------- 1 | // This is an example of an ActionCable channel. All channel files should live 2 | // in this directory. Delete this after uncommenting the `require('channels');` 3 | // line in packs/application.js 4 | 5 | import consumer from './consumer'; 6 | 7 | consumer.subscriptions.create('ChatChannel', { 8 | // Do some exciting stuff! 9 | }); 10 | -------------------------------------------------------------------------------- /app/javascript/channels/index.js: -------------------------------------------------------------------------------- 1 | // This will automatically load any file with a name ending in _channel.js within 2 | // the app/javascript/channels/ directory and all of its subdirectories. 3 | const channels = require.context('.', true, /_channel\.js$/); 4 | channels.keys().forEach(channels); 5 | -------------------------------------------------------------------------------- /app/javascript/src/contributors/form.js: -------------------------------------------------------------------------------- 1 | import { initAutocomplete, scrubOrgSelectionParamsOnSubmit } from '../utils/autoComplete'; 2 | 3 | $(() => { 4 | initAutocomplete('#contributor-org-controls .autocomplete'); 5 | // Scrub out the large arrays of data used for the Org Selector JS so that they 6 | // are not a part of the form submissiomn 7 | scrubOrgSelectionParamsOnSubmit('#new_contributor'); 8 | scrubOrgSelectionParamsOnSubmit('form.edit_contributor'); 9 | }); 10 | -------------------------------------------------------------------------------- /app/javascript/src/devise/invitations/edit.js: -------------------------------------------------------------------------------- 1 | import { initAutocomplete, scrubOrgSelectionParamsOnSubmit } from '../../utils/autoComplete'; 2 | 3 | $(() => { 4 | initAutocomplete('#invite-org-controls .autocomplete'); 5 | // Scrub out the large arrays of data used for the Org Selector JS so that they 6 | // are not a part of the form submissiomn 7 | scrubOrgSelectionParamsOnSubmit('#invitation_create_account_form'); 8 | }); 9 | -------------------------------------------------------------------------------- /app/javascript/src/devise/passwords/edit.js: -------------------------------------------------------------------------------- 1 | import { addMatchingPasswordValidator, togglisePasswords } from '../../utils/passwordHelper'; 2 | 3 | $(() => { 4 | addMatchingPasswordValidator({ selector: '#user_reset_password_form' }); 5 | togglisePasswords({ selector: '#user_reset_password_form' }); 6 | }); 7 | -------------------------------------------------------------------------------- /app/javascript/src/devise/registrations/new.js: -------------------------------------------------------------------------------- 1 | import { initAutocomplete, scrubOrgSelectionParamsOnSubmit } from '../../utils/autoComplete'; 2 | 3 | $(() => { 4 | // Org selector on the /users/sign_up page that loads after a user 5 | // signs in via institutional credentials but has no matching user record 6 | initAutocomplete('#create-account-org-controls .autocomplete'); 7 | // Scrub out the large arrays of data used for the Org Selector JS so that they 8 | // are not a part of the form submissiomn 9 | scrubOrgSelectionParamsOnSubmit('#create_account_form'); 10 | }); 11 | -------------------------------------------------------------------------------- /app/javascript/src/guidances/newEdit.js: -------------------------------------------------------------------------------- 1 | import { Tinymce } from '../utils/tinymce.js'; 2 | 3 | $(() => { 4 | Tinymce.init({ selector: '#guidance_text' }); 5 | }); 6 | -------------------------------------------------------------------------------- /app/javascript/src/orgAdmin/phases/preview.js: -------------------------------------------------------------------------------- 1 | $(() => { 2 | $('.preview-tab').click((e) => { 3 | e.preventDefault(); 4 | }); 5 | }); 6 | -------------------------------------------------------------------------------- /app/javascript/src/orgAdmin/sections/index.js: -------------------------------------------------------------------------------- 1 | $(() => { 2 | $('.section_new_link').on('click', (e) => { 3 | $(e.target).hide(); 4 | $(e.target).closest('.row').find('.section_new').show(); 5 | }); 6 | }); 7 | -------------------------------------------------------------------------------- /app/javascript/src/orgs/shibbolethDs.js: -------------------------------------------------------------------------------- 1 | import getConstant from '../utils/constants'; 2 | 3 | $(() => { 4 | $('#show_list').click((e) => { 5 | e.preventDefault(); 6 | if ($('#full_list').is('.hidden')) { 7 | $('#full_list').removeClass('hidden').attr('aria-hidden', 'false'); 8 | $(e.currentTarget).html(getConstant('SHIBBOLETH_DISCOVERY_SERVICE_HIDE_LIST')); 9 | } else { 10 | $('#full_list').addClass('hidden').attr('aria-hidden', 'true'); 11 | $(e.currentTarget).html(getConstant('SHIBBOLETH_DISCOVERY_SERVICE_SHOW_LIST')); 12 | } 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /app/javascript/src/publicTemplates/show.js: -------------------------------------------------------------------------------- 1 | $(() => { 2 | $('body').on('click', '.copy-link', (e) => { 3 | const link = $(e.currentTarget).siblings('.direct-link'); 4 | $('#link').val(link.attr('href')); 5 | $('#link-modal').show(); 6 | }); 7 | 8 | $('body').on('click', '#copy-link-btn', () => { 9 | $('#link').select(); 10 | // eslint-disable-next-line 11 | document.execCommand('copy'); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /app/javascript/src/shared/createAccountForm.js: -------------------------------------------------------------------------------- 1 | import { initAutocomplete, scrubOrgSelectionParamsOnSubmit } from '../utils/autoComplete'; 2 | import { togglisePasswords } from '../utils/passwordHelper'; 3 | 4 | $(() => { 5 | initAutocomplete('#create-account-org-controls .autocomplete'); 6 | // Scrub out the large arrays of data used for the Org Selector JS so that they 7 | // are not a part of the form submissiomn 8 | scrubOrgSelectionParamsOnSubmit('#create_account_form'); 9 | togglisePasswords({ selector: '#create_account_form' }); 10 | }); 11 | -------------------------------------------------------------------------------- /app/javascript/src/superAdmin/apiClients/form.js: -------------------------------------------------------------------------------- 1 | import { initAutocomplete } from '../../utils/autoComplete'; 2 | 3 | $(() => { 4 | if ($('#api-client-org-controls').length > 0) { 5 | initAutocomplete('#api-client-org-controls .autocomplete'); 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /app/javascript/src/superAdmin/themes/newEdit.js: -------------------------------------------------------------------------------- 1 | import { Tinymce } from '../../utils/tinymce.js'; 2 | 3 | $(() => { 4 | Tinymce.init({ selector: '#theme_description' }); 5 | }); 6 | -------------------------------------------------------------------------------- /app/javascript/src/utils/array.js: -------------------------------------------------------------------------------- 1 | import { isFunction } from './isType'; 2 | 3 | if (!Array.prototype.find) { 4 | Array.prototype.find = function (predicate) { // eslint-disable-line no-extend-native, func-names 5 | if (!isFunction(predicate)) { 6 | throw new TypeError('predicate must be a function'); 7 | } 8 | const array = Object(this); 9 | let i = 0; 10 | while (i < array.length) { 11 | if (predicate.call(this, array[i], i, array)) { 12 | return array[i]; 13 | } 14 | i += 1; 15 | } 16 | return undefined; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /app/javascript/src/utils/constants.js: -------------------------------------------------------------------------------- 1 | import { isObject, isString } from './isType'; 2 | 3 | let constants = {}; 4 | export default (key) => constants[key]; 5 | $(() => { 6 | // js-constants is defined in views/layouts/application.html.erb 7 | const target = $('#js-constants'); 8 | if (isObject(target) && isString(target.val())) { 9 | constants = JSON.parse(target.val()); 10 | } 11 | }); 12 | -------------------------------------------------------------------------------- /app/javascript/src/utils/datePicker.js: -------------------------------------------------------------------------------- 1 | import 'jquery-ui/ui/widgets/datepicker'; 2 | 3 | /* 4 | * Date picker polyfill: 5 | * Wire up the JQuery UI DatePicker if the browser does not support the HTML5 date 6 | */ 7 | export default () => { 8 | if ($('[type="date"]').prop('type') !== 'date') { 9 | $('[type="date"]').datepicker({ 10 | dateFormat: 'yy-mm-dd', 11 | constrainInput: true, 12 | navigationAsDateFormat: true, 13 | goToCurrent: true, 14 | }); 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /app/javascript/src/utils/panelHeading.js: -------------------------------------------------------------------------------- 1 | $(() => { 2 | $('body').on('click', '.heading-button', (e) => { 3 | $(e.currentTarget) 4 | .find('i.fa-plus, i.fa-minus') 5 | .toggleClass('fa-plus') 6 | .toggleClass('fa-minus'); 7 | }); 8 | }); 9 | -------------------------------------------------------------------------------- /app/javascript/src/utils/tabHelper.js: -------------------------------------------------------------------------------- 1 | /* eslint-env browser */ // This allows us to reference 'window' below 2 | 3 | $(() => { 4 | // If the URL contains a tab reference then show that tab 5 | const loc = window.location.hash; 6 | if (loc) { 7 | $(`ul.nav a[href="${loc}"]`).tab('show'); 8 | } 9 | $('ul.nav a[data-toggle="tab"]').click((e) => { 10 | const target = $(e.target); 11 | $(target).tab('show'); 12 | // Commented out because was causing screen to jump 13 | // window.location.hash = $(target).attr('href'); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ApplicationJob < ActiveJob::Base 4 | end 5 | -------------------------------------------------------------------------------- /app/mailers/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/app/mailers/.gitkeep -------------------------------------------------------------------------------- /app/models/concerns/json_link_validator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Module that helps validate Template and Org links 4 | module JsonLinkValidator 5 | # Validates whether or not the value passed is conforming to 6 | # [{ link: String, text: String}, ...] 7 | def valid_links?(value) 8 | if value.is_a?(Array) 9 | r = value.all? do |o| 10 | o.is_a?(Hash) && o.key?('link') && o.key?('text') && 11 | o['link'].is_a?(String) && o['text'].is_a?(String) 12 | end 13 | return r 14 | end 15 | false 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/models/concerns/validation_values.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # module that provides default validation values 4 | module ValidationValues 5 | BOOLEAN_VALUES = [true, false].freeze 6 | end 7 | -------------------------------------------------------------------------------- /app/models/concerns/versionable_model.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Module that allows a Model to be versioned 4 | module VersionableModel 5 | extend ActiveSupport::Concern 6 | 7 | included do 8 | extend UniqueRandom 9 | 10 | attr_readonly :versionable_id 11 | 12 | attribute :versionable_id, 13 | :string, 14 | default: lambda { 15 | unique_uuid(field_name: 'versionable_id') 16 | } 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/models/research_project.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Object that represents a grant 4 | ResearchProject = Struct.new(:grant_id, :description) do 5 | def to_json(_val = nil) 6 | { grant_id: grant_id, description: description }.to_json 7 | end 8 | 9 | def id 10 | object_id 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/tracker.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Object that represents a Google Analytics tracker code 4 | class Tracker < ApplicationRecord 5 | belongs_to :org 6 | validates :code, format: { with: /\A\z|\AUA-[0-9]+-[0-9]+\z/, 7 | message: 'wrong format' } 8 | end 9 | -------------------------------------------------------------------------------- /app/policies/answer_policy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Security rules for answering questions 4 | # Note the method names here correspond with controller actions 5 | class AnswerPolicy < ApplicationPolicy 6 | # NOTE: @user is the signed_in_user and @record is an instance of Answer 7 | 8 | def create_or_update? 9 | # TODO: Remove the owner check after the Roles have been updated 10 | # is the plan editable by the user or the user is the owner of the plan 11 | @record.plan.editable_by?(@user.id) || @user == @record.plan.owner 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/policies/identifier_policy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Security rules for un-associating a user from their Shib or ORCID 4 | # Note the method names here correspond with controller actions 5 | class IdentifierPolicy < ApplicationPolicy 6 | # NOTE: @user is the signed_in_user 7 | 8 | def destroy? 9 | !@user.nil? 10 | end 11 | 12 | # Returns the identifiers for the user 13 | class Scope < Scope 14 | def resolve 15 | @scope.where(user_id: @user.id) 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/policies/paginable/plan_policy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Paginable 4 | # Security rules for plan tables 5 | class PlanPolicy < ApplicationPolicy 6 | # NOTE: @user is the signed_in_user 7 | 8 | def privately_visible? 9 | @user.is_a?(User) 10 | end 11 | 12 | def organisationally_or_publicly_visible? 13 | @user.is_a?(User) 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/policies/settings/plan_policy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Settings 4 | # Security rules plan export settings 5 | class PlanPolicy < ApplicationPolicy 6 | # NOTE: @user is the signed_in_user and @record is an instance of Plan 7 | 8 | def show? 9 | @record.readable_by(@user.id) 10 | end 11 | 12 | def update? 13 | @record.editable_by(@user.id) 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/policies/settings/project_policy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Settings 4 | # Security rules project export settings 5 | class ProjectPolicy < ApplicationPolicy 6 | # this is the policy for app/controllers/settings/projects_controller.rb 7 | # for this controller, we allow all actions as the "settings" object 8 | # is curated by rails based on user, not on a passed param 9 | def show? 10 | true 11 | end 12 | 13 | def update? 14 | true 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/policies/token_permission_type_policy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Security rules for viewing API V0 token permission types 4 | # Note the method names here correspond with controller actions 5 | class TokenPermissionTypePolicy < ApplicationPolicy 6 | # NOTE: @user is the signed_in_user 7 | 8 | def index? 9 | @user.can_use_api? && @user.org.token_permission_types.count.positive? 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/presenters/api/v1/api_presenter.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Api 4 | module V1 5 | # Generic helper methods for API V1 6 | class ApiPresenter 7 | class << self 8 | def boolean_to_yes_no_unknown(value:) 9 | return 'unknown' unless value.present? 10 | 11 | value ? 'yes' : 'no' 12 | end 13 | end 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/presenters/api/v1/org_presenter.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Api 4 | module V1 5 | # Helper class for the API V1 affiliation sections 6 | class OrgPresenter 7 | class << self 8 | def affiliation_id(identifiers:) 9 | ident = identifiers.find { |id| id.identifier_scheme&.name == 'ror' } 10 | return ident if ident.present? 11 | 12 | identifiers.find { |id| id.identifier_scheme&.name == 'fundref' } 13 | end 14 | end 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /app/scrubbers/table_free_scrubber.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Logic that ensures that table tags are allowed from TinyMCE editor results 4 | class TableFreeScrubber < Rails::Html::PermitScrubber 5 | TABLE_TAGS = %w[table thead tbody tr td th tfoot caption].freeze 6 | 7 | ALLOWED_TAGS = Rails.application.config.action_view.sanitized_allowed_tags - TABLE_TAGS 8 | 9 | def initialize 10 | super 11 | self.tags = ALLOWED_TAGS 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/services/application_service.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Generic methods used throughout the site 4 | class ApplicationService 5 | class << self 6 | # Returns either the name specified in dmproadmap.rb initializer or 7 | # the Rails application name 8 | def application_name 9 | default = Rails.application.class.name.split('::').first 10 | Rails.configuration.x.application.fetch(:name, default) 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/validators/email_validator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Validation for email format 4 | class EmailValidator < ActiveModel::EachValidator 5 | def validate_each(record, attribute, value) 6 | return if value&.match?(/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i) 7 | 8 | record.errors.add(attribute, options.fetch(:message, 'is not a valid email address')) 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/validators/url_validator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Validation for URL format 4 | class UrlValidator < ActiveModel::EachValidator 5 | def validate_each(record, attribute, value) 6 | reg = %r{https?://[-a-zA-Z0-9@:%_+.~#?&/=]{2,256}\.[a-z]{2,4}\b(/[-a-zA-Z0-9@:%_+.~#?&/=]*)?} 7 | return unless value&.match?(reg) 8 | 9 | record.errors.add(attribute, options.fetch(:message, 'is not a valid URL')) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/api/v0/departments/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.prettify! 4 | 5 | json.array! @departments.each do |department| 6 | json.code department.code 7 | json.name department.name 8 | json.id department.id 9 | end 10 | -------------------------------------------------------------------------------- /app/views/api/v0/departments/users.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.prettify! 4 | 5 | json.array! @users.group_by(&:department).each do |department, users| 6 | json.code department&.code 7 | json.name department&.name 8 | json.id department&.id 9 | json.users users.each do |u| 10 | json.email u.email 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/views/api/v0/plans/create.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # builds a json response to a successful project createtion 4 | 5 | json.prettify! 6 | 7 | json.plan do 8 | json.title @plan.title 9 | json.template @plan.template.title 10 | # TODO: add after decision on user creation/identification 11 | json.created_by @plan.owner.email 12 | json.id @plan.id 13 | json.created_at @plan.created_at 14 | end 15 | -------------------------------------------------------------------------------- /app/views/api/v0/plans/show.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # builds a json response to a successful project createtion 4 | 5 | json.prettify! 6 | 7 | json.project do 8 | json.title @project.title 9 | # TODO: add after decision on user creation/identification 10 | json.created_by @project.owner.email 11 | json.id @project.id 12 | json.created_at @project.created_at 13 | json.template @project.template.title 14 | end 15 | -------------------------------------------------------------------------------- /app/views/api/v0/statistics/plans_by_template.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.prettify! 4 | 5 | json.templates @templates.each do |_template, info| 6 | json.template_name info[:title] 7 | json.template_id info[:id] 8 | json.template_uses info[:uses] 9 | end 10 | -------------------------------------------------------------------------------- /app/views/api/v0/statistics/users_joined.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.prettify! 4 | 5 | json.users_joined @users_count 6 | -------------------------------------------------------------------------------- /app/views/api/v0/statistics/using_template.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.prettify! 4 | 5 | json.templates @templates.each do |_template, info| 6 | json.template_name info[:title] 7 | json.template_id info[:id] 8 | json.template_uses info[:uses] 9 | end 10 | -------------------------------------------------------------------------------- /app/views/api/v1/error.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.partial! 'api/v1/standard_response' 4 | 5 | json.items [] 6 | json.errors @payload[:errors] 7 | -------------------------------------------------------------------------------- /app/views/api/v1/heartbeat.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.partial! 'api/v1/standard_response' 4 | 5 | json.items [] 6 | -------------------------------------------------------------------------------- /app/views/api/v1/identifiers/_show.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # locals: identifier 4 | 5 | json.type identifier&.identifier_format 6 | json.identifier identifier&.value 7 | -------------------------------------------------------------------------------- /app/views/api/v1/orgs/_show.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # locals: org 4 | 5 | json.name org.name 6 | json.abbreviation org.abbreviation 7 | json.region org.region&.abbreviation 8 | 9 | if org.identifiers.any? 10 | json.affiliation_id do 11 | id = Api::V1::OrgPresenter.affiliation_id(identifiers: org.identifiers) 12 | json.partial! 'api/v1/identifiers/show', identifier: id 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/api/v1/plans/_cost.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # locals: cost 4 | 5 | json.title cost[:title] 6 | json.description cost[:description] 7 | json.currency_code cost[:currency_code] 8 | json.value cost[:value] 9 | -------------------------------------------------------------------------------- /app/views/api/v1/plans/_project.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # locals: plan 4 | 5 | json.title plan.title 6 | json.description plan.description 7 | 8 | start_date = plan.start_date || Time.now 9 | json.start start_date.to_formatted_s(:iso8601) 10 | 11 | end_date = plan.end_date || (Time.now + 2.years) 12 | json.end end_date&.to_formatted_s(:iso8601) 13 | 14 | if plan.funder.present? || plan.grant_id.present? 15 | json.funding [plan] do 16 | json.partial! 'api/v1/plans/funding', plan: plan 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/views/api/v1/plans/index.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.partial! 'api/v1/standard_response', total_items: @total_items 4 | 5 | json.items @items do |item| 6 | json.dmp do 7 | json.partial! 'api/v1/plans/show', plan: item 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/api/v1/token.json.jbuilder: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | json.prettify! 4 | json.ignore_nil! 5 | 6 | json.access_token @token 7 | json.token_type @token_type 8 | json.expires_in @expiration 9 | json.created_at Time.now.to_formatted_s(:iso8601) 10 | -------------------------------------------------------------------------------- /app/views/contact_us/contact_mailer/contact_email.html.erb: -------------------------------------------------------------------------------- 1 |
<%= @contact.message %>
2 |---------------------
3 |<%= ContactUs.require_name ? t('.sent_by_name', :email => @contact.email, :name => @contact.name) : t('.sent_by_contact_form', :email => @contact.email) %>
4 | -------------------------------------------------------------------------------- /app/views/contact_us/contact_mailer/contact_email.text.plain.erb: -------------------------------------------------------------------------------- 1 | <%= @contact.message %> 2 | 3 | ------------------------------------- 4 | <%= ContactUs.require_name ? t('.sent_by_name', :email => @contact.email, :name => @contact.name) : t('.sent_by_contact_form', :email => @contact.email) %> -------------------------------------------------------------------------------- /app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 | <% I18n.with_locale I18n.default_locale do %> 2 |<%= _("Welcome to %{application_name}") % {application_name: ApplicationService.application_name} %>, <%= @email %>!
3 | 4 |<%= _("Thank you for registering. Please confirm your email address") %>:
5 | 6 |<%= link_to _("Click here to confirm your account"), confirmation_url(@resource, :confirmation_token => @token) %> (<%= _("or copy") %> <%= confirmation_url(@resource, :confirmation_token => @token) %> <%= _("into your browser") %>).
7 | <% end %> 8 | -------------------------------------------------------------------------------- /app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 | <% I18n.with_locale I18n.default_locale do %> 2 |<%= _("Hello") %> <%= @resource.email %>!
3 | 4 |<%= _("Your") %> <%= link_to ApplicationService.application_name, root_url %> <%= _("account has been locked due to an excessive number of unsuccessful sign in attempts.") %>
5 | 6 |<%= _("Click the link below to unlock your account") %>:
7 | 8 |<%= link_to _("Unlock my account"), unlock_url(@resource, :unlock_token => @token) %>
9 | <% end %> 10 | -------------------------------------------------------------------------------- /app/views/home/index.html.erb: -------------------------------------------------------------------------------- 1 |<%= _('When you create a new phase for your template, a version will automatically be created. Once you complete the form below you will be provided with options to create sections and questions.') %>
3 | <%= form_for phase, { url: org_admin_template_phases_path(template), html: { class: 'phase_form' } } do |f| %> 4 | <%= render partial: 'org_admin/phases/form', locals: local_assigns.merge({ f: f }) %> 5 | <% end %> -------------------------------------------------------------------------------- /app/views/org_admin/phases/_overview.html.erb: -------------------------------------------------------------------------------- 1 |4 | <%= sanitize section.description %> 5 |
6 |<%= sanitize(result.description) %>
7 | 8 | <% website = result&.locations&.select { |loc| loc["type"] == "website" }&.first %> 9 | <% if website.present? %> 10 |11 | <%= _('There is no data available for plans created yet.') %> 12 |
13 | <% end %> 14 | -------------------------------------------------------------------------------- /app/views/usage/_template_statistics.html.erb: -------------------------------------------------------------------------------- 1 |<%=_('No. plans created based off your templates')%>
4 |11 | <%= _('There is no data available for users joined yet.') %> 12 |
13 | <% end %> 14 | -------------------------------------------------------------------------------- /app/views/user_mailer/feedback_complete.html.erb: -------------------------------------------------------------------------------- 1 |2 | <%= _('Hello %{recipient_name}') % { recipient_name: @recipient_name } %> 3 |
4 |5 | <%= _("%{commenter} has finished providing feedback on the plan \"%{link_html}\". Comments can be found in the 'Write plan' tab on the right side of the page (Guidance/Comments).").html_safe % { 6 | commenter: @requestor_name, 7 | link_html: link_to(@plan_name, edit_plan_url(@plan, phase_id: @phase.id)), 8 | tool_name: tool_name 9 | }%> 10 |
11 | 12 | <%= render partial: 'email_signature' %> 13 | -------------------------------------------------------------------------------- /app/views/user_mailer/permissions_change_notification.html.erb: -------------------------------------------------------------------------------- 1 |2 | <%= _('Hello %{recepientname}') %{ recepientname: @recepient.name } %> 3 |
4 |5 | <%= _('Your permissions relating to %{plan_title} have changed. You now have %{type} access. This means you can %{placeholder1} %{placeholder2}') % { 6 | plan_title: @plan_title, 7 | type: @messaging[:type], 8 | placeholder1: @messaging[:placeholder1], 9 | placeholder2: @messaging[:placeholder2] 10 | } %> 11 |
12 | <%= render partial: 'email_signature' %> 13 | -------------------------------------------------------------------------------- /app/views/user_mailer/plan_access_removed.html.erb: -------------------------------------------------------------------------------- 1 |2 | <%= _('Hello ') %><%= @user.email %>, 3 |
4 |5 | <%= _('Your access to ') %>"<%= @plan.title %>"<%= _(' has been removed by ') %><%= "#{@current_user.name(false)}"%>. 6 |
7 | 8 | <%= render partial: 'email_signature' %> 9 | -------------------------------------------------------------------------------- /app/views/user_mailer/question_answered.html.erb: -------------------------------------------------------------------------------- 1 |2 | <%= raw _('Hello %{recipient_name},') %{ recipient_name: @recipient_name } %> 3 |
4 |5 | <%= raw @username + _(" is creating a Data Management Plan and has answered ") + @answer_text + _(" to ") + @question_title + _(" in a plan called ") + @plan_title + _(" based on the template ") + @template_title %> 6 |
7 |8 | <%= raw @message %> 9 |
10 | <%= render partial: 'email_signature' %> 11 | -------------------------------------------------------------------------------- /app/views/users/_current_privileges.html.erb: -------------------------------------------------------------------------------- 1 | <%# locals: { user }%> 2 | <% if user.can_super_admin? %> 3 | <%= _("Super Admin") %> 4 | <% elsif user.can_org_admin? %> 5 | <%= _("Organisational Admin") %> 6 | <% end %> 7 | -------------------------------------------------------------------------------- /app/views/users/refresh_token.js.erb: -------------------------------------------------------------------------------- 1 | var msg = '<%= @success ? _("Successfully regenerate your API token.") : _("Unable to regenerate your API token.") %>'; 2 | 3 | var context = $('#api-token'); 4 | context.html('<%= escape_javascript(render partial: "/devise/registrations/api_token", locals: { user: current_user }) %>'); 5 | renderNotice(msg); 6 | toggleSpinner(false); 7 | -------------------------------------------------------------------------------- /bin/dev: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | if ! gem list foreman -i --silent; then 4 | echo "Installing foreman..." 5 | gem install foreman 6 | fi 7 | 8 | exec foreman start -f Procfile.dev "$@" 9 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | load File.expand_path("spring", __dir__) 8 | APP_PATH = File.expand_path('../config/application', __dir__) 9 | require_relative '../config/boot' 10 | require 'rails/commands' 11 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | begin 3 | load File.expand_path('../spring', __FILE__) 4 | rescue LoadError => e 5 | raise unless e.message.include?('spring') 6 | end 7 | load File.expand_path("spring", __dir__) 8 | require_relative '../config/boot' 9 | require 'rake' 10 | Rake.application.run 11 | -------------------------------------------------------------------------------- /bin/spring: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | # This file loads Spring without using loading other gems in the Gemfile, in order to be fast. 4 | # It gets overwritten when you run the `spring binstub` command. 5 | 6 | if !defined?(Spring) && [nil, 'development', 'test'].include?(ENV['RAILS_ENV']) 7 | require 'bundler' 8 | 9 | Bundler.locked_gems.specs.find { |spec| spec.name == 'spring' }&.tap do |spring| 10 | Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path 11 | gem 'spring', spring.version 12 | require 'spring/binstub' 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /bin/yarn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | APP_ROOT = File.expand_path('..', __dir__) 3 | Dir.chdir(APP_ROOT) do 4 | begin 5 | exec "yarnpkg", *ARGV 6 | rescue Errno::ENOENT 7 | $stderr.puts "Yarn executable was not detected in the system." 8 | $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" 9 | exit 1 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # This file is used by Rack-based servers to start the application. 4 | require File.expand_path("#{File.dirname(__FILE__)}/config/environment") 5 | 6 | map ENV.fetch('RAILS_RELATIVE_URL_ROOT', '/') do 7 | run DMPRoadmap::Application 8 | end 9 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 4 | 5 | require 'bundler/setup' # Set up gems listed in the Gemfile. 6 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 7 | -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: async 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: dmp_roadmap_production 11 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Load the Rails application. 4 | require_relative 'application' 5 | 6 | # Initialize the Rails application. 7 | Rails.application.initialize! 8 | -------------------------------------------------------------------------------- /config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | # ActiveSupport::Reloader.to_prepare do 6 | # ApplicationController.renderer.defaults.merge!( 7 | # http_host: 'example.org', 8 | # https: false 9 | # ) 10 | # end 11 | -------------------------------------------------------------------------------- /config/initializers/asset_url_processor.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # See : https://github.com/rails/cssbundling-rails/issues/22#issuecomment-923265626 4 | class AssetUrlProcessor 5 | def self.call(input) 6 | context = input[:environment].context_class.new(input) 7 | data = input[:data].gsub(/asset-url\(["']?(.+?)["']?\)/) do |_match| 8 | "url(#{context.asset_path(::Regexp.last_match(1))})" 9 | end 10 | { data: data } 11 | end 12 | end 13 | 14 | Sprockets.register_postprocessor "text/css", AssetUrlProcessor 15 | -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | # You can add backtrace silencers for libraries that you're using but don't 6 | # wish to see in your backtraces. 7 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 8 | 9 | # You can also remove all the silencers if you're trying to debug a problem 10 | # that might stem from framework code. 11 | # Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] 12 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | # Specify a serializer for the signed and encrypted cookie jars. 6 | # Valid options are :json, :marshal, and :hybrid. 7 | Rails.application.config.action_dispatch.cookies_serializer = :json 8 | -------------------------------------------------------------------------------- /config/initializers/external_apis/rdamsc.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Credentials for RDA Metadata Standards Catalog (RDAMSC) 4 | # To disable this feature, simply set 'active' to false 5 | Rails.configuration.x.rdamsc.landing_page_url = "http://rdamsc.bath.ac.uk" 6 | Rails.configuration.x.rdamsc.api_base_url = "https://rdamsc.bath.ac.uk/" 7 | Rails.configuration.x.rdamsc.schemes_path = "api2/m" 8 | Rails.configuration.x.rdamsc.thesaurus_path = "api2/thesaurus/concepts" 9 | Rails.configuration.x.rdamsc.active = true 10 | -------------------------------------------------------------------------------- /config/initializers/external_apis/re3data.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Credentials for minting DOIs via re3data 4 | # To disable this feature, simply set 'active' to false 5 | Rails.configuration.x.re3data.landing_page_url = "https://www.re3data.org/" 6 | Rails.configuration.x.re3data.api_base_url = "https://www.re3data.org/api/v1/" 7 | Rails.configuration.x.re3data.list_path = "repositories" 8 | Rails.configuration.x.re3data.repository_path = "repository/" 9 | Rails.configuration.x.re3data.active = true 10 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | # Configure sensitive parameters which will be filtered from the log file. 6 | # Rails.application.config.filter_parameters += [ 7 | # :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn 8 | # ] 9 | Rails.application.config.filter_parameters += [:password] 10 | -------------------------------------------------------------------------------- /config/initializers/kaminari_config.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Kaminari.configure do |config| 4 | config.default_per_page = Rails.configuration.x.results_per_page 5 | # config.max_per_page = nil 6 | # config.window = 4 7 | # config.outer_window = 0 8 | # config.left = 0 9 | # config.right = 0 10 | # config.page_method_name = :page 11 | # config.param_name = :page 12 | config.params_on_first_page = true 13 | end 14 | -------------------------------------------------------------------------------- /config/initializers/locale.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # This initilializer should not be removed unless all internationalisation is handled by 4 | # gettext_rails 5 | DMPRoadmap::Application.config.i18n.load_path += Dir[ 6 | Rails.root.join('config', 'locales', '**', '*.yml').to_s 7 | ] 8 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | # Add new mime types for use in respond_to blocks: 6 | # Mime::Type.register "text/richtext", :rtf 7 | -------------------------------------------------------------------------------- /config/initializers/permissions_policy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Define an application-wide HTTP permissions policy. For further 4 | # information see https://developers.google.com/web/updates/2018/06/feature-policy 5 | # 6 | # Rails.application.config.permissions_policy do |f| 7 | # f.camera :none 8 | # f.gyroscope :none 9 | # f.microphone :none 10 | # f.usb :none 11 | # f.fullscreen :self 12 | # f.payment :self, "https://secure.example.com" 13 | # end 14 | -------------------------------------------------------------------------------- /config/initializers/recaptcha.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'recaptcha/rails' 4 | 5 | # the keys are set in config/credentials.yml.env 6 | 7 | Recaptcha.configure do |config| 8 | config.site_key = Rails.application.credentials.recaptcha[:site_key] 9 | config.secret_key = Rails.application.credentials.recaptcha[:secret_key] 10 | config.proxy = 'http://someproxy.com:port' 11 | end 12 | -------------------------------------------------------------------------------- /config/initializers/session_store.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | Rails.application.config.session_store :cookie_store, key: '_dmp_roadmap_session', 6 | same_site: :lax 7 | -------------------------------------------------------------------------------- /config/initializers/wicked_pdf.rb.example: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module DMPRoadmap 4 | # WickedPDF gem configuration 5 | class Application < Rails::Application 6 | WickedPdf.configure do |c| 7 | c.exe_path = ENV.fetch('WICKED_PDF_PATH', '/usr/local/bin/wkhtmltopdf') 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /config/locale/de/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/de/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/domain.pot: -------------------------------------------------------------------------------- 1 | # Some descriptive title 2 | msgid "" 3 | msgstr "" -------------------------------------------------------------------------------- /config/locale/en/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/en/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/en_CA/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/en_CA/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/en_GB/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/en_GB/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/en_US/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/en_US/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/es/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/es/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/fi/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/fi/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/fr_CA/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/fr_CA/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/fr_FR/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/fr_FR/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/pt_BR/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/pt_BR/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/sv_FI/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/sv_FI/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locale/tr_TR/LC_MESSAGES/app.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/config/locale/tr_TR/LC_MESSAGES/app.mo -------------------------------------------------------------------------------- /config/locales/.translation_io: -------------------------------------------------------------------------------- 1 | # This file is used in the context of Translation.io source editions. 2 | # Please see: https://translation.io/blog/new-feature-copywriting 3 | # 4 | # If you have any git conflicts, either keep the smaller timestamp or 5 | # ignore the conflicts and "sync" again, it will fix this file for you. 6 | 7 | --- 8 | timestamp: 1744313316 9 | -------------------------------------------------------------------------------- /config/locales/bootstrap/en-GB.bootstrap.yml: -------------------------------------------------------------------------------- 1 | # Sample localization file for English. Add more files in this directory for other locales. 2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. 3 | 4 | en-GB: 5 | helpers: 6 | actions: "Actions" 7 | links: 8 | back: "Back" 9 | cancel: "Cancel" 10 | confirm: "Are you sure?" 11 | destroy: "Delete" 12 | new: "New" 13 | edit: "Edit" 14 | titles: 15 | edit: "Edit" 16 | save: "Save" 17 | new: "New" 18 | delete: "Delete" -------------------------------------------------------------------------------- /config/locales/bootstrap/en-US.bootstrap.yml: -------------------------------------------------------------------------------- 1 | # Sample localization file for English. Add more files in this directory for other locales. 2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. 3 | 4 | en-US: 5 | helpers: 6 | actions: "Actions" 7 | links: 8 | back: "Back" 9 | cancel: "Cancel" 10 | confirm: "Are you sure?" 11 | destroy: "Delete" 12 | new: "New" 13 | edit: "Edit" 14 | titles: 15 | edit: "Edit" 16 | save: "Save" 17 | new: "New" 18 | delete: "Delete" 19 | -------------------------------------------------------------------------------- /config/locales/bootstrap/es.bootstrap.yml: -------------------------------------------------------------------------------- 1 | # Sample localization file for English. Add more files in this directory for other locales. 2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. 3 | 4 | es: 5 | helpers: 6 | actions: "Acciones" 7 | links: 8 | back: "Volver" 9 | cancel: "Cancelar" 10 | confirm: "¿Está seguro?" 11 | destroy: "Borrar" 12 | new: "Nuevo" 13 | edit: "Editar" 14 | titles: 15 | edit: "Editar" 16 | save: "Guardar" 17 | new: "Nuevo" 18 | delete: "Borrar" 19 | -------------------------------------------------------------------------------- /config/locales/bootstrap/fr-FR.bootstrap.yml: -------------------------------------------------------------------------------- 1 | 2 | fr-FR: 3 | helpers: 4 | actions: "Actions" 5 | links: 6 | back: "Retour" 7 | cancel: "Annuler" 8 | confirm: "Êtes-vous sûr?" 9 | destroy: "Supprimer" 10 | new: "Nouveau" 11 | edit: "Modifier" 12 | titles: 13 | edit: "Modifier" 14 | save: "Enregistrer" 15 | new: "Nouveau" 16 | delete: "Supprimer" 17 | 18 | -------------------------------------------------------------------------------- /config/locales/bootstrap/fr.bootstrap.yml: -------------------------------------------------------------------------------- 1 | 2 | fr: 3 | helpers: 4 | actions: "Actions" 5 | links: 6 | back: "Retour" 7 | cancel: "Annuler" 8 | confirm: "Êtes-vous sûr?" 9 | destroy: "Supprimer" 10 | new: "Nouveau" 11 | edit: "Modifier" 12 | titles: 13 | edit: "Modifier" 14 | save: "Enregistrer" 15 | new: "Nouveau" 16 | delete: "Supprimer" 17 | 18 | -------------------------------------------------------------------------------- /config/locales/bootstrap/tr-TR.bootstrap.yml: -------------------------------------------------------------------------------- 1 | # Sample localization file for English. Add more files in this directory for other locales. 2 | # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. 3 | 4 | en-GB: 5 | helpers: 6 | actions: "Actions" 7 | links: 8 | back: "Back" 9 | cancel: "Cancel" 10 | confirm: "Are you sure?" 11 | destroy: "Delete" 12 | new: "New" 13 | edit: "Edit" 14 | titles: 15 | edit: "Edit" 16 | save: "Save" 17 | new: "New" 18 | delete: "Delete" -------------------------------------------------------------------------------- /config/routes_test.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Rails.application.routes.draw do 4 | # Define your test-specific routes here 5 | 6 | # This route will return an empty response with a 200 OK status code 7 | # when the browser requests the favicon.ico file. 8 | get '/favicon.ico', to: proc { |_env| [200, {}, ['']] } 9 | end 10 | -------------------------------------------------------------------------------- /config/spring.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Spring.watch( 4 | ".ruby-version", 5 | ".rbenv-vars", 6 | "tmp/restart.txt", 7 | "tmp/caching-dev.txt" 8 | ) 9 | -------------------------------------------------------------------------------- /config/webpack/loaders/erb.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | test: /\.erb$/, 3 | enforce: 'pre', 4 | exclude: /node_modules/, 5 | use: [{ 6 | loader: 'rails-erb-loader', 7 | options: { 8 | runner: `${(/^win/.test(process.platform) ? 'ruby ' : '')}bin/rails runner`, 9 | }, 10 | }], 11 | }; 12 | -------------------------------------------------------------------------------- /db/migrate/20130603140800_create_phases.rb: -------------------------------------------------------------------------------- 1 | class CreatePhases < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :phases do |t| 4 | t.string :title 5 | t.text :description 6 | t.integer :number 7 | t.references :dmptemplate 8 | 9 | t.timestamps 10 | end 11 | add_index :phases, :dmptemplate_id 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20130603143109_create_versions.rb: -------------------------------------------------------------------------------- 1 | class CreateVersions < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :versions do |t| 4 | t.string :title 5 | t.text :description 6 | t.integer :published 7 | t.integer :number 8 | t.references :phase 9 | 10 | t.timestamps 11 | end 12 | add_index :versions, :phase_id 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20130611111340_create_user_types.rb: -------------------------------------------------------------------------------- 1 | class CreateUserTypes < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :user_types do |t| 4 | t.string :user_type_name 5 | t.text :user_type_desc 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20130611111359_create_user_statuses.rb: -------------------------------------------------------------------------------- 1 | class CreateUserStatuses < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :user_statuses do |t| 4 | t.string :user_status_name 5 | t.text :user_status_desc 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20130611113325_create_organisation_types.rb: -------------------------------------------------------------------------------- 1 | class CreateOrganisationTypes < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :organisation_types do |t| 4 | t.string :org_type_name 5 | t.text :org_type_desc 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20130611132258_create_user_role_types.rb: -------------------------------------------------------------------------------- 1 | class CreateUserRoleTypes < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :user_role_types do |t| 4 | t.string :user_role_type_name 5 | t.text :user_role_type_desc 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20130611135155_create_answers.rb: -------------------------------------------------------------------------------- 1 | class CreateAnswers < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :answers do |t| 4 | t.text :answer_text 5 | t.integer :plan_id 6 | t.integer :user_id 7 | t.integer :question_id 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20130611135806_create_users.rb: -------------------------------------------------------------------------------- 1 | class CreateUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :users do |t| 4 | t.string :user_firstname 5 | t.string :user_surname 6 | t.string :user_email 7 | t.string :user_password 8 | t.string :user_orcid_id 9 | t.string :user_shibboleth_id 10 | t.integer :user_type_id 11 | t.integer :user_status_id 12 | t.integer :user_login_count 13 | t.datetime :user_last_login 14 | 15 | t.timestamps 16 | end 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /db/migrate/20130611140229_create_pages.rb: -------------------------------------------------------------------------------- 1 | class CreatePages < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :pages do |t| 4 | t.string :pag_title 5 | t.text :pag_body_text 6 | t.string :pag_slug 7 | t.integer :pag_menu 8 | t.integer :pag_menu_position 9 | t.string :pag_target_url 10 | t.string :pag_location 11 | t.boolean :pag_public 12 | t.integer :org_id 13 | 14 | t.timestamps 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20130611141026_create_projects.rb: -------------------------------------------------------------------------------- 1 | class CreateProjects < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :projects do |t| 4 | t.string :project_title 5 | t.text :project_note 6 | t.boolean :project_locked 7 | t.integer :dmptemplate_id 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20130611151644_create_plans.rb: -------------------------------------------------------------------------------- 1 | class CreatePlans < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :plans do |t| 4 | t.boolean :plan_locked 5 | t.integer :project_id 6 | t.integer :version_id 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20130611151704_create_plan_sections.rb: -------------------------------------------------------------------------------- 1 | class CreatePlanSections < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :plan_sections do |t| 4 | t.boolean :plan_section_edit 5 | t.datetime :plan_section_at 6 | t.integer :user_editing_id 7 | t.integer :section_id 8 | t.integer :plan_id 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20130611151729_create_project_groups.rb: -------------------------------------------------------------------------------- 1 | class CreateProjectGroups < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :project_groups do |t| 4 | t.boolean :project_creator 5 | t.boolean :project_editor 6 | t.integer :user_id 7 | t.integer :project_id 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20130611151750_create_project_partners.rb: -------------------------------------------------------------------------------- 1 | class CreateProjectPartners < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :project_partners do |t| 4 | t.integer :org_id 5 | t.integer :project_id 6 | t.boolean :leader_org 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20130611152208_create_user_org_roles.rb: -------------------------------------------------------------------------------- 1 | class CreateUserOrgRoles < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :user_org_roles do |t| 4 | t.integer :user_id 5 | t.integer :org_id 6 | t.integer :user_role_type_id 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20130611153828_create_dmptemplates.rb: -------------------------------------------------------------------------------- 1 | class CreateDmptemplates < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :dmptemplates do |t| 4 | t.string :template_title 5 | t.text :template_desc 6 | t.boolean :template_published 7 | t.integer :user_id 8 | t.integer :org_id 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20130611153921_create_sections.rb: -------------------------------------------------------------------------------- 1 | class CreateSections < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :sections do |t| 4 | t.string :section_title 5 | t.text :section_desc 6 | t.integer :section_order 7 | t.integer :version_id 8 | t.integer :org_id 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20130611154055_create_file_uploads.rb: -------------------------------------------------------------------------------- 1 | class CreateFileUploads < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :file_uploads do |t| 4 | t.string :file_upload_name 5 | t.string :file_upload_title 6 | t.text :file_upload_desc 7 | t.integer :file_upload_size 8 | t.boolean :file_upload_published 9 | t.string :file_upload_location 10 | t.integer :file_type_id 11 | 12 | t.timestamps 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20130611154109_create_file_types.rb: -------------------------------------------------------------------------------- 1 | class CreateFileTypes < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :file_types do |t| 4 | t.string :file_type_name 5 | t.string :icon_name 6 | t.integer :icon_size 7 | t.string :icon_location 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20130612133806_create_themes.rb: -------------------------------------------------------------------------------- 1 | class CreateThemes < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :themes do |t| 4 | t.string :theme_title 5 | t.text :theme_desc 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20130612133938_create_guidances.rb: -------------------------------------------------------------------------------- 1 | class CreateGuidances < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :guidances do |t| 4 | t.text :guidance_text 5 | t.integer :guidance_file_id 6 | t.integer :org_id 7 | t.integer :theme_id 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20130625125419_fix_question_theme_relation.rb: -------------------------------------------------------------------------------- 1 | class FixQuestionThemeRelation < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :questions_themes, :id => false do |t| 4 | t.references :question, :null => false 5 | t.references :theme, :null => false 6 | end 7 | 8 | add_index :questions_themes, [:question_id, :theme_id] 9 | end 10 | 11 | def self.down 12 | drop_table :questions_themes 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20130705113828_add_locale_to_themes.rb: -------------------------------------------------------------------------------- 1 | class AddLocaleToThemes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :themes, :locale, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130705145146_update_type_column_in_questions.rb: -------------------------------------------------------------------------------- 1 | class UpdateTypeColumnInQuestions < ActiveRecord::Migration[4.2] 2 | def change 3 | change_table :questions do |t| 4 | t.rename :type, :question_type 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20130705151214_add_locale_to_templates.rb: -------------------------------------------------------------------------------- 1 | class AddLocaleToTemplates < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :dmptemplates, :locale, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130717093801_add_slug_to_projects.rb: -------------------------------------------------------------------------------- 1 | class AddSlugToProjects < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :projects, :slug, :string 4 | add_index :projects, :slug, unique: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20130717093814_add_slug_to_phases.rb: -------------------------------------------------------------------------------- 1 | class AddSlugToPhases < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :phases, :slug, :string 4 | add_index :phases, :slug, unique: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20130717115239_add_slug_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddSlugToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :slug, :string 4 | add_index :plans, :slug, unique: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20130717125231_create_options.rb: -------------------------------------------------------------------------------- 1 | class CreateOptions < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :options do |t| 4 | t.references :question 5 | t.string :text 6 | t.integer :number 7 | t.boolean :is_default 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20130717125748_add_multiple_choice_and_multiple_permitted_and_is_expanded_to_questions.rb: -------------------------------------------------------------------------------- 1 | class AddMultipleChoiceAndMultiplePermittedAndIsExpandedToQuestions < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :questions, :multiple_choice, :boolean 4 | add_column :questions, :multiple_permitted, :boolean 5 | add_column :questions, :is_expanded, :boolean 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20130717130107_add_answer_options_relation.rb: -------------------------------------------------------------------------------- 1 | class AddAnswerOptionsRelation < ActiveRecord::Migration[4.2] 2 | def up 3 | create_table :answers_options, :id => false do |t| 4 | t.references :answer, :null => false 5 | t.references :option, :null => false 6 | end 7 | 8 | add_index :answers_options, [:answer_id, :option_id] 9 | end 10 | 11 | def down 12 | drop_table :answers_options 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20130730102219_change_plan_section_columns.rb: -------------------------------------------------------------------------------- 1 | class ChangePlanSectionColumns < ActiveRecord::Migration[4.2] 2 | def up 3 | rename_column :plan_sections, :edit, :locked 4 | rename_column :plan_sections, :user_editing_id, :user_id 5 | remove_column :plan_sections, :at 6 | end 7 | 8 | def down 9 | rename_column :plan_sections, :locked, :edit 10 | rename_column :plan_sections, :user_id, :user_editing_id 11 | add_column :plan_sections, :at 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20130731124011_add_organisation_to_project.rb: -------------------------------------------------------------------------------- 1 | class AddOrganisationToProject < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :projects, :organisation_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130731124532_add_parent_to_organisation.rb: -------------------------------------------------------------------------------- 1 | class AddParentToOrganisation < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :organisations, :parent_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130731130811_update_guidance_columns.rb: -------------------------------------------------------------------------------- 1 | class UpdateGuidanceColumns < ActiveRecord::Migration[4.2] 2 | def up 3 | rename_column :guidances, :organisation_id, :guidance_group_id 4 | end 5 | 6 | def down 7 | rename_column :guidances, :guidance_group_id, :organisation_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130731131354_create_guidance_groups.rb: -------------------------------------------------------------------------------- 1 | class CreateGuidanceGroups < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :guidance_groups do |t| 4 | t.string :name 5 | t.references :organisation 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20130731131846_drop_project_partners.rb: -------------------------------------------------------------------------------- 1 | class DropProjectPartners < ActiveRecord::Migration[4.2] 2 | def up 3 | drop_table :project_partners 4 | end 5 | 6 | def down 7 | create_table :project_partners do |t| 8 | t.integer :organisation_id 9 | t.integer :project_id 10 | t.boolean :leader_org 11 | 12 | t.timestamps 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20130731132153_link_guidance_to_guidance_groups.rb: -------------------------------------------------------------------------------- 1 | class LinkGuidanceToGuidanceGroups < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :guidance_in_group, :id => false do |t| 4 | t.references :guidance, :null => false 5 | t.references :guidance_group, :null => false 6 | end 7 | 8 | add_index :guidance_in_group, [:guidance_id, :guidance_group_id] 9 | end 10 | 11 | def self.down 12 | drop_table :guidance_in_group 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20130731133039_link_guidance_groups_to_projects.rb: -------------------------------------------------------------------------------- 1 | class LinkGuidanceGroupsToProjects < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :project_guidance, :id => false do |t| 4 | t.references :project, :null => false 5 | t.references :guidance_group, :null => false 6 | end 7 | 8 | add_index :project_guidance, [:project_id, :guidance_group_id] 9 | end 10 | 11 | def self.down 12 | drop_table :project_guidance 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20130812100100_add_release_time_to_plan_section.rb: -------------------------------------------------------------------------------- 1 | class AddReleaseTimeToPlanSection < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :plan_sections, :locked 4 | add_column :plan_sections, :release_time, :datetime 5 | end 6 | 7 | def down 8 | add_column :plan_sections, :locked, :boolean 9 | remove_column :plan_sections, :release_time 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20130902141025_add_is_default_to_dmptemplate.rb: -------------------------------------------------------------------------------- 1 | class AddIsDefaultToDmptemplate < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :dmptemplates, :is_default, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130902141150_add_grant_number_to_project.rb: -------------------------------------------------------------------------------- 1 | class AddGrantNumberToProject < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :projects, :grant_number, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130902142403_add_organisation_id_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddOrganisationIdToUser < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :organisation_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130903072531_remove_organisation_id_from_user.rb: -------------------------------------------------------------------------------- 1 | class RemoveOrganisationIdFromUser < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :users, :organisation_id 4 | end 5 | 6 | def down 7 | add_column :users, :organisation_id, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130903084409_create_option_warnings.rb: -------------------------------------------------------------------------------- 1 | class CreateOptionWarnings < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :option_warnings do |t| 4 | t.references :organisation 5 | t.references :option 6 | t.text :text 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20130913134657_add_fields_to_projects.rb: -------------------------------------------------------------------------------- 1 | class AddFieldsToProjects < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :projects, :identifier, :string 4 | add_column :projects, :description, :string 5 | add_column :projects, :principal_investigator, :string 6 | add_column :projects, :principal_investigator_identifier, :string 7 | add_column :projects, :data_contact, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20130913161023_add_external_guidance_url_to_phases.rb: -------------------------------------------------------------------------------- 1 | class AddExternalGuidanceUrlToPhases < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :phases, :external_guidance_url, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130918130838_add_confirmable_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddConfirmableToUsers < ActiveRecord::Migration[4.2] 2 | 3 | def self.up 4 | add_column :users, :confirmation_token, :string 5 | add_column :users, :confirmed_at, :datetime 6 | add_column :users, :confirmation_sent_at, :datetime 7 | add_index :users, :confirmation_token, :unique => true 8 | User.update_all(:confirmed_at => Time.now) 9 | end 10 | 11 | def self.down 12 | remove_column :users, :confirmation_token, :confirmed_at, :confirmation_sent_at 13 | end 14 | 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20130926121718_add_project_administrator_to_project_groups.rb: -------------------------------------------------------------------------------- 1 | class AddProjectAdministratorToProjectGroups < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :project_groups, :project_administrator, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130927091932_add_other_organisation_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddOtherOrganisationToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :other_organisation, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20130927092206_add_is_other_to_organisations.rb: -------------------------------------------------------------------------------- 1 | class AddIsOtherToOrganisations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :organisations, :is_other, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20131108151505_add_dmptemplate_id_to_guidance.rb: -------------------------------------------------------------------------------- 1 | class AddDmptemplateIdToGuidance < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :guidances, :dmptemplate_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20131111090129_create_suggested_answers.rb: -------------------------------------------------------------------------------- 1 | class CreateSuggestedAnswers < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :suggested_answers do |t| 4 | t.references :question 5 | t.references :organisation 6 | t.text :text 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20131126133804_add_dmponline3_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddDmponline3ToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :dmponline3, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20131126135301_add_accept_terms_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddAcceptTermsToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :accept_terms, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20131127100520_create_splash_logs.rb: -------------------------------------------------------------------------------- 1 | class CreateSplashLogs < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :splash_logs do |t| 4 | t.string :destination 5 | t.timestamps 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20131128150644_add_sort_name_to_organisations.rb: -------------------------------------------------------------------------------- 1 | class AddSortNameToOrganisations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :organisations, :sort_name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20131129143550_create_exported_plans.rb: -------------------------------------------------------------------------------- 1 | class CreateExportedPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :exported_plans do |t| 4 | t.references :plan 5 | t.references :user 6 | t.string :format 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20131212111049_add_is_example_to_suggested_answers.rb: -------------------------------------------------------------------------------- 1 | class AddIsExampleToSuggestedAnswers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :suggested_answers, :is_example, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140210121753_add_is_text_field_to_questions.rb: -------------------------------------------------------------------------------- 1 | class AddIsTextFieldToQuestions < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :questions, :is_text_field, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140214120652_add_question_id_to_guidances.rb: -------------------------------------------------------------------------------- 1 | class AddQuestionIdToGuidances < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :guidances, :question_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140214155629_dmptemplates_guidance_groups.rb: -------------------------------------------------------------------------------- 1 | class DmptemplatesGuidanceGroups < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :dmptemplates_guidance_groups, :id => false do |t| 4 | t.integer :dmptemplate_id 5 | t.integer :guidance_group_id 6 | end 7 | end 8 | end -------------------------------------------------------------------------------- /db/migrate/20140218113637_themes_in_guidance.rb: -------------------------------------------------------------------------------- 1 | class ThemesInGuidance < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :themes_in_guidance, :id => false do |t| 4 | t.integer :theme_id 5 | t.integer :guidance_id 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20140331160554_question_formats.rb: -------------------------------------------------------------------------------- 1 | class QuestionFormats < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :question_formats do |t| 4 | t.string :title 5 | t.text :description 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20140331162130_add_question_format_id_to_questions.rb: -------------------------------------------------------------------------------- 1 | class AddQuestionFormatIdToQuestions < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :questions, :question_format_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140407105254_add_optional_subset_to_guidance_groups.rb: -------------------------------------------------------------------------------- 1 | class AddOptionalSubsetToGuidanceGroups < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :guidance_groups, :optional_subset, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140407153318_add_published_to_sections.rb: -------------------------------------------------------------------------------- 1 | class AddPublishedToSections < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :sections, :published, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140423200913_remove_suggested_answer_from_questions.rb: -------------------------------------------------------------------------------- 1 | class RemoveSuggestedAnswerFromQuestions < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :questions, :suggested_answer 4 | end 5 | 6 | def down 7 | add_column :questions, :suggested_answer, :text 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20140429114226_change_published_in_version_to_boolean.rb: -------------------------------------------------------------------------------- 1 | class ChangePublishedInVersionToBoolean < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column :versions, :published, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20140604092907_rails_settings_migration.rb: -------------------------------------------------------------------------------- 1 | class RailsSettingsMigration < ActiveRecord::Migration[4.2] 2 | def self.up 3 | create_table :settings do |t| 4 | t.string :var, :null => false 5 | t.text :value 6 | t.references :target, :null => false, :polymorphic => true 7 | t.timestamps 8 | end 9 | add_index :settings, [ :target_type, :target_id, :var ], :unique => true 10 | end 11 | 12 | def self.down 13 | drop_table :settings 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20140707143840_add_funder_name_to_project.rb: -------------------------------------------------------------------------------- 1 | class AddFunderNameToProject < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :projects, :funder_name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150415150436_remove_fields_from_questions.rb: -------------------------------------------------------------------------------- 1 | class RemoveFieldsFromQuestions < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :questions, :question_type 4 | remove_column :questions, :multiple_choice 5 | remove_column :questions, :multiple_permitted 6 | remove_column :questions, :is_expanded 7 | remove_column :questions, :is_text_field 8 | end 9 | 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20150416092404_remove_field_from_phases.rb: -------------------------------------------------------------------------------- 1 | class RemoveFieldFromPhases < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :phases, :external_guidance_url 4 | end 5 | 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150416101954_remove_field_from_guidances.rb: -------------------------------------------------------------------------------- 1 | class RemoveFieldFromGuidances < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :guidances, :file_id 4 | remove_column :guidances, :theme_id 5 | remove_column :guidances, :dmptemplate_id 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20150416103652_remove_field_from_projects.rb: -------------------------------------------------------------------------------- 1 | class RemoveFieldFromProjects < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :projects, :note 4 | remove_column :projects, :locked 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150416105712_change_field_type_from_projects.rb: -------------------------------------------------------------------------------- 1 | class ChangeFieldTypeFromProjects < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column :projects, :description, :text 4 | end 5 | 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150416112327_add_field_to_guidance_groups.rb: -------------------------------------------------------------------------------- 1 | class AddFieldToGuidanceGroups < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :guidance_groups, :published, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150416113232_remove_fields_from_roles.rb: -------------------------------------------------------------------------------- 1 | class RemoveFieldsFromRoles < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :roles, :resource_id 4 | remove_column :roles, :resource_type 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150416113625_add_field_to_roles.rb: -------------------------------------------------------------------------------- 1 | class AddFieldToRoles < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :roles, :role_in_plans, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150416114743_remove_fields_from_users.rb: -------------------------------------------------------------------------------- 1 | class RemoveFieldsFromUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :users, :password 4 | remove_column :users, :login_count 5 | remove_column :users, :last_login 6 | remove_column :users, :invitation_limit 7 | remove_column :users, :invited_by_id 8 | remove_column :users, :invited_by_type 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20150416120233_add_field_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddFieldToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :organisation_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150416131657_remove_pages_table.rb: -------------------------------------------------------------------------------- 1 | class RemovePagesTable < ActiveRecord::Migration[4.2] 2 | def up 3 | drop_table :pages 4 | end 5 | 6 | def down 7 | raise ActiveRecord::IrreversibleMigration 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20150416133602_remove_admin_users_table.rb: -------------------------------------------------------------------------------- 1 | class RemoveAdminUsersTable < ActiveRecord::Migration[4.2] 2 | def up 3 | drop_table :admin_users 4 | end 5 | 6 | def down 7 | raise ActiveRecord::IrreversibleMigration 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20150427110644_create_comments.rb: -------------------------------------------------------------------------------- 1 | class CreateComments < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :comments do |t| 4 | t.integer :user_id 5 | t.integer :question_id 6 | t.text :text 7 | 8 | t.timestamps 9 | end 10 | 11 | 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20150427145433_add_field_column_to_comments.rb: -------------------------------------------------------------------------------- 1 | class AddFieldColumnToComments < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :comments, :archived, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150430135839_add_plan_id_to_comments.rb: -------------------------------------------------------------------------------- 1 | class AddPlanIdToComments < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :comments, :plan_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150501150321_add_archived_by_to_comments.rb: -------------------------------------------------------------------------------- 1 | class AddArchivedByToComments < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :comments, :archived_by, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20150518153927_add_fields_to_roles.rb: -------------------------------------------------------------------------------- 1 | class AddFieldsToRoles < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :roles, :resource_id, :integer 4 | add_column :roles, :resource_type, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20150805105542_add_institution_logo_text_banner_to.rb: -------------------------------------------------------------------------------- 1 | class AddInstitutionLogoTextBannerTo < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :organisations, :banner_text, :text 4 | add_column :organisations, :logo_file_name, :string 5 | remove_column :organisations, :logo_file_id 6 | remove_column :organisations, :banner_file_id 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20150809210811_add_field_to_questions.rb: -------------------------------------------------------------------------------- 1 | class AddFieldToQuestions < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :questions, :option_comment_display, :boolean, :default => true 4 | 5 | if table_exists?('questions') 6 | Question.find_each do |question| 7 | question.option_comment_display = true 8 | question.save! 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20151208142029_add_field_to_guidances.rb: -------------------------------------------------------------------------------- 1 | class AddFieldToGuidances < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :guidances, :published, :boolean 4 | 5 | if table_exists?('guidances') 6 | Guidance.find_each do |guidance| 7 | guidance.published = true 8 | guidance.save! 9 | end 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20151208142836_update_field_in_guidance_groups.rb: -------------------------------------------------------------------------------- 1 | class UpdateFieldInGuidanceGroups < ActiveRecord::Migration[4.2] 2 | def change 3 | if table_exists?('guidance_groups') 4 | GuidanceGroup.find_each do |guidance_group| 5 | guidance_group.published = true 6 | guidance_group.save! 7 | end 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20160105114044_change_wayfless_entity_format_in_organisations.rb: -------------------------------------------------------------------------------- 1 | class ChangeWayflessEntityFormatInOrganisations < ActiveRecord::Migration[4.2] 2 | 3 | def change 4 | change_column :organisations, :wayfless_entity, :string 5 | end 6 | 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20160609081745_extend_structure_for_api_authentication.rb: -------------------------------------------------------------------------------- 1 | class ExtendStructureForApiAuthentication < ActiveRecord::Migration[4.2] 2 | def change 3 | 4 | add_column :token_permissions, :user_id, :integer 5 | add_column :token_permissions, :token_permission_type_id, :integer 6 | remove_column :token_permissions, :token_type, :integer 7 | 8 | rename_column :org_token_permissions, :token_type, :token_permission_type_id 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20160615095101_add_field_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddFieldToUser < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :invited_by_id, :integer 4 | add_column :users, :invited_by_type, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160719102542_remove_depricated_api_structure.rb: -------------------------------------------------------------------------------- 1 | class RemoveDepricatedApiStructure < ActiveRecord::Migration[4.2] 2 | def up 3 | drop_table :token_permissions 4 | end 5 | 6 | def down 7 | raise ActiveRecord::IrreversibleMigration 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20160719140055_create_languages.rb: -------------------------------------------------------------------------------- 1 | class CreateLanguages < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :languages do |t| 4 | t.string :abbreviation 5 | t.string :description 6 | t.string :name 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20160729091510_add_language_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddLanguageToUser < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :users, :language 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160805101216_create_regions.rb: -------------------------------------------------------------------------------- 1 | class CreateRegions < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :regions do |t| 4 | t.string :abbreviation 5 | t.string :description 6 | t.string :name 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20160805103704_create_region_groups.rb: -------------------------------------------------------------------------------- 1 | class CreateRegionGroups < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :region_groups do |t| 4 | t.integer :super_region_id 5 | t.integer :region_id 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20160805103912_add_default_language_to_language.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultLanguageToLanguage < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :languages, :default_language, :boolean 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160805105928_add_region_ref_to_organisation.rb: -------------------------------------------------------------------------------- 1 | class AddRegionRefToOrganisation < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :organisations, :region 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160805105941_add_language_ref_to_organisation.rb: -------------------------------------------------------------------------------- 1 | class AddLanguageRefToOrganisation < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :organisations, :language 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160810193149_add_logouid_to_organisations.rb: -------------------------------------------------------------------------------- 1 | class AddLogouidToOrganisations < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :organisations, :logo_uid, :string 4 | add_column :organisations, :logo_name, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20160822130601_remove_description_from_organisation.rb: -------------------------------------------------------------------------------- 1 | class RemoveDescriptionFromOrganisation < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :organisations, :description 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20160822130701_add_contact_email_to_organisation.rb: -------------------------------------------------------------------------------- 1 | class AddContactEmailToOrganisation < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :organisations, :contact_email, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161024163546_create_user_identifier_scheme.rb: -------------------------------------------------------------------------------- 1 | class CreateUserIdentifierScheme < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :identifier_schemes do |t| 4 | t.string :name 5 | t.string :description 6 | t.boolean :active 7 | t.timestamps 8 | end 9 | end 10 | end -------------------------------------------------------------------------------- /db/migrate/20161024163920_create_user_identifiers.rb: -------------------------------------------------------------------------------- 1 | class CreateUserIdentifiers < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :user_identifiers do |t| 4 | t.string :identifier 5 | t.timestamps 6 | end 7 | 8 | add_reference :user_identifiers, :user, foreign_key: true 9 | add_reference :user_identifiers, :identifier_scheme, foreign_key: true 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20161102221313_change_text_description_to_text_description_in_token_permission_types.rb: -------------------------------------------------------------------------------- 1 | class ChangeTextDescriptionToTextDescriptionInTokenPermissionTypes < ActiveRecord::Migration[4.2] 2 | def change 3 | if column_exists?(:token_permission_types, :text_desription) 4 | rename_column :token_permission_types, :text_desription, :text_description 5 | end 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20161115105808_drop_unused_user_tables.rb: -------------------------------------------------------------------------------- 1 | class DropUnusedUserTables < ActiveRecord::Migration[4.2] 2 | def change 3 | drop_table :user_statuses 4 | remove_column :users, :user_status_id 5 | drop_table :user_role_types 6 | drop_table :user_types 7 | remove_column :users, :user_type_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20161115114309_drop_option_warning_table.rb: -------------------------------------------------------------------------------- 1 | class DropOptionWarningTable < ActiveRecord::Migration[4.2] 2 | def change 3 | drop_table :option_warnings 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161115121831_remove_parent_id_from_questions.rb: -------------------------------------------------------------------------------- 1 | class RemoveParentIdFromQuestions < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :questions, :parent_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20161115123658_remove_unused_fields_from_roles.rb: -------------------------------------------------------------------------------- 1 | class RemoveUnusedFieldsFromRoles < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :roles, :role_in_plans, :boolean 4 | remove_column :roles, :resource_id, :integer 5 | remove_column :roles, :resource_type, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20161115124634_remove_unused_fields_from_organisations.rb: -------------------------------------------------------------------------------- 1 | class RemoveUnusedFieldsFromOrganisations < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :organisations, :stylesheet_file_id, :integer 4 | remove_column :organisations, :domain, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20161115132137_remove_unused_fields_from_dmptemplates.rb: -------------------------------------------------------------------------------- 1 | class RemoveUnusedFieldsFromDmptemplates < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :dmptemplates, :user_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170124235829_add_visibility_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddVisibilityToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :visibility, :integer, null: false, default: 0 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170201194502_remove_region_group_and_add_super_region_id_to_regions.rb: -------------------------------------------------------------------------------- 1 | class RemoveRegionGroupAndAddSuperRegionIdToRegions < ActiveRecord::Migration[4.2] 2 | def change 3 | drop_table :region_groups if table_exists?(:region_groups) 4 | 5 | add_column :regions, :super_region_id, :integer unless column_exists?(:regions, :super_region_id) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20170227122226_add_locking_columns.rb: -------------------------------------------------------------------------------- 1 | class AddLockingColumns < ActiveRecord::Migration[4.2] 2 | def self.up 3 | add_column :answers, :lock_version, :integer, :default => 0 4 | end 5 | 6 | def self.down 7 | remove_column :answers, :lock_version 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20170412143945_add_phase_id_to_exported_plan.rb: -------------------------------------------------------------------------------- 1 | class AddPhaseIdToExportedPlan < ActiveRecord::Migration[4.2] 2 | def up 3 | add_column :exported_plans, :phase_id, :integer 4 | end 5 | 6 | def down 7 | remove_column :exported_plans, :phase_id, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20170421170849_add_dirty_to_templates.rb: -------------------------------------------------------------------------------- 1 | class AddDirtyToTemplates < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :templates, :dirty, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170427110141_add_logo_url_to_identifier_schemes.rb: -------------------------------------------------------------------------------- 1 | class AddLogoUrlToIdentifierSchemes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :identifier_schemes, :logo_url, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170428083711_add_user_landing_url_to_identifier_schemes.rb: -------------------------------------------------------------------------------- 1 | class AddUserLandingUrlToIdentifierSchemes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :identifier_schemes, :user_landing_url, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170516184429_add_recovery_email_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddRecoveryEmailToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :recovery_email, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170606215136_add_preferences_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddPreferencesToUsers < ActiveRecord::Migration[4.2] 2 | 3 | def self.up 4 | add_column :users, :prefs, :binary 5 | end 6 | 7 | def self.down 8 | remove_column :users, :prefs 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20170607154433_create_org_identifiers.rb: -------------------------------------------------------------------------------- 1 | class CreateOrgIdentifiers < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :org_identifiers do |t| 4 | t.string :identifier 5 | t.string :attrs 6 | t.timestamps 7 | end 8 | 9 | add_reference :org_identifiers, :org, foreign_key: true 10 | add_reference :org_identifiers, :identifier_scheme, foreign_key: true 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20170619173045_add_data_contact_email_and_data_contact_phone_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddDataContactEmailAndDataContactPhoneToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :data_contact_email, :string 4 | add_column :plans, :data_contact_phone, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20170710182442_add_principal_investigator_email_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddPrincipalInvestigatorEmailToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :principal_investigator_email, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20170712084314_move_prefs_to_table.rb: -------------------------------------------------------------------------------- 1 | class MovePrefsToTable < ActiveRecord::Migration[4.2] 2 | def change 3 | remove_column :users, :prefs 4 | 5 | create_table :prefs do |t| 6 | t.string :settings 7 | t.integer :user_id 8 | end 9 | end 10 | end 11 | 12 | 13 | -------------------------------------------------------------------------------- /db/migrate/20170719114516_add_active_flag_to_roles.rb: -------------------------------------------------------------------------------- 1 | class AddActiveFlagToRoles < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :roles, :active, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171013152425_add_principal_investigator_phone_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddPrincipalInvestigatorPhoneToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :principal_investigator_phone, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171024214257_add_links_to_orgs.rb: -------------------------------------------------------------------------------- 1 | class AddLinksToOrgs < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :orgs, :links, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171024220146_add_contact_name_to_orgs.rb: -------------------------------------------------------------------------------- 1 | class AddContactNameToOrgs < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :orgs, :contact_name, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171025200301_add_feedback_fields_to_orgs.rb: -------------------------------------------------------------------------------- 1 | class AddFeedbackFieldsToOrgs < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :orgs, :feedback_enabled, :boolean, default: false 4 | add_column :orgs, :feedback_email_subject, :string 5 | add_column :orgs, :feedback_email_msg, :text 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20171102164156_change_plan_visibility_default.rb: -------------------------------------------------------------------------------- 1 | class ChangePlanVisibilityDefault < ActiveRecord::Migration[4.2] 2 | def change 3 | change_column_default :plans, :visibility, nil # default is application configurable 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171102185518_add_feedback_requested_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddFeedbackRequestedToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :feedback_requested, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20171122195828_change_prefs_settings_to_text.rb: -------------------------------------------------------------------------------- 1 | class ChangePrefsSettingsToText < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column :prefs, :settings, :text 4 | end 5 | 6 | def down 7 | change_column :prefs, :settings, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20171124133802_add_links_to_templates.rb: -------------------------------------------------------------------------------- 1 | class AddLinksToTemplates < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :templates, :links, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180123161959_change_long_strings_to_text.rb: -------------------------------------------------------------------------------- 1 | class ChangeLongStringsToText < ActiveRecord::Migration[4.2] 2 | def change 3 | # change_column :orgs, :links, :text 4 | # change_column :templates, :links, :text 5 | # change_column :identifier_schemes, :logo_url, :text 6 | # change_column :identifier_schemes, :user_landing_url, :text 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20180212124444_add_complete_flag_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddCompleteFlagToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :complete, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180312135238_add_default_to_org_links.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultToOrgLinks < ActiveRecord::Migration[4.2] 2 | def up 3 | # change_column_default(:orgs, :links, '{"org":[]}') 4 | end 5 | def down 6 | # change_column_default(:orgs, :links, '[]') 7 | end 8 | end 9 | 10 | 11 | -------------------------------------------------------------------------------- /db/migrate/20180312141558_add_default_to_plan_visibility.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultToPlanVisibility < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column_default(:plans, :visibility, Plan.visibilities[:privately_visible]) 4 | end 5 | def down 6 | change_column_default(:plans, :visibility, nil) 7 | end 8 | end -------------------------------------------------------------------------------- /db/migrate/20180313120831_add_required_indices.rb: -------------------------------------------------------------------------------- 1 | class AddRequiredIndices < ActiveRecord::Migration[4.2] 2 | def change 3 | #answers 4 | add_index :answers, :question_id 5 | add_index :answers, :plan_id 6 | 7 | #perms 8 | remove_index :perms, name: :index_perms_on_name 9 | remove_index :perms, name: :index_roles_on_name_and_resource_type_and_resource_id 10 | 11 | #plans_guidance_groups 12 | add_index :plans_guidance_groups, [:guidance_group_id, :plan_id] 13 | 14 | end 15 | end 16 | 17 | -------------------------------------------------------------------------------- /db/migrate/20180315161757_add_active_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddActiveToUsers < ActiveRecord::Migration[4.2] 2 | def up 3 | add_column :users, :active, :boolean, default: true 4 | end 5 | def down 6 | remove_column :users, :active 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20180328115455_create_notifications.rb: -------------------------------------------------------------------------------- 1 | class CreateNotifications < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :notifications do |t| 4 | t.integer :notification_type 5 | t.string :title 6 | t.integer :level 7 | t.text :body 8 | t.boolean :dismissable 9 | t.date :starts_at 10 | t.date :expires_at 11 | 12 | t.timestamps null: false 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20180405151713_rename_template_fields.rb: -------------------------------------------------------------------------------- 1 | class RenameTemplateFields < ActiveRecord::Migration[4.2] 2 | def up 3 | rename_column :templates, :migrated, :archived 4 | rename_column :templates, :dmptemplate_id, :family_id 5 | end 6 | 7 | def down 8 | rename_column :templates, :archived, :migrated 9 | rename_column :templates, :family_id, :dmptemplate_id 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20180405151942_remove_dirty_from_templates.rb: -------------------------------------------------------------------------------- 1 | class RemoveDirtyFromTemplates < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :templates, :dirty 4 | end 5 | 6 | def down 7 | add_column :templates, :dirty, :boolean, default: false 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20180405152454_add_family_id_index_to_templates.rb: -------------------------------------------------------------------------------- 1 | class AddFamilyIdIndexToTemplates < ActiveRecord::Migration[4.2] 2 | def up 3 | add_index :templates, :family_id 4 | end 5 | 6 | def down 7 | remove_index :templates, :family_id 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20180412092647_create_notification_acknowledgements.rb: -------------------------------------------------------------------------------- 1 | class CreateNotificationAcknowledgements < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :notification_acknowledgements do |t| 4 | t.belongs_to :user, foreign_key: true, index: true 5 | t.belongs_to :notification, foreign_key: true, index: true 6 | 7 | t.timestamps null: true 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20180417124026_add_unique_index_family_id_version_to_template.rb: -------------------------------------------------------------------------------- 1 | class AddUniqueIndexFamilyIdVersionToTemplate < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index(:templates, [:family_id, :version], unique: true) 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180508151824_drop_tablename.rb: -------------------------------------------------------------------------------- 1 | class DropTablename < ActiveRecord::Migration[4.2] 2 | def change 3 | drop_table :friendly_id_slugs 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20180713145547_remove_defaults_from_links.rb: -------------------------------------------------------------------------------- 1 | class RemoveDefaultsFromLinks < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column :templates, :links, :text, default: nil 4 | change_column :orgs, :links, :text, default: nil 5 | end 6 | def down 7 | change_column :templates, :links, :text, 8 | default: "{\"funder\":[], \"sample_plan\":[]}" 9 | change_column :orgs, :links, :text, 10 | default: "{\"funder\":[], \"sample_plan\":[]}" 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20180713161007_remove_settings_indices.rb: -------------------------------------------------------------------------------- 1 | class RemoveSettingsIndices < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_index "settings", ["target_type", "target_id"] 4 | end 5 | def down 6 | add_index "settings", ["target_type", "target_id"], 7 | name: "index_settings_on_target_type_and_target_id", 8 | unique: true, 9 | using: :btree 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20180713164120_add_length_constraints_to_users_email.rb: -------------------------------------------------------------------------------- 1 | class AddLengthConstraintsToUsersEmail < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column :users, :email, :string, default: "", null: false, limit: 80 4 | end 5 | def down 6 | change_column :users, :email, :string, default: "", null: false, limit: nil 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20180803105147_remove_published_from_sections.rb: -------------------------------------------------------------------------------- 1 | class RemovePublishedFromSections < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :sections, :published, :boolean 4 | end 5 | def down 6 | add_column :sections, :published, :boolean 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20180807114035_add_default_value_to_optional_subset_on_guidance_groups.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultValueToOptionalSubsetOnGuidanceGroups < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column :guidance_groups, :optional_subset, :boolean, default: false, null: false 4 | end 5 | def down 6 | change_column :guidance_groups, :optional_subset, :boolean, default: nil, null: true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20180807114052_add_default_value_to_published_on_guidance_groups.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultValueToPublishedOnGuidanceGroups < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column :guidance_groups, :published, :boolean, default: false, null: false 4 | end 5 | def down 6 | change_column :guidance_groups, :published, :boolean, default: nil, null: true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20180807120926_add_default_value_to_archived_on_notes.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultValueToArchivedOnNotes < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column :notes, :archived, :boolean, default: false, null: false 4 | end 5 | 6 | def down 7 | change_column :notes, :archived, :boolean, default: nil, null: true 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20180807121126_add_default_value_to_is_other_on_orgs.rb: -------------------------------------------------------------------------------- 1 | class AddDefaultValueToIsOtherOnOrgs < ActiveRecord::Migration[4.2] 2 | def up 3 | change_column :orgs, :is_other, :boolean, default: false, null: false 4 | end 5 | def down 6 | change_column :orgs, :is_other, :boolean, default: nil, null: true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20180813114157_remove_logo_file_name_from_orgs.rb: -------------------------------------------------------------------------------- 1 | class RemoveLogoFileNameFromOrgs < ActiveRecord::Migration[4.2] 2 | def up 3 | if column_exists?(:orgs, :logo_file_name) 4 | remove_column :orgs, :logo_file_name 5 | end 6 | end 7 | 8 | def down 9 | add_column :orgs, :logo_file_name, :string 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20180813114216_remove_parent_id_from_orgs.rb: -------------------------------------------------------------------------------- 1 | class RemoveParentIdFromOrgs < ActiveRecord::Migration[4.2] 2 | def up 3 | if column_exists?(:orgs, :parent_id) 4 | remove_column :orgs, :parent_id 5 | end 6 | end 7 | 8 | def down 9 | add_column :orgs, :parent_id, :integer 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20180813114234_remove_wayfless_entity_from_orgs.rb: -------------------------------------------------------------------------------- 1 | class RemoveWayflessEntityFromOrgs < ActiveRecord::Migration[4.2] 2 | def up 3 | if column_exists?(:orgs, :wayfless_entity) 4 | remove_column :orgs, :wayfless_entity 5 | end 6 | end 7 | 8 | def down 9 | add_column :orgs, :wayfless_entity, :string 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20180813114348_remove_slug_from_phases.rb: -------------------------------------------------------------------------------- 1 | class RemoveSlugFromPhases < ActiveRecord::Migration[4.2] 2 | def up 3 | if column_exists?(:phases, :slug) 4 | remove_column :phases, :slug 5 | end 6 | end 7 | 8 | def down 9 | add_column :phases, :slug, :string 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20180813114525_remove_slug_from_plans.rb: -------------------------------------------------------------------------------- 1 | class RemoveSlugFromPlans < ActiveRecord::Migration[4.2] 2 | def up 3 | if column_exists?(:plans, :slug) 4 | remove_column :plans, :slug 5 | end 6 | end 7 | 8 | def down 9 | add_column :plans, :slug, :string 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20180813114614_drop_table_file_types.rb: -------------------------------------------------------------------------------- 1 | class DropTableFileTypes < ActiveRecord::Migration[4.2] 2 | 3 | def up 4 | drop_table(:file_types) if table_exists?(:file_types) 5 | end 6 | 7 | def down 8 | create_table "file_types", force: :cascade do |t| 9 | t.string "name" 10 | t.string "icon_name" 11 | t.integer "icon_size" 12 | t.string "icon_location" 13 | t.datetime "created_at", null: false 14 | t.datetime "updated_at", null: false 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /db/migrate/20180813114628_drop_table_splash_logs.rb: -------------------------------------------------------------------------------- 1 | class DropTableSplashLogs < ActiveRecord::Migration[4.2] 2 | def up 3 | drop_table(:splash_logs) if table_exists?(:splash_logs) 4 | end 5 | 6 | def down 7 | create_table "splash_logs", force: :cascade do |t| 8 | t.string "destination" 9 | t.datetime "created_at", null: false 10 | t.datetime "updated_at", null: false 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20180813114649_remove_banner_text_from_orgs.rb: -------------------------------------------------------------------------------- 1 | class RemoveBannerTextFromOrgs < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :orgs, :banner_text 4 | end 5 | 6 | def down 7 | add_column :orgs, :banner_text, :text 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20180813114719_remove_question_id_from_guidances.rb: -------------------------------------------------------------------------------- 1 | class RemoveQuestionIdFromGuidances < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :guidances, :question_id 4 | end 5 | 6 | def down 7 | add_column :guidances, :question_id, :integer 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20180813114801_remove_orcid_id_from_users.rb: -------------------------------------------------------------------------------- 1 | class RemoveOrcidIdFromUsers < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :users, :orcid_id 4 | end 5 | 6 | def down 7 | add_column :users, :orcid_id, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20180813114813_remove_shibboleth_id_from_users.rb: -------------------------------------------------------------------------------- 1 | class RemoveShibbolethIdFromUsers < ActiveRecord::Migration[4.2] 2 | def up 3 | remove_column :users, :shibboleth_id 4 | end 5 | 6 | def down 7 | add_column :users, :shibboleth_id, :string 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20180815180221_drop_unique_index_customization_of_version_org_id_from_templates.rb: -------------------------------------------------------------------------------- 1 | class DropUniqueIndexCustomizationOfVersionOrgIdFromTemplates < ActiveRecord::Migration[4.2] 2 | def up 3 | if index_exists?(:templates, [:customization_of, :version, :org_id]) 4 | remove_index :templates, [:customization_of, :version, :org_id] 5 | end 6 | end 7 | 8 | def down 9 | add_index(:templates, [:customization_of, :version, :org_id], unique: true) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20180901095920_create_stats.rb: -------------------------------------------------------------------------------- 1 | class CreateStats < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :stats do |t| 4 | t.bigint :count, default: 0 5 | t.date :date, null: false 6 | t.string :type, null: false 7 | t.belongs_to :org 8 | t.timestamps null: false 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20181024120747_add_sessions_table.rb: -------------------------------------------------------------------------------- 1 | class AddSessionsTable < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :sessions do |t| 4 | t.string :session_id, null: false, limit: 64 5 | t.text :data 6 | t.timestamps 7 | end 8 | 9 | add_index :sessions, :session_id, :unique => true 10 | add_index :sessions, :updated_at 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20181025220743_add_details_to_stats.rb: -------------------------------------------------------------------------------- 1 | class AddDetailsToStats < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :stats, :details, :text 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20190507091025_create_departments.rb: -------------------------------------------------------------------------------- 1 | class CreateDepartments < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :departments do |t| 4 | t.string :name 5 | t.string :code 6 | t.belongs_to :org, index: true 7 | 8 | t.timestamps null: false 9 | end 10 | 11 | add_column :users, :department_id, :integer, index: true 12 | add_foreign_key :users, :departments 13 | 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20190724134426_create_conditions.rb: -------------------------------------------------------------------------------- 1 | class CreateConditions < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :conditions do |t| 4 | t.references :question, index: true, foreign_key: true 5 | t.text :option_list 6 | t.integer :action_type 7 | t.integer :number 8 | t.text :remove_data 9 | t.text :webhook_data 10 | 11 | t.timestamps null: false 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20200121190035_add_managed_to_orgs.rb: -------------------------------------------------------------------------------- 1 | class AddManagedToOrgs < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :orgs, :managed, :boolean, default: false, null: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200123162357_create_identifiers.rb: -------------------------------------------------------------------------------- 1 | class CreateIdentifiers < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :identifiers do |t| 4 | t.string :value, null: false 5 | t.text :attrs 6 | t.references :identifier_scheme, null: false 7 | t.references :identifiable, polymorphic: true 8 | t.timestamps 9 | end 10 | 11 | add_index :identifiers, [:identifiable_type, :identifiable_id] 12 | add_index :identifiers, [:identifier_scheme_id, :value] 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20200130160919_contextualize_identifier_schemes.rb: -------------------------------------------------------------------------------- 1 | class ContextualizeIdentifierSchemes < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :identifier_schemes, :for_auth, :boolean, default: false 4 | add_column :identifier_schemes, :for_orgs, :boolean, default: false 5 | add_column :identifier_schemes, :for_plans, :boolean, default: false 6 | add_column :identifier_schemes, :for_users, :boolean, default: false 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20200203190734_add_funder_and_org_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddFunderAndOrgToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_reference :plans, :org, foreign_key: true 4 | add_column :plans, :funder_id, :integer, index: true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20200207212113_create_api_clients.rb: -------------------------------------------------------------------------------- 1 | class CreateApiClients < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :api_clients do |t| 4 | t.string :name, null: false, index: true 5 | t.string :description 6 | t.string :homepage 7 | t.string :contact_name 8 | t.string :contact_email, null: false 9 | t.string :client_id, null: false 10 | t.string :client_secret, null: false 11 | t.date :last_access 12 | t.timestamps null: false 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20200212145931_add_enabled_to_notifications.rb: -------------------------------------------------------------------------------- 1 | class AddEnabledToNotifications < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :notifications, :enabled, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200213203124_add_last_api_access_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddLastApiAccessToUsers < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :users, :last_api_access, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200218213103_create_contributors.rb: -------------------------------------------------------------------------------- 1 | class CreateContributors < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :contributors do |t| 4 | t.string :name 5 | t.string :email, index: true 6 | t.string :phone 7 | t.integer :roles, index: true, null: false 8 | t.references :org, index: true 9 | t.references :plan, index: true, null: false 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20200218213414_add_start_and_end_dates_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddStartAndEndDatesToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :grant_id, :integer, index: true 4 | add_column :plans, :start_date, :datetime 5 | add_column :plans, :end_date, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20200313153356_add_versionable_to_question_options.rb: -------------------------------------------------------------------------------- 1 | class AddVersionableToQuestionOptions < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :question_options, :versionable_id, :string, limit: 36 4 | 5 | add_index :question_options, :versionable_id 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20200323213847_add_api_client_id_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddApiClientIdToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :plans, :api_client_id, :integer, index: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200514102523_create_trackers.rb: -------------------------------------------------------------------------------- 1 | class CreateTrackers < ActiveRecord::Migration[4.2] 2 | def change 3 | create_table :trackers do |t| 4 | t.references :org, index: true, foreign_key: true 5 | t.string :code 6 | 7 | t.timestamps null: false 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20200601121822_add_filtered_to_stats.rb: -------------------------------------------------------------------------------- 1 | class AddFilteredToStats < ActiveRecord::Migration[4.2] 2 | def change 3 | add_column :stats, :filtered, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20200625092600_add_indexes_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddIndexesToPlans < ActiveRecord::Migration[4.2] 2 | def change 3 | add_index :plans, :org_id 4 | add_index :plans, :funder_id 5 | add_index :plans, :grant_id 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20201009101541_remove_user_identifiers_table.rb: -------------------------------------------------------------------------------- 1 | class RemoveUserIdentifiersTable < ActiveRecord::Migration[5.2] 2 | def up 3 | drop_table :user_identifiers 4 | end 5 | 6 | def down 7 | rails ActiveRecord::IrreversibleMigration 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20201113174910_add_org_id_to_api_clients.rb: -------------------------------------------------------------------------------- 1 | class AddOrgIdToApiClients < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :api_clients, :org_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201119210343_create_mime_types.rb: -------------------------------------------------------------------------------- 1 | class CreateMimeTypes < ActiveRecord::Migration[5.2] 2 | def change 3 | create_table :mime_types do |t| 4 | t.string :description, null: false 5 | t.string :category, null: false 6 | t.string :value, null: false, index: true 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20201208192403_drop_org_identifiers.rb: -------------------------------------------------------------------------------- 1 | class DropOrgIdentifiers < ActiveRecord::Migration[5.2] 2 | def change 3 | drop_table :org_identifiers 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20201216140226_change_last_access_api_clients.rb: -------------------------------------------------------------------------------- 1 | class ChangeLastAccessApiClients < ActiveRecord::Migration[5.2] 2 | def change 3 | change_column :api_clients, :last_access, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210729204238_create_research_domains.rb: -------------------------------------------------------------------------------- 1 | class CreateResearchDomains < ActiveRecord::Migration[5.2] 2 | def change 3 | create_table :research_domains do |t| 4 | t.string :identifier, null: false 5 | t.string :label, null: false 6 | t.references :parent, foreign_key: { to_table: :research_domains } 7 | t.timestamps 8 | end 9 | 10 | add_reference :plans, :research_domain, index: true 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20210729204412_add_ethical_issues_and_funding_status_to_plans.rb: -------------------------------------------------------------------------------- 1 | class AddEthicalIssuesAndFundingStatusToPlans < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :plans, :ethical_issues, :boolean 4 | add_column :plans, :ethical_issues_description, :text 5 | add_column :plans, :ethical_issues_report, :string 6 | 7 | add_column :plans, :funding_status, :integer, null: true 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20220315104737_add_helpdesk_email_to_orgs.rb: -------------------------------------------------------------------------------- 1 | class AddHelpdeskEmailToOrgs < ActiveRecord::Migration[5.2] 2 | def change 3 | add_column :orgs, :helpdesk_email, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240613141451_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb: -------------------------------------------------------------------------------- 1 | # This migration comes from active_storage (originally 20211119233751) 2 | class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0] 3 | def change 4 | return unless table_exists?(:active_storage_blobs) 5 | 6 | change_column_null(:active_storage_blobs, :checksum, true) 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /doc/README_FOR_APP: -------------------------------------------------------------------------------- 1 | Use this README file to introduce your application and point to useful places in the API for learning more. 2 | Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries. 3 | -------------------------------------------------------------------------------- /doc/roadmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/doc/roadmap.png -------------------------------------------------------------------------------- /lib/cleanup.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Private: Utility module providing tools to clean up the codebase over time. 4 | module Cleanup 5 | end 6 | -------------------------------------------------------------------------------- /lib/cleanup/deprecators.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Cleanup 4 | # Private: Custom deprecator classes to use while we refactor the code for 5 | # better readability. 6 | module Deprecators 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /lib/custom_failure.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Override how Devise handles failures 4 | class CustomFailure < Devise::FailureApp 5 | def redirect_url 6 | root_path 7 | end 8 | 9 | def respond 10 | if http_auth? 11 | http_auth 12 | else 13 | redirect 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /lib/data_cleanup/rules.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require_relative 'rules/base' if File.exist?(Rails.root.join('lib', 'data_cleanup', 'rules', 'base.rb')) 4 | 5 | module DataCleanup 6 | # Think this is used for RSpec 7 | module Rules 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /lib/generators/data_cleanup_rule/USAGE: -------------------------------------------------------------------------------- 1 | Description: 2 | Add a new rule for cleaning invalid database records 3 | 4 | Example: 5 | rails generate data_cleanup_rule user/fix_missing_emails 6 | 7 | This will create: 8 | lib/tasks/data_cleanup/rules/user/fix_missing_emails.rb 9 | -------------------------------------------------------------------------------- /lib/generators/data_cleanup_rule/templates/data_cleanup/rules/rule.rb.erb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module DataCleanup 4 | module Rules 5 | # <%= default_description %> 6 | module <%= model_name %> 7 | class <%= rule_class_name %> < Rules::Base 8 | 9 | def description 10 | "<%= default_description %>" 11 | end 12 | 13 | def call 14 | ::<%= model_name %>.where(nil).update_all({}) 15 | end 16 | end 17 | end 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /lib/tasks/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/lib/tasks/.gitkeep -------------------------------------------------------------------------------- /lib/tasks/factory_bot.rake: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'English' 4 | 5 | namespace :factory_bot do 6 | desc 'Verify that all FactoryBot factories are valid' 7 | task lint: :environment do 8 | if Rails.env.test? 9 | # DatabaseCleaner.cleaning do 10 | FactoryBot.lint 11 | # end 12 | else 13 | system("bundle exec rails factory_bot:lint RAILS_ENV='test'") 14 | exit $CHILD_STATUS.exitstatus 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /lib/tasks/gettext.rake: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | namespace :gettext do 4 | def files_to_translate 5 | Dir.glob('{app,lib,config,locale}/**/*.{rb,erb,haml,slim,rhtml}') 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /lib/templates/erb/scaffold/_form.html.erb: -------------------------------------------------------------------------------- 1 | <%%= semantic_form_for @<%= singular_name %> do |f| %> 2 | <%%= f.inputs do %> 3 | <%- attributes.each do |attribute| -%> 4 | <%%= f.input :<%= attribute.name %> %> 5 | <%- end -%> 6 | <%% end %> 7 | 8 | <%%= f.actions do %> 9 | <%%= f.action :submit, :as => :input %> 10 | <%% end %> 11 | <%% end %> 12 | -------------------------------------------------------------------------------- /log/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/log/.gitkeep -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('postcss-import'), 4 | require('postcss-flexbugs-fixes'), 5 | require('postcss-preset-env')({ 6 | autoprefixer: { 7 | flexbox: 'no-2009' 8 | }, 9 | stage: 3 10 | }) 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /public/files/DMP_Checklist_2013.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/DMP_Checklist_2013.pdf -------------------------------------------------------------------------------- /public/files/DMPonline-DeliveryNote-May2015.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/DMPonline-DeliveryNote-May2015.pdf -------------------------------------------------------------------------------- /public/files/DMPonline-ReleaseNote-August2015.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/DMPonline-ReleaseNote-August2015.pdf -------------------------------------------------------------------------------- /public/files/DMPonline-user-group-IDCC-2016.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/DMPonline-user-group-IDCC-2016.pdf -------------------------------------------------------------------------------- /public/files/DMPonline-user-group-notes-29Jan2015.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/DMPonline-user-group-notes-29Jan2015.pdf -------------------------------------------------------------------------------- /public/files/DMPonline-v4-InstitutionalBranding.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/DMPonline-v4-InstitutionalBranding.pdf -------------------------------------------------------------------------------- /public/files/DMPonline-v4-InstitutionalLogin.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/DMPonline-v4-InstitutionalLogin.pdf -------------------------------------------------------------------------------- /public/files/DMPonline-v4-LocaleSupport.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/DMPonline-v4-LocaleSupport.pdf -------------------------------------------------------------------------------- /public/files/roadmap_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/files/roadmap_logo.png -------------------------------------------------------------------------------- /public/github-contributor-infographic-final.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/github-contributor-infographic-final.png -------------------------------------------------------------------------------- /public/images/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/images/.keep -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file 2 | # 3 | # To ban all spiders from the entire site uncomment the next two lines: 4 | # User-Agent: * 5 | # Disallow: / 6 | -------------------------------------------------------------------------------- /public/tinymce/skins/oxide/skin.shadowdom.min.css: -------------------------------------------------------------------------------- 1 | body.tox-dialog__disable-scroll{overflow:hidden}.tox-fullscreen{border:0;height:100%;margin:0;overflow:hidden;overscroll-behavior:none;padding:0;touch-action:pinch-zoom;width:100%}.tox.tox-tinymce.tox-fullscreen .tox-statusbar__resize-handle{display:none}.tox-shadowhost.tox-fullscreen,.tox.tox-tinymce.tox-fullscreen{left:0;position:fixed;top:0;z-index:1200}.tox.tox-tinymce.tox-fullscreen{background-color:transparent}.tox-fullscreen .tox.tox-tinymce-aux,.tox-fullscreen~.tox.tox-tinymce-aux{z-index:1201} 2 | -------------------------------------------------------------------------------- /public/tinymce/tinymce.css: -------------------------------------------------------------------------------- 1 | .mce-content-body { 2 | a { 3 | color: #000; 4 | } 5 | } -------------------------------------------------------------------------------- /public/videos/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/public/videos/.keep -------------------------------------------------------------------------------- /spec/factories/exported_plans.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # == Schema Information 4 | # 5 | # Table name: exported_plans 6 | # 7 | # id :integer not null, primary key 8 | # format :string 9 | # created_at :datetime not null 10 | # updated_at :datetime not null 11 | # phase_id :integer 12 | # plan_id :integer 13 | # user_id :integer 14 | # 15 | 16 | FactoryBot.define do 17 | factory :exported_plan do 18 | format { %w[csv txt docx pdf xml].sample } 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /spec/factories/prefs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # == Schema Information 4 | # 5 | # Table name: prefs 6 | # 7 | # id :integer not null, primary key 8 | # settings :text 9 | # user_id :integer 10 | # 11 | 12 | FactoryBot.define do 13 | factory :pref do 14 | # Not sure why this is empty 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /spec/factories/themes.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # == Schema Information 4 | # 5 | # Table name: themes 6 | # 7 | # id :integer not null, primary key 8 | # description :text 9 | # locale :string 10 | # title :string 11 | # created_at :datetime not null 12 | # updated_at :datetime not null 13 | # 14 | 15 | FactoryBot.define do 16 | factory :theme do 17 | title { Faker::Lorem.sentence } 18 | description { Faker::Lorem.paragraph } 19 | locale { 'en_GB' } 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /spec/factories/token_permission_types.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # == Schema Information 4 | # 5 | # Table name: token_permission_types 6 | # 7 | # id :integer not null, primary key 8 | # text_description :text 9 | # token_type :string 10 | # created_at :datetime 11 | # updated_at :datetime 12 | # 13 | 14 | FactoryBot.define do 15 | factory :token_permission_type do 16 | token_type { Faker::Lorem.word } 17 | text_description { Faker::Lorem.sentence } 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/factories/trackers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :tracker do 5 | org { nil } 6 | code { "UA-#{Faker::Number.number(digits: 5)}-#{Faker::Number.number(digits: 2)}" } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/models/condition_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | RSpec.describe Condition, type: :model do 6 | pending "add some examples to (or delete) #{__FILE__}" 7 | end 8 | -------------------------------------------------------------------------------- /spec/models/research_domain_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | describe ResearchDomain do 6 | context 'associations' do 7 | it { is_expected.to have_many :sub_fields } 8 | it { is_expected.to belong_to(:parent).optional } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /spec/support/factory_bot.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | RSpec.configure do |config| 4 | config.include(FactoryBot::Syntax::Methods) 5 | 6 | config.before(:suite) do 7 | # FactoryBot.lint 8 | end 9 | 10 | config.append_after(:each) do 11 | FactoryBot.rewind_sequences 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/support/faker.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'faker' 4 | 5 | # Keep this as :en. Faker doesn't have :en-GB 6 | LOCALE = 'en' 7 | 8 | RSpec.configure do |config| 9 | config.before(:each) do 10 | I18n.locale = LOCALE 11 | Faker::Config.locale = LOCALE 12 | I18n.default_locale = LOCALE 13 | end 14 | 15 | config.after(:each) do 16 | Faker::Name.unique.clear 17 | Faker::UniqueGenerator.clear 18 | end 19 | end 20 | -------------------------------------------------------------------------------- /spec/support/helpers/capybara_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module CapybaraHelper 4 | def clear_cookies! 5 | browser = Capybara.current_session.driver.browser 6 | if browser.respond_to?(:clear_cookies) 7 | # Rack::MockSession 8 | browser.clear_cookies 9 | elsif browser.respond_to?(:manage) && browser.manage.respond_to?(:delete_all_cookies) 10 | # Selenium::WebDriver 11 | browser.manage.delete_all_cookies 12 | else 13 | raise "Don't know how to clear cookies. Weird driver?" 14 | end 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /spec/support/helpers/template_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module TemplateHelper 4 | def build_template(nbr_phases = 0, nbr_sections = 0, nbr_questions = 0) 5 | template = create(:template, phases: nbr_phases) 6 | 7 | template.phases.each do |phase| 8 | nbr_sections.times do 9 | section = create(:section, phase: phase) 10 | nbr_questions.times do 11 | create(:question, section: section) 12 | end 13 | end 14 | end 15 | template 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/support/matchers/has_errors_matcher.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rspec/expectations' 4 | 5 | RSpec::Matchers.define :have_errors do |_expected| 6 | match do 7 | actual.body.include?('Error:') 8 | end 9 | 10 | failure_message do |_actual| 11 | 'expected would have errors on the page.' 12 | end 13 | 14 | failure_message_when_negated do |_actual| 15 | 'expected would not have errors on the page.' 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /spec/support/mocks/logo_file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DMPRoadmap/roadmap/1968be97f453185890a4bf663942e57e4fc21442/spec/support/mocks/logo_file.png -------------------------------------------------------------------------------- /spec/support/shoulda.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'shoulda/matchers' 4 | 5 | RSpec.configure do |config| 6 | config.include(Shoulda::Matchers::ActiveModel, type: :model) 7 | config.include(Shoulda::Matchers::ActiveRecord, type: :model) 8 | end 9 | -------------------------------------------------------------------------------- /spec/support/wait_for_ajax.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module WaitForAjax 4 | def wait_for_ajax 5 | Timeout.timeout(Capybara.default_max_wait_time) do 6 | loop until finished_all_ajax_requests? 7 | end 8 | end 9 | 10 | def finished_all_ajax_requests? 11 | page.evaluate_script('jQuery.active').zero? 12 | end 13 | end 14 | 15 | RSpec.configure do |config| 16 | config.include(WaitForAjax, type: :system) 17 | end 18 | --------------------------------------------------------------------------------