.filter
  h3
    = @filter.name

  = if @filter.user do
    p
      ' Maintained by
      = render PhilomenaWeb.UserAttributionView, "_user.html", object: @filter, conn: @conn

  = if @filter.system do
    p
      ' Maintained by staff

  .filter-options
    ul
      li
        ' Spoilers
        = length(@filter.spoilered_tag_ids)
        ' , hides
        = length(@filter.hidden_tag_ids)

      li
        = link "View this filter", to: ~p"/filters/#{@filter}", class: "button"
      li
        = link "Copy and Customize", to: ~p"/filters/new?#{[based_on: @filter]}", class: "button"

      = if can?(@conn, :edit, @filter) do
        li
          = link "Edit this filter", to: ~p"/filters/#{@filter}/edit", class: "button"

      = if @filter.id == @conn.assigns.current_filter.id do
        li
          strong Your current filter
      - else
        li
          = button_to "Use this filter", ~p"/filters/current?#{[id: @filter]}", method: "put", class: "button"
    p
      em
        = @filter.description
