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

Remove prototype from app/views/search #597

Open
emilywatkins opened this issue Sep 7, 2018 · 1 comment
Open

Remove prototype from app/views/search #597

emilywatkins opened this issue Sep 7, 2018 · 1 comment

Comments

@emilywatkins
Copy link
Contributor

Ref #457

  • app/views/search/_material_unassigned_clazzes.html.haml:95 #link_to_remote
    uses CALLBACKS and AJAX_OPTIONS

  • app/views/search/_material_unassigned_collections.html.haml:88 #link_to_remote
    uses CALLBACKS and AJAX_OPTIONS

@scytacki
Copy link
Member

This is a case where the UI should be moved to portal-pages.
I'm fairly certain this UI is used used in two different parts of the code which do roughly the same thing.

  1. In portal pages there is an 'assign to class' button in a few components, which calls some rigse javascript to open a dialog to assign the material to your class. This dialog probably uses the material_unassigned_clazzes partial. This dependency on rigse to render a small bit of UI called from portal-pages is not good, so this is a good reason to fix it.
  2. On the rigse search page /search there is a 'assign to class' button. This renders the same dialog. The /search page is rendered using a collection of haml and some coffeescript based react that is in the rigse codebase. If the dialog was moved to portal-pages, this coffeescript based react could use it there. An even better approach would be to move the coffeescript based react into portal-pages.

I believe the same thing applies to material_unassigned_collections partial. There is an 'add to collection' button for admins in both of the place above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants