{% from 'macros.j2' import import_information_symbol, user_reference %} {% block head %} {% block title %}{{ service_name }}{% endblock %} {% block stylesheets %} {% endblock %} {% block head_scripts %} {% endblock %} {% include "custom/head.html" %} {% endblock %} {% if current_user.is_authenticated %} {% set num_unread_notifications = (current_user | get_num_unread_notifications) %} {% if config['SHOW_UNHANDLED_OBJECT_RESPONSIBILITY_ASSIGNMENTS'] %} {% set object_responsibility_assignments = get_unhandled_object_responsibility_assignments(current_user.id) %} {% else %} {% set object_responsibility_assignments = [] %} {% endif %} {% else %} {% set num_unread_notifications = 0 %} {% set object_responsibility_assignments = [] %} {% endif %} {% set num_urgent_notifications = object_responsibility_assignments | length %}
{% include "custom/alerts.html" %} {% with messages = get_flashed_messages(with_categories=true) %} {% for category, message in messages %} {% if category == "error" %} {% set alert_class="alert-danger" %} {% elif category == "warning" %} {% set alert_class="alert-warning" %} {% elif category == "success" %} {% set alert_class="alert-success" %} {% else %} {% set alert_class="alert-info" %} {% endif %} {% endfor %} {% endwith %} {% block readonly_alert %} {% if current_user.is_readonly %}

{{ _('Note:') }} {{ _('Your account has been marked as read only. If you think this was done erroneously, please') }} {{ _('contact an administrator') }}.

{% endif %} {% endblock %} {% block content %}{% endblock %}
{% if num_urgent_notifications %} {% endif %} {% block template_values %} {% do set_template_value("translations.search", _('Search…')) %} {% do set_template_value("translations.advanced_search", _('Advanced Search…')) %} {% do set_template_value("translations.automatic_sign_out_after_x_minutes_of_inactivity", _('Sign out in PLACEHOLDER')) %} {% do set_template_value("translations.treepicker_expand_all_text", _('Expand All')) %} {% do set_template_value("translations.treepicker_collapse_all_text", _('Collapse All')) %} {% do set_template_value("translations.object_picker_select_text", _('Please select an object.')) %} {% do set_template_value("translations.object_picker_no_results_text_template", _('No results for "QUERY" — Clear')) %} {% do set_template_value("translations.object_picker_all_results_text_template", _('PLACEHOLDER2 results for "QUERY" — Clear')) %} {% do set_template_value("translations.object_picker_some_results_text_template", _('PLACEHOLDER1 of PLACEHOLDER2 results for "QUERY" — Show allClear')) %} {% do set_template_value("translations.object_picker_no_results_text_template_no_query", _('No results')) %} {% do set_template_value("translations.object_picker_all_results_text_template_no_query", _('PLACEHOLDER2 results')) %} {% do set_template_value("translations.object_picker_some_results_text_template_no_query", _('PLACEHOLDER1 of PLACEHOLDER2 results — Show all')) %} {% do set_template_value("translations.show_more", _('Show more')) %} {% do set_template_value("translations.show_less", _('Show less')) %} {% do set_template_value("translations.select_timeseries", _('Please select at least one timeseries.')) %} {% do set_template_value("translations.markdown_buttons", { "Bold": _("Bold"), "Italic": _("Italic"), "Heading": _("Heading"), "Code": _("Code"), "Generic List": _("Generic List"), "Numbered List": _("Numbered List"), "Create Link": _("Create Link"), "Upload Image": _("Upload Image"), "Insert Table": _("Insert Table"), "Toggle Preview": _("Toggle Preview"), }) %} {% do set_template_value("idle_sign_out_minutes", config["SHARED_DEVICE_SIGN_OUT_MINUTES"]) %} {% do set_template_value("shared_device_state_url", url_for('frontend.shared_device_state')) %} {% do set_template_value("current_utc_datetime", current_utc_datetime().isoformat(timespec='microseconds')) %} {% do set_template_value("typeahead_object_limit", config.get('TYPEAHEAD_OBJECT_LIMIT')) %} {% do set_template_value("application_root_path", url_for('frontend.index')) %} {% do set_template_value("current_user.is_authenticated", current_user.is_authenticated) %} {% if current_user.is_authenticated %} {% with user_settings = get_user_settings() %} {% do set_template_value("current_user.settings.auto_tz", user_settings['AUTO_TZ']) %} {% do set_template_value("current_user.settings.timezone", user_settings['TIMEZONE']) %} {% endwith %} {% do set_template_value("current_user.timezone_url", url_for('frontend.set_timezone')) %} {% do set_template_value("current_user.timezone_csrf_token", TimezoneForm().csrf_token.current_token) %} {% endif %} {% do set_template_value("current_user.timezone", current_user.timezone) %} {% do set_template_value("current_user.has_timezone", current_user.timezone is not none) %} {% do set_template_value("current_user.language.lang_code", get_user_language(current_user).lang_code) %} {% do set_template_value("current_user.language.datetime_format_moment", get_user_language(current_user).datetime_format_moment) %} {% do set_template_value("current_user.language.datetime_format_moment_output", get_user_language(current_user).datetime_format_moment_output) %} {% do set_template_value("current_user.language.date_format_moment_output", get_user_language(current_user).date_format_moment_output) %} {% do set_template_value("notifications.num_urgent_notifications", num_urgent_notifications) %} {% do set_template_value("notifications.hide_notifications", "hide_notifications" in request.args) %} {% set template_values = get_template_values() %} {% endblock %} {% block scripts %} {% endblock %} {% include "custom/scripts.html" %}