-
Notifications
You must be signed in to change notification settings - Fork 26
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
[#161789] Access List Enhancements #3983
Conversation
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.
Nice work - just some minor changes and questions
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.
@LeticiaErrandonea I left some suggestions for reorganizing the code here - please let me know if they are clear enough or not. It may be easier to talk through in real time
cb9702c
to
48973a3
Compare
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.
@LeticiaErrandonea a couple more small questions for you, almost there!
def search | ||
@product_users = all_product_users(params[:search]).paginate(page: params[:page], per_page: USERS_PER_PAGE) | ||
|
||
@search_action_performed = params[:search] |
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.
Let's called this @search_term
since we're not using the boolean any more
- if @product.has_product_access_groups? | ||
= form_for @product, url: [current_facility, @product, :update_restrictions], method: :put do |f| | ||
= render "table", f: f | ||
= f.submit text("update", plural_label: ProductAccessGroup.model_name.human.pluralize), |
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.
Does this translation still work in the new partial?
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.
Good catch!
@@ -20,22 +20,4 @@ | |||
= text("import_button") | |||
%span{ style:"display:none" }= f.file_field :file, onchange: "form.submit()" | |||
|
|||
- if @product_users.nil? | |||
- elsif @product_users.empty? | |||
%p.notice= text("none") |
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 think there's an entry for this in config/locales/views/admin/en.product_users.yml:7
that can be removed now
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.
🎉
Release Notes
Screenshot
Additional Context
Optional. Feel free to add/modify additional headers as appropriate, e.g. "Refactorings", "Concerns".