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

Refactor the catalog/index.html.erb template to render e.g. facets in a separate partial #615

Merged
merged 1 commit into from Oct 18, 2013

Conversation

cbeer
Copy link
Member

@cbeer cbeer commented Sep 23, 2013

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

screen shot 2013-09-23 at 11 43 44
screen shot 2013-09-23 at 11 43 51

Or, in some other sides, render some other partials:

screen shot 2013-09-23 at 11 44 19

… facets partial directly to give applications a hook to modify the sidebar without overriding the whole index template.
jcoyne added a commit that referenced this pull request Oct 18, 2013
from the index page, render the search_sidebar partial
@jcoyne jcoyne merged commit 146aa8c into master Oct 18, 2013
@jcoyne jcoyne deleted the search_sidebar_partial branch October 18, 2013 15:42
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.

None yet

2 participants