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 first published and last updated to metadata component #774

Merged
merged 1 commit into from Apr 25, 2016

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Apr 22, 2016

These are metadata parts that should be used consistently by formats.

  • Include an option to link to “see all updates”, this isn’t currently configurable as it doesn’t yet need to be.
  • Move “Part of” to be alongside contextually similar metadata, “From”. Keeps history and published terms together.

Based on:
https://github.com/alphagov/government-frontend/blob/40ff6681c44d687fdf87015f244ad7ddd36c82db/app/views/content_items/detailed_guide.html.erb#L19-L20

There's already been an expectation that this should be included:
https://github.com/alphagov/government-frontend/blob/40ff6681c44d687fdf87015f244ad7ddd36c82db/app/views/content_items/case_study.html.erb#L28-L30

These are metadata parts that should be used consistently by formats.
Include an option to link to “see all updates”, this isn’t currently
configurable as it doesn’t yet need to be.

Move “Part of” to be alongside contextually similar metadata, “From”.
Keeps history and published terms together.
@mgrassotti
Copy link
Contributor

@mgrassotti mgrassotti commented Apr 22, 2016

👍 looks good to me

<% if local_assigns.include?(:last_updated) && last_updated %>
<dt>Last updated:</dt>
<dd>
<%= last_updated %><% if local_assigns.include?(:see_updates_link) %>, <a href="#history">see all updates</a><% end %>

This comment has been minimized.

@boffbowsh

boffbowsh Apr 25, 2016
Contributor

Do we need a case for see_updates_link being set to false?

This comment has been minimized.

@fofr

fofr Apr 25, 2016
Author Contributor

Good point. For now I suppose the link could always show.

This comment has been minimized.

@fofr

fofr Apr 25, 2016
Author Contributor

My worry is the dependency on another component being on the page, by making it an explicit thing to include this doesn't accidentally lead to broken links.

@boffbowsh boffbowsh merged commit ffd1ac1 into master Apr 25, 2016
1 check passed
1 check passed
default "Build #1015 succeeded on Jenkins"
Details
@boffbowsh boffbowsh deleted the update-metadata-component branch Apr 25, 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

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