h1
  ' Tag changes by
  a href=~p"/profiles/#{@user}"
    = @user.name

- route = fn p -> ~p"/profiles/#{@user}/tag_changes?#{p}" end
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @tag_changes, route: route, conn: @conn, params: @pagination_params

.block
  .block__header
    = form_for @conn, ~p"/profiles/#{@user}/tag_changes", [method: "get", enforce_utf8: false], fn f ->
      = text_input f, :only_tag, class: "input", placeholder: "Tag", title: "Only show this tag", autocapitalize: "none"
      = submit "Search", class: "button", title: "Search"

      = link "Removed", to: ~p"/profiles/#{@user}/tag_changes?#{Keyword.merge(@pagination_params, added: 0)}"
      = link "Added", to: ~p"/profiles/#{@user}/tag_changes?#{Keyword.merge(@pagination_params, added: 1)}"
      = link "All", to: ~p"/profiles/#{@user}/tag_changes?#{Keyword.delete(@pagination_params, :added)}"

  .block__header.block__header--light
    span.block__header__title.page__info
      ' Listing changes for
      => @image_count
      = pluralize("image", "images", @image_count)

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