MrDys / blacklight

Blacklight Plugin
http://projectblacklight.org/
Other
1 stars 1 forks source link

Allow users to customise render_document_header output by using view partials #535

Open MrDys opened 12 years ago

MrDys commented 12 years ago

CODEBASE-357: Handle render_document_header as we do render_document_partial, allow user to override the header in a template

See pull request: https://github.com/projectblacklight/blacklight/pull/9

MrDys commented 12 years ago

Original reporter: justin

MrDys commented 12 years ago

cbeer: Updated description from (closed) pull request, and assigned bug to 'down the road'. I'd like to improve the ability to override the display of documents, but probably as a larger refactor.

MrDys commented 12 years ago

cbeer: From the github pull request:

Thanks for the patch. I'm going to hold off applying it for now -- I think there are some outstanding questions about whether the #render_document_partial pattern is actually worth replicating elsewhere. At the very least, it should be possible to remove the begin/rescue/end block and look up the partial paths ahead of time (I may have some existing code to do this..).

Another alternative could be to push #render_document_header from show.html.erb into the document partial _show_partials/_default.html.erb (or similar), but that may require some layout tweaks. In the core, #render_document_header is only used that once, so maybe it could be done away with altogether?


Discussed on the 8/1 committers call. Consensus is to not pull this into master at this time, but the patch can easily be applied in local implementations as needed.

I looked briefly at the alternative approach I mentioned, however it may involve more extensive refactoring (esp. within show tools) than we can do at this time.