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

[Backport] Allow for injection of new sections in form progress panel #4456

Merged
merged 1 commit into from
Jul 17, 2020

Commits on Jul 17, 2020

  1. Allow for injection of new sections in form progress panel

    This commit adds a new code seam allowing for adding new sections to the
    form progress panel that renders on the right side of the work form.
    
    To add a section in an application override the form_progress_sections_for helper method and make sure it gets loaded
    after Hyrax::HyraxHelperBehavoir (by default included in app/helpers/hyrax_helper.rb). For example:
    
    module WorksHelper
      def form_progress_sections_for(*)
        super + ["my_new_section"]
      end
    end
    
    Then add a new partial at app/views/hyrax/base/_form_progress_my_new_section.html.erb.
    
    The work form helper spec file was renamed to match the name of the module tested within.
    cjcolvar committed Jul 17, 2020
    Configuration menu
    Copy the full SHA
    85c20ba View commit details
    Browse the repository at this point in the history