Skip to content

Commit

Permalink
Add system update date to foots
Browse files Browse the repository at this point in the history
  • Loading branch information
RobNicholsGDS committed May 30, 2024
1 parent 3853a24 commit 2326784
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ def az_content(first_letter, &block)
render "shared/az_content", content:, first_letter:
end

def latest_update
@latest_update ||= UpdateLog.order(:updated_at).last
end

private

def button_sort_direction(field)
Expand Down
10 changes: 9 additions & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
</div>
</main>
</div>
<%= govuk_footer %>
<%= render GovukComponent::FooterComponent.new do |footer| %>
<%= footer.with_meta_html do %>
<% if latest_update %>
<p class="govuk-!-padding-top-2">
System last update <%= latest_update.updated_on.strftime("%d %B %Y") %>
</p>
<% end %>
<% end %>
<% end %>
</body>
</html>

0 comments on commit 2326784

Please sign in to comment.