{% extends "base.html" %} {% import "_section.html" as _section %} {% import "_wtform.html" as _wtform %} {% block extrahead %} {{ _section.rule_form_script() }} {% endblock %} {% block breadcrumbs %} {% endblock %} {% block content -%}

{% trans username=g.username%}Genisys dashboard for {{ username }}{% endtrans %}

{% if editable %}

{% trans %}Rules you are allowed to edit{% endtrans %}

{% for path, section in editable|dictsort %}
{{ _section.section_link(section, status=section['status'], full_paths=True) }}
{% trans ctime=section['mtime']|timestampformat, td=section['mtime']|timedeltaformat, by=_base.username(section['changed_by']) -%} last changed {{ td }} by {{ by }} {%- endtrans %}
{% endfor %} {% endif %} {% if marked %}

{% trans %}Your favorite sections{% endtrans %}

{{ _section.section_tree({'subsections': marked}, 'status', unique_id='-marked') }} {% endif %} {% if owned %}

{% trans %}Sections you own{% endtrans %}

{{ _section.section_tree({'subsections': owned}, 'status', unique_id='owned') }} {% endif %} {% if not marked and not owned and not editable %}

{% trans %}Your dashboard is empty{% endtrans %}

{% trans %}That means you don't own a section, don't have editor rights in any rule and you haven't marked anything as your favorites. Use a star button left to the section name on the section page to mark a section as your favorite.{% endtrans %}

{% endif %} {% endblock %} {% macro possibly_editable_rule(section, rule, parent_rule=None) -%} {% if current_user_is_in_list(rule['editors']) %}
  • {% if parent_rule %} {{ _section.rule_link(section, parent_rule) }} / {% endif %} {{ _section.rule_link(section, rule) }}

    {% with form = resources_forms.get((section['path'], rule['name'])) %} {% if form %}
    {{ _wtform.wtform(form, compact=True) }}
    {% endif %} {% endwith %} {% else %}
  • {% if parent_rule %} {{ _section.rule_link(section, parent_rule, extra_class="text-muted") }} / {% endif %} {{ _section.rule_link(section, rule, extra_class="text-muted") }}

  • {% endif %} {%- endmacro %}