openaustralia/publicwhip

View on GitHub
app/views/layouts/_history_notice.html.haml

Summary

Maintainability
Test Coverage
.history-notice
  %p.container
    -if division
      = link_to "Division last edited #{relative_time division.wiki_motion.created_at}", history_division_path_simple(division), title: "View the edit history of this division."
    -elsif policy
      = link_to "Policy last edited #{time_ago_in_words(policy.last_edited_at)} ago", history_policy_path(policy), title: "View the edit history of this policy."
    by
    -if division
      = name_with_badge(division.wiki_motion.user)
    -elsif policy
      = name_with_badge(policy.last_edited_by)