<th {% if style %}style="{{ style }}" {% endif %}{% if class %}class="{{ class }}"{% endif %}>
  <div class="field">
    <div class="control">
      <button type="button"
              style="cursor:pointer;background:none;border:none;color:inherit;font:inherit;outline:inherit"
              {% if form %}for="{{ form }}"{% endif %}
              hx-include="[name='search-form']"
              hx-post="{{ url }}?direction={{ opposite-direction }}&sort-by={{ sort }}"
              hx-trigger="click"
              hx-target="{{ hx-target }}">{{ name }}&nbsp;{% if sort-by == sort and direction == "asc" %}&uarr;{% elif sort-by == sort and direction == "desc" %}&darr;{% endif %}</button>
    </div>
  </div>
</th>
