{% extends "layouts/base.html" %} {% block main_content %} {% set breadcrumbs = [ {"name": t('nav.home'), "url": "/", "icon": "fas fa-home"}, {"name": t('nav.rules'), "icon": "fas fa-book"} ] %} {% set header_title = t('nav.rules') %} {% set header_subtitle = t('rules.title') %} {% set header_icon = "fas fa-book" %} {% set header_actions = [ { "type": "button", "text": t('rules.new'), "url": "/rules/new", "icon": "fas fa-plus", "style": "primary" }, { "type": "dropdown", "text": t('common.actions'), "icon": "fas fa-ellipsis-v", "style": "secondary", "items": [ {"text": t('rules.builder'), "url": "/rules/builder", "icon": "fas fa-puzzle-piece"}, {"text": t('common.import'), "url": "/rules/import", "icon": "fas fa-upload"}, {"text": t('common.export'), "url": "/rules/export", "icon": "fas fa-download"}, {"text": t('nav.settings'), "url": "/settings", "icon": "fas fa-cog"} ] } ] %} {% include "components/page_header.html" %}
{% if rules %}
    {% for rule in rules %}
  • {{ rule.name }}

    {{ rule.category }} {% if rule.is_builtin %} {{ t('rules.builtin') }} {% endif %} {% if rule.tags %} {% set tag_list = rule.tags.split(',') if rule.tags else [] %} {% for tag in tag_list[:3] %} {{ tag.strip() }} {% endfor %} {% if tag_list|length > 3 %} +{{ tag_list|length - 3 }} more {% endif %} {% endif %}

    {{ rule.title }}

    {{ rule.description or rule.content[:150] + '...' if rule.content|length > 150 else rule.content }}

    {{ t('rules.recently_created') }}
    {{ t('rules.recently_modified') }}
    {{ rule.content|length if rule.content else 0 }} {{ t('rules.characters') }}
    {% if not rule.is_builtin %} {% endif %}
  • {% endfor %}
{% else %}

{{ t('rules.no_rules_found') }}

{{ t('rules.get_started_message') }}

{% endif %}
{% endblock %}