h1
  ' Tag changes on tag
  a href=~p"/tags/#{@tag}"
    = @tag.name

- route = fn p -> ~p"/tags/#{@tag}/tag_changes?#{p}" end
- params = if @conn.params["added"], do: [added: @conn.params["added"]]
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: params

.block
  .block__header
    span
      | Display only:

    = link "Removed", to: ~p"/tags/#{@tag}/tag_changes?#{[added: 0]}"
    = link "Added", to: ~p"/tags/#{@tag}/tag_changes?#{[added: 1]}"
    = link "All", to: ~p"/tags/#{@tag}/tag_changes"

  = render PhilomenaWeb.TagChangeView, "index.html", conn: @conn, tag_changes: @tag_changes, pagination: pagination
