-
Couldn't load subscription status.
- Fork 118
Issue #3555 - Added feature for Org admins can show/hide the #3579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,8 +180,35 @@ | |
| </div> | ||
| <% end %> | ||
| </div> | ||
|
|
||
| <hr> | ||
| <%# Organisation Permissions block where super admin can add: | ||
| "Project details" tab in a plan | ||
| %> | ||
|
|
||
| <% org_perms_header_block = capture do %> | ||
| <h3> | ||
| <%= _('Organisation Permissions') %> | ||
| </h3> | ||
| <% end %> | ||
|
|
||
| <% add_ro_ethical_concerns_block = capture do %> | ||
| <div class="checkbox"> | ||
| <%= f.label :add_ro_ethical_concerns do %> | ||
| <%= f.check_box :add_ro_ethical_concerns, { class: 'org_types', value: org.add_ro_ethical_concerns? }, "true", "false" %> | ||
| <%= _('Add "Research outputs may have ethical concerns" field to "Project details" tab in plans') %> | ||
| <% end %> | ||
| </div> | ||
| <% end %> | ||
|
|
||
| <% if current_user.can_org_admin? %> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had commented on a refactor before, but now I'm wondering if even the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it should be changed to |
||
| <div class="row"> | ||
| <fieldset class="col-sm-8"> | ||
| <%= org_perms_header_block %> | ||
| <%= add_ro_ethical_concerns_block %> | ||
| </fieldset> | ||
| </div> | ||
| <hr> | ||
| <% end %> | ||
|
|
||
| <% if !org.new_record? %> | ||
| <%= render partial: "orgs/external_identifiers", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -102,7 +102,7 @@ ethics_report_tooltip = _("Link to a protocol from a meeting with an ethics comm | |
| </div> | ||
| <% end %> | ||
|
|
||
| <% if Rails.configuration.x.madmp.enable_ethical_issues %> | ||
| <% ethical_issues_block = capture do %> | ||
| <conditional> | ||
| <div class="form-control mb-3"> | ||
| <div class="col-lg-8"> | ||
|
|
@@ -143,6 +143,16 @@ ethics_report_tooltip = _("Link to a protocol from a meeting with an ethics comm | |
| </conditional> | ||
| <% end %> | ||
|
|
||
| <% if Rails.configuration.x.madmp.enable_ethical_issues %> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think of the following refactor? <% if Rails.configuration.x.madmp.enable_ethical_issues && (plan.ethical_issues? || current_user.org.add_ro_ethical_concerns?) %>
<%= ethical_issues_block %>
<% end %> |
||
| <% if plan.ethical_issues == true %> | ||
| <%= ethical_issues_block %> | ||
| <% else %> | ||
| <% if current_user.org.add_ro_ethical_concerns? %> | ||
| <%= ethical_issues_block %> | ||
| <% end %> | ||
| <% end %> | ||
| <% end %> | ||
|
|
||
| <conditional> | ||
| <div id="funder-org-controls" class="form-control mb-3"> | ||
| <div class="col-lg-8"> | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may be best to recreate this migration file (i.e. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The migration has been re-created for Rails version 7.1 as suggested. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| class AddAddRoEthicalConcernsToOrgs < ActiveRecord::Migration[7.1] | ||
| def change | ||
| add_column :orgs, :add_ro_ethical_concerns, :boolean, default: true, null: false | ||
| Org.update_all(add_ro_ethical_concerns: true) | ||
| end | ||
| end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if these labels are a bit too literal and developer-y. What do we think of something more along the following lines?:
h3 title: "Organisation Customisations"
Checkbox caption: "Allow users to describe potential ethical issues in plans"