Blacklight Plugin

Move document list logic into a helper (to support local overrides)

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.7
  • Component/s: None
  • Description:
    Hide
    The attached patch adds two helpers that allow blacklight implementors to create local overrides that use multiple/alternative document_list view partials (e.g. adding a "gallery" search results view). By default, blacklight will still render the existing document_list view as before, requiring local implementors to override the appropriate ApplicationHelper functions.


    Show
    The attached patch adds two helpers that allow blacklight implementors to create local overrides that use multiple/alternative document_list view partials (e.g. adding a "gallery" search results view). By default, blacklight will still render the existing document_list view as before, requiring local implementors to override the appropriate ApplicationHelper functions.
  1. CODEBASE-217.patch
    (2 kB)
    Chris Beer
    02/Jun/10 10:07 AM

Activity

Hide
Jonathan Rochkind added a comment - 24/May/10 12:46 PM
Oops sorry Chris I forgot about this, just noticed it in my queue. What's the status of this, you're happy with this patch and recommend it be committed?
Show
Jonathan Rochkind added a comment - 24/May/10 12:46 PM Oops sorry Chris I forgot about this, just noticed it in my queue. What's the status of this, you're happy with this patch and recommend it be committed?
Hide
Jason Ronallo added a comment - 29/May/10 11:55 PM
I just tried to apply this patch to a personal branch and got an error:
$ git am < ~/tmp/blacklight-location-customizations-patch.patch
Patch does not have a valid e-mail address.
$ git apply ~/tmp/blacklight-location-customizations-patch.patch
error: patch failed: spec/helpers/application_helper_spec.rb:157
error: spec/helpers/application_helper_spec.rb: patch does not apply

In this first case it may not have been properly formatted to include an email address for credit. Git apply also failed so maybe the patch is outdated and needs to be updated?

Show
Jason Ronallo added a comment - 29/May/10 11:55 PM I just tried to apply this patch to a personal branch and got an error: $ git am < ~/tmp/blacklight-location-customizations-patch.patch Patch does not have a valid e-mail address. $ git apply ~/tmp/blacklight-location-customizations-patch.patch error: patch failed: spec/helpers/application_helper_spec.rb:157 error: spec/helpers/application_helper_spec.rb: patch does not apply In this first case it may not have been properly formatted to include an email address for credit. Git apply also failed so maybe the patch is outdated and needs to be updated?
Hide
Chris Beer added a comment - 30/May/10 8:05 AM
Likely -- it hasn't been tested with 2.5. I'll re-submit next week.
Show
Chris Beer added a comment - 30/May/10 8:05 AM Likely -- it hasn't been tested with 2.5. I'll re-submit next week.
Hide
Chris Beer added a comment - 02/Jun/10 10:07 AM
Does this patch work? It looks like the problem was in the spec file (where the context fragment is entirely unhelpful...), so if it doesn't apply cleanly, feel free to `git apply CODBASE-217.patch --reject` and just drop the spec in, I guess..
Show
Chris Beer added a comment - 02/Jun/10 10:07 AM Does this patch work? It looks like the problem was in the spec file (where the context fragment is entirely unhelpful...), so if it doesn't apply cleanly, feel free to `git apply CODBASE-217.patch --reject` and just drop the spec in, I guess..
Hide
Jonathan Rochkind added a comment - 02/Jun/10 10:16 AM
Sorry, I don't understand what you're asking me to do. Can you lead me through it? I've forgotten in general what this patch is about and what's going on, can you give me an overview of the purpose and status, and what needs to be done to get it into code?

I want to help you out, and then after you've had a patch committed, I'd like to get you to be a committer so you can do it yourself in the future.

Show
Jonathan Rochkind added a comment - 02/Jun/10 10:16 AM Sorry, I don't understand what you're asking me to do. Can you lead me through it? I've forgotten in general what this patch is about and what's going on, can you give me an overview of the purpose and status, and what needs to be done to get it into code? I want to help you out, and then after you've had a patch committed, I'd like to get you to be a committer so you can do it yourself in the future.
Hide
Chris Beer added a comment - 01/Nov/10 3:11 PM
rejected the proposed patch, but added the helper so local implementations can just override the helper method to do anything fancy.
Show
Chris Beer added a comment - 01/Nov/10 3:11 PM rejected the proposed patch, but added the helper so local implementations can just override the helper method to do anything fancy.

People

Dates

  • Created:
    03/May/10 4:18 PM
    Updated:
    01/Nov/10 3:12 PM
    Resolved:
    01/Nov/10 3:12 PM