{% extends "base.html" %} {% load custom_tags_and_filters %} {% block title %}Configuration agenda{% endblock %} {% block content %}

Configuration agenda for {% if time_period == 'today' %}today{% elif time_period == 'near_future' %}the near future{% endif %}

{% if tools %}

Below is a list of reservations which require tool configurations. The reservations are grouped by tool and ordered by start time. Reservations that have a red background were created on short notice, thus there is no guarantee the tool will be configured properly when the user arrives. Reservations that have already started or have no configuration information are excluded. You can also {% if time_period == 'today' %} view reservations in the near future {% elif time_period == 'near_future' %} view reservations for today {% endif %} that will require configuration changes.

{% for tool in tools %} {% regroup reservations|dictsort:"tool.id" by tool as regrouped_reservations %} {% for t in regrouped_reservations %} {% if t.grouper.id == tool.id %} {% for reservation in t.list %} {% if forloop.first %} {% endif %} {% endfor %} {% endif %} {% endfor %}
{{ tool.name }}
{{ reservation.user }}
{% if reservation.project %}{{ reservation.project }}
{% endif %} {{ reservation.start }}
{{ reservation.end }}
{{ reservation.additional_information|linebreaksbr }} {% for config_option in reservation.configurationoption_set.all %} {% if forloop.first %} {% if reservation.additional_information %}
{% endif %}
{% endif %}
{{ config_option.name }} needs to be set to {{ config_option.current_setting }}
{% endfor %} {% if not reservation.tool.in_use and reservation.project %}
{% url 'enable_tool' tool_id=reservation.tool.id user_id=reservation.user.id project_id=reservation.project.id staff_charge='false' as enable_tool_for_user_url %} {% button type="info" icon="glyphicon-play" value="Enable the tool on behalf of "|concat:reservation.user.first_name onclick="enable_tool('"|concat:enable_tool_for_user_url|concat:"');" %} {% if "remote_work"|customization:"remote_work_ask_explicitly" %}
{% button type="info" icon="glyphicon-play" value="Enable the tool on behalf of "|concat:reservation.user.first_name|concat:" for remote work" onclick="enable_tool('"|concat:enable_tool_for_user_url|concat:"', true);" %}
{% endif %}
{% endif %}
{% for id, widget in configuration_widgets.items %} {% if tool.id == id %} {{ widget }} {% endif %} {% endfor %} {% if reservation.tool.in_use %}
{% if reservation.tool.get_current_usage_event.operator.id == user.id %} {% url 'disable_tool' reservation.tool.id as disable_tool_url %} {% button type="delete" id="interlock" icon="glyphicon-stop" onclick="disable_tool('"|concat:disable_tool_url|concat:"')" value="Disable tool" %} {% else %} {% button type="warn" disabled="disabled" icon="glyphicon-ban-circle" value="Tool in use" %} {% endif %}
{% else %}
{% if user.active_project_count == 1 %} {% url 'enable_tool' tool_id=reservation.tool.id user_id=user.id project_id=user.active_projects.0.id staff_charge='false' as enable_tool_one_project %} {% button id="interlock" type="save" onclick="enable_tool('"|concat:enable_tool_one_project|concat:"');" value="Enable the tool for myself" icon="glyphicon-play" %} {% elif user.active_project_count > 1 %}
{% endif %}
{% endif %}
{% endfor %} {% else %}

No tools require configuration {% if time_period == 'today' %}today{% elif time_period == 'near_future' %}for the near future{% endif %}.

You can also {% if time_period == 'today' %} view reservations in the near future {% elif time_period == 'near_future' %} view reservations for today {% endif %} that will require configuration changes.

{% endif %} {% endblock %}