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

Add further publication features #142

Merged
merged 5 commits into from May 9, 2016
Merged

Add further publication features #142

merged 5 commits into from May 9, 2016

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented May 9, 2016

Depends on alphagov/govuk-content-schemas#304 for passing tests

  • Use document_type not format for title context on all formats. Publications have varying document types which need to be used as the context in the title component. For all formats without varying document types, the value of document_type will match format. Removes the old approach used by Case Studies (“format_display_type”)
  • Protect against duplicate links appearing in part_of and from
  • Include ministers in from
  • Include related statistical data sets and topical events in part_of
  • Show national statistics logo when document_type is national_statistics

Example based on https://www.gov.uk/government/statistics/affordable-housing-supply-in-england-2011-to-2012

screen shot 2016-05-09 at 11 37 07

https://trello.com/c/v85kPiKN/366-9-publications-migration-mvp-content-schema-examples-and-front-end-work-medium

* Publications have varying document types which need to be used as the
context in the title component
* For all other formats without varying document types, the value of
document_type will match format
* Remove the old approach used by Case Studies (“format_display_type”)
@boffbowsh boffbowsh temporarily deployed to government-frontend-pr-142 May 9, 2016 Inactive
@fofr
Copy link
Contributor Author

@fofr fofr commented May 9, 2016

Tests passing now

@@ -22,4 +29,13 @@ def links(type)
link_to(link["title"], link["base_path"])
end
end

def links_group(types)

This comment has been minimized.

@boffbowsh

boffbowsh May 9, 2016
Contributor

def links_group(types)
  type.flat_map { |type| links(type) }.uniq
end

This comment has been minimized.

@fofr

fofr May 9, 2016
Author Contributor

flat_map, nice. Rebased.

fofr added 4 commits May 6, 2016
eg policies might be filled with related_policies as part of moving
from one to other (related_policies is being phased out).

Without the `uniq` check we’d show the same links multiple times
* Ministers tagged to a content item should show in the “From” fields
* Topical events tagged to a content item should show in the “Part of”
fields
* Split existing logo into partial and style mixin
* Increase top margin on logo to align correctly with title
* Use document_type to determine if national statistics or not
@fofr fofr force-pushed the document-types branch to 1b971a1 May 9, 2016
@boffbowsh boffbowsh merged commit b1eaade into master May 9, 2016
1 check passed
1 check passed
default Build #650 succeeded on Jenkins
Details
@boffbowsh boffbowsh deleted the document-types branch May 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.