Skip to content
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

feat: Project Admins can manage Materials Collections [PT-187061879] #1240

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

dougmartin
Copy link
Member

Adds the ability for project admins to manage materials collections.

@dougmartin dougmartin force-pushed the 187061879-allow-matcol-project-admins branch from 2396e40 to aedc7a7 Compare February 16, 2024 19:47
Adds the ability for project admins to manage materials collections.
@dougmartin dougmartin force-pushed the 187061879-allow-matcol-project-admins branch from aedc7a7 to 66e635b Compare February 16, 2024 19:50
@dougmartin dougmartin marked this pull request as ready for review February 16, 2024 19:55
Copy link
Member

@scytacki scytacki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. It might mess up the sort order of the projects in the UI, but perhaps that sort is handled additionally somewhere else.
I'll merge it like this so it can be tested and if the sorting is important then that can be added as follow up.

@@ -9,7 +9,7 @@
=f.text_field :name
%li
Project:
=f.collection_select :project_id, Admin::Project.order("name ASC"), :id, :name, :prompt => "Select project..."
=f.collection_select :project_id, @projects, :id, :name, :prompt => "Select project..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this lost the sorting.

@@ -1,4 +1,4 @@
- extra_search_fields = select_tag :project_id, options_from_collection_for_select(Admin::Project.order("name ASC"), "id", "name", selected: params[:project_id]), prompt: "Select project..."
- extra_search_fields = select_tag :project_id, options_from_collection_for_select(@projects, "id", "name", selected: params[:project_id]), prompt: "Select project..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might have also lost the sorting.

@scytacki scytacki merged commit 9a8e424 into master Feb 16, 2024
10 checks passed
@scytacki scytacki deleted the 187061879-allow-matcol-project-admins branch February 16, 2024 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants