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

DRY up views by moving metadata logic into module #216

Merged
merged 10 commits into from
Jan 3, 2017
Merged

Commits on Dec 22, 2016

  1. Simplify fatality notice template

    * Move image definition into presenter so the standard
    sidebar_with_body template can be used
    * Add alt text to the image – the image has value and the alt text is
    useful to describe what the crest is
    fofr committed Dec 22, 2016
    Configuration menu
    Copy the full SHA
    26d259f View commit details
    Browse the repository at this point in the history
  2. Create metadata module

    * Provide standard metadata parameters to presenter
    * Simplify view significantly
    * Make it harder to provide wrong details to metadata, or to forget
    something
    fofr committed Dec 22, 2016
    Configuration menu
    Copy the full SHA
    59ead3b View commit details
    Browse the repository at this point in the history
  3. Make case studies consistent with other formats

    * Use same structure for published/updated as other formats, remove
    short_history
    * Access body in the same way as other formats in presenter
    * Include metadata module and use methods
    * Provide a high level text_direction method for all presenters
    fofr committed Dec 22, 2016
    Configuration menu
    Copy the full SHA
    018d363 View commit details
    Browse the repository at this point in the history
  4. Switch detailed guides to use metadata module

    * Include metadata method in national applicability so that including
    the module gets the necessary metadata automatically
    fofr committed Dec 22, 2016
    Configuration menu
    Copy the full SHA
    da57707 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3eafe4c View commit details
    Browse the repository at this point in the history
  6. Remove 'withdrawable' from format presenters

    The module is included in the base content item presenter.
    fofr committed Dec 22, 2016
    Configuration menu
    Copy the full SHA
    70072d1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d17547c View commit details
    Browse the repository at this point in the history
  8. Switch publications to metadata module

    Also remove unused UrlHelper
    fofr committed Dec 22, 2016
    Configuration menu
    Copy the full SHA
    f313753 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    543497c View commit details
    Browse the repository at this point in the history
  10. Switch statistical announcements to metadata module

    * Stop rendering links to policy_areas, they are being deprecated, no
    other format links to them
    * Use standard `from` and `part_of` methods
    * Render links to topics, policies, etc as standard
    * Update tests to query the `other` part of the hash metadata returns
    * Format doesn’t currently provide an emphasised_organisations array,
    protect against it not being present
    fofr committed Dec 22, 2016
    Configuration menu
    Copy the full SHA
    660933e View commit details
    Browse the repository at this point in the history