Render custom organisation logos when provided #246
Merged
Conversation
* Restrict width of component to 25% to match HTML publication * Include image only when provided
This was referenced Feb 8, 2017
@@ -31,4 +31,12 @@ def last_changed | |||
def organisations | |||
content_item["links"]["organisations"].sort_by { |o| o["title"] } | |||
end | |||
|
|||
def organisation_logo(organisation) | |||
super(organisation).tap do |logo| |
gpeng
Feb 10, 2017
Contributor
You don't need to pass the organisation
argument here. It happens automagically.
You don't need to pass the organisation
argument here. It happens automagically.
fofr
Feb 16, 2017
Author
Contributor
Fixed and rebased
Fixed and rebased
example_logo = schema_item("updated")["links"]["organisations"][0]["details"]["logo"]["image"].symbolize_keys | ||
presented_logo = presented.organisation_logo(organisation)[:organisation][:image] | ||
|
||
refute presented.organisations.count > 1 |
gpeng
Feb 10, 2017
Contributor
This hurts my head a bit. assert count < 2
or assert_equal 1, presented.organisations.count
?
This hurts my head a bit. assert count < 2
or assert_equal 1, presented.organisations.count
?
fofr
Feb 16, 2017
Author
Contributor
Fixed and rebased
Fixed and rebased
* Custom organisation logos have varying heights and give undue prominence to those logos with a custom image, even if they are a secondary org * Keep the previous default which was to show a text only link for organisations with a custom logo
andrewgarner
added a commit
to alphagov/whitehall
that referenced
this pull request
Mar 28, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Goes with:
Part of https://trello.com/c/HtSGDoRb/594-add-organisation-logos-that-are-images-to-content-item-2
HTML pubs
Corp info pages