{% extends "layouts/" + render_mode + ".html" %}
{% block title %}{{_("Filters")}}{% endblock %}
{% block content %}
<div id="filters-list" class="content-normal clearfix">
  {% set tags = mailpile("tags", "display=*", "mode=flat").result.tags %}
  <ul class="items">
    {% for filter in result %}
    {% set tag_groups = make_filter_groups(filter.tags) %}
    <li class="separate">
      <h3>{{ filter.comment }}</h3>
      <p><small>Type: <strong>{{ filter.type }}</strong></small></p>

      <div id="filter-tags-add-{{filter.fid}}" class="filter-tags-add">
        <em><span class="icon-plus"></span> Add</em>
        {% for tid in tag_groups.add %}
        <a href="">{{tid}}</a>
        {% endfor %}
      </div>
      <div id="filter-tags-remove-{{filter.fid}}" class="filter-tags-remove">
        <em><span class="icon-minus"></span> Remove</em>
        {% for tid in tag_groups.remove %}
        <a href="">{{tid}}</a>
        {% endfor %}
      </div>
      <em>Search Terms:</em><br>
      <span class="icon-search"></span> <strong>{{ filter.terms }}</strong><br>
      <label><input type="checkbox"> Autotag</label>

      <ul class="horizontal right">
        <li><a href=""><span class="icon-settings"></span> {{_("Edit")}}</a></li>
        <li><a href=""><span class="icon-circle-x"></span> {{_("Delete")}}</a></li>
      </ul>
    </li>
    {% endfor %}
  </ul>

</div>
{% endblock %}
