Refactor the catalog/index.html.erb template to render e.g. facets in a separate partial #615
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the
catalog/index.html.erb
template renders facets and the like directly in the template. This should be extracted into a separate partial (containing all the sidebar content, I suppose), which will give applications a hook to modify the sidebar without overriding the whole index template.There are several use cases (in searchworks, and likely other applications) where we'd like to prepend or append content to the sidebar depending on the search context. This commit allows us to override just the sidebar partial, instead of the whole index template.
Here are some examples:
http://searchworks.stanford.edu/?f%5Bformat%5D%5B%5D=Database
http://searchworks.stanford.edu/?f%5Bcourse%5D%5B%5D=AA-100-01&f%5Binstructor%5D%5B%5D=Pavone%2C+Marco
Or, in some other sides, render some other partials: