{% extends "layout/page.html" -%} {% block head_title %} {% trans %}"Your Queries" Editing{% endtrans %} - {{ config.TRACKER_NAME }} {% endblock -%} {% block page_header %} {% if not context.is_edit_ok() %} {% trans %}You are not allowed to edit queries.{% endtrans %} {% else %} {% trans %}"Your Queries" Editing{% endtrans %} {% endif %} {% endblock -%} {% block extrajs %} {% endblock -%} {% macro include_query(query) %} {% if query.id not in request.user.queries %} {% else %} {% endif %} {% endmacro %} {% block content %} {% include 'layout/permission.html' %} {% if context.is_edit_ok() %}
{% set uid = request.user.id -%} {% set mine = request.user.queries -%} {% set queries = db.query.filter(filterspec={'creator': uid}) %} {% for query in queries %} {{ include_query(query) }} {% endfor %} {% set queries = db.query.filter(filterspec={'private_for': None}) %} {% for query in queries %} {% if query.creator != uid %} {{ include_query(query) }} {% if not query.is_edit_ok() %} {% else %} {% endif %} {% endif %} {% endfor %} {% for query in request.user.queries %} {% if query.is_retired() %} {% if query.creator != uid %} {{ include_query(query) }} {% endif %} {% if query.creator == uid %} {% else %} {% endif %} {% endif %} {% if query.private_for and query.creator != uid %} {{ include_query(query) }} {% if query.creator == uid %} {% endif %} {% endif %} {% endfor %}
{% trans %}Query{% endtrans %} {% trans %}Include in "Your Queries"{% endtrans %} {% trans %}Edit{% endtrans %} {% trans %}Private to you?{% endtrans %} {% trans %}delete/restore
(javascript
required){% endtrans %}
{% trans %}Queries I created{% endtrans %}
{{ query.name.plain() }} {% trans %}edit{% endtrans %}
{% trans %}Queries others created{% endtrans %} {% trans %}Owner{% endtrans %}
{{ query.name.plain() }} {% trans %}[not yours to edit]{% endtrans %}{% trans %}edit{% endtrans %}{{ query.creator.plain()|u }}
{% trans %}Active retired/private queries{% endtrans %}
{{ query.name.plain() }} {% trans %}[query is retired]{% endtrans %} {{ query.creator.plain()|u }}
{{ query.name.plain() }} {% trans %}[query is private]{% endtrans %} {{ query.creator.plain()|u }}
{% endif %} {% endblock %}