{% load custom_tags_and_filters %}
{% with hide_data_history=customizations|get_item:"tool_control_hide_data_history_users" documents_separate_tab=customizations|get_item:"tool_control_documents_in_separate_tab" %} {% if device == 'mobile' %}

{{ tool.name_or_child_in_use_name }}

{% else %}

{{ tool.name_or_child_in_use_name }}

{% endif %} {% endwith %}
{% if tool.serial %}
s/n : {{ tool.serial| safe }}
{% endif %} {# Display tool status... #}
{% if tool.in_use %}
{% with tool.get_current_usage_event as current_usage_event %}

{% if current_usage_event.operator.id == user.id %} You are using this tool {% else %} {{ current_usage_event.operator }} is using this tool {% endif %} {% if current_usage_event.operator.id != current_usage_event.user.id %} on behalf of {{ current_usage_event.user }} {% endif %} for the project named {{ current_usage_event.project.name }} since {{ current_usage_event.start|date:"MONTH_DAY_FORMAT" }} @ {{ current_usage_event.start|time }}.

{% endwith %}
{% if time_left and not user|is_staff_on_tool:tool %}
Your reservation for this tool will end at {{ time_left|time }}. The remainder of your reservation will be relinquished when you stop using this tool.
{% endif %} {% elif tool.delayed_logoff_in_progress %} {% with tool.get_delayed_logoff_usage_event as delayed_logoff_event %}

{{ delayed_logoff_event.operator }} has finished using the {{ tool.name_or_child_in_use_name }} but delayed logoff is in effect. The tool will be available at {{ delayed_logoff_event.end|time }}.

{% endwith %} {% elif not tool.operational or tool.required_resource_is_unavailable or tool.scheduled_outages %}

This tool is shut down.

{% elif tool.nonrequired_resource_is_unavailable or tool.scheduled_partial_outages %}

This tool is operational but not all resources are available.

{% else %}

This tool is operational and idle.

{% endif %} {% if next_reservation and customizations|get_item:"tool_control_show_next_reservation_user" == "enabled" %} {% now "Y-m-d" as today %} The next reservation is {% if today == next_reservation.start|date:"Y-m-d" %} at {{ next_reservation.start|date:"TIME_FORMAT" }} {% else %} on {{ next_reservation.start }} {% endif %} for {{ next_reservation.user }} {% endif %}
{% if tool_rate %}
{% autoescape off %} {{ tool_rate }} {% endautoescape %}
{% endif %} {% if tool.active_counters %}
{% for counter in tool.active_counters %}
{{ counter.name }}: {{ counter.value|floatformat:-2 }}
{% if user in counter.reset_permitted_users %} {% endif %}
{{ counter.description|linebreaksbr }}
{% endfor %}
{% endif %} {% if tool.pinned_comments %}
{% for pinned_comment in tool.pinned_comments %} {% if not pinned_comment.staff_only or user|is_staff_on_tool:tool %}
{% if user.id == pinned_comment.author.id or user|is_staff_on_tool:tool %} {% endif %} {% if user.id == pinned_comment.author.id or user|is_staff_on_tool:tool %} {% endif %}
{{ pinned_comment.content|linebreaksbr }} {{ pinned_comment.author }} wrote this comment on {{ pinned_comment.creation_date }} {% if user.id == pinned_comment.author.id or user|is_staff_on_tool:tool %}
{% csrf_token %} Hide this comment.
{% endif %}
{% endif %} {% endfor %}
{% endif %} {% if tool.unavailable_required_resources or tool.scheduled_outages %}
{# Display any unavailable required resources... #} {% for r in tool.unavailable_required_resources %}
A required resource is unavailable: {{ r.name }} ({{ r.category }}) {{ r.restriction_message }}
{% endfor %} {% if tool.scheduled_outages %} {% for o in tool.scheduled_outages %}
{{ o.title }}({{ o.resource.category }}) {% if o.details %}{{ o.details }}{% endif %} {{ o.creator }} scheduled this outage from {{ o.start }} until {{ o.end }}.
{% endfor %} {% endif %}
{% endif %} {% if tool.unavailable_nonrequired_resources or tool.scheduled_partial_outages %}
{# Display any unavailable non-required resources... #} {% for r in tool.unavailable_nonrequired_resources %}
An optional resource is unavailable: {{ r.name }} ({{ r.category }}) {{ r.restriction_message }}
{% endfor %} {# Display any outage for non-required resources... #} {% for o in tool.scheduled_partial_outages %}

An optional resource has an outage: {{ o.resource.name }} ({{ o.resource.category }})

{{ o.title }} {% if o.details %}: {{ o.details }}{% endif %}
{{ o.creator }} scheduled this outage from {{ o.start }} until {{ o.end }}.
{% endfor %}
{% endif %} {% if tool.problems %}
{# Display all problems and shutdowns... #} {% for t in tool.problems %}
{% if t.force_shutdown %} {% else %} {% endif %}
{% if t.problem_category %}{{ t.problem_category }}{% endif %} {{ t.problem_description }} {% if t.estimated_resolution_time %} Estimated resolution time is {{ t.estimated_resolution_time }}. {% endif %}
This task was created by {{ t.creator }} on {{ t.creation_time }}. {% if user|is_staff_on_tool:tool %} You can update or resolve this task. {% endif %} {% if t.force_shutdown %}The tool will remain shut down until this task is resolved.{% endif %} {% if t.creator.id == user.id %} You may cancel this task if it was mistakenly created.
{% csrf_token %}
{% endif %}
{% if t.progress_description %}
Progress updates {{ t.progress_description|linebreaksbr }}
{% endif %} {% if t.task_images %}
images:
{% endif %}
{% endfor %}
{% endif %} {% if tool.comments or user|is_staff_on_tool:tool and tool.staff_only_comments|length > 0 %}
{# Display all comments... #} {% for c in tool.comments %}
{% if user.id == c.author.id or user|is_staff_on_tool:tool %} {% endif %} {% if user.id == c.author.id or user|is_staff_on_tool:tool %} {% endif %}
{{ c.content|linebreaksbr }} {{ c.author }} wrote this comment on {{ c.creation_date }} {% if user.id == c.author.id or user|is_staff_on_tool:tool %}
{% csrf_token %} Hide this comment.
{% endif %}
{% endfor %} {# Display all staff comments #} {% if user|is_staff_on_tool:tool and tool.staff_only_comments|length > 0 %}
Staff Only
{% for c in tool.staff_only_comments %}
{% if user.id == c.author.id or user|is_staff_on_tool:tool %} {% endif %} {% if user.id == c.author.id or user|is_staff_on_tool:tool %} {% endif %}
{{ c.content|linebreaksbr }} {{ c.author }} wrote this comment on {{ c.creation_date }} {% if user.id == c.author.id or user|is_staff_on_tool:tool %}
{% csrf_token %} Hide this comment.
{% endif %}
{% endfor %}
{% endif %}
{% endif %}
{{ rendered_configuration_html }}
{# Display tool control... #}
{% if tool.in_use %} {% if tool.get_current_usage_event.operator.id == user.id or tool.get_current_usage_event.user.id == user.id %} {{ post_usage_questions }} {% if tool.max_delayed_logoff is not None and not tool.delayed_logoff_in_progress %}
Prevent others from using the tool for minutes after disabling the tool. What's this?
{% endif %}
{% url 'disable_tool' tool.get_current_usage_event.tool.id as disable_tool_url %} {% button type="delete" id="stop" icon="glyphicon-stop" onclick="disable_tool('"|concat:disable_tool_url|concat:"'); return false;" value="Stop using the "|concat:tool.name_or_child_in_use_name %}
{% if time_left and user|is_staff_on_tool:tool %}
{% url 'disable_tool' tool.get_current_usage_event.tool.id as disable_tool_url %} {% with left_until=time_left|timeuntil %} {% button type="delete" id="stop" icon="glyphicon-stop" onclick="disable_tool('"|concat:disable_tool_url|concat:"', true); return false;" value="Stop using the "|concat:tool.name_or_child_in_use_name|concat:" and relinquish the remaining "|concat:left_until|concat:" of your reservation" %} {% endwith %}
{% endif %}
{% endif %} {% endif %} {% if not tool.in_use %} {% if show_wait_list and not wait_list_position == 1 %} Skip Wait List {% endif %}
{% if user|is_staff_on_tool:tool or user.is_service_personnel and tool in user.qualifications.all %}

What would you like to do?

{% if user|is_staff_on_tool:tool %} {% if customizations|get_item:"training_show_self_option_in_tool_control" == "enabled" %}
{% endif %} {% if customizations|get_item:"training_show_behalf_option_in_tool_control" == "enabled" %}
{% endif %}
{% if customizations|get_item:"remote_work_on_behalf_of_user" == "ask" %}
{% endif %} {% if user.charging_staff_time %} {% with user.get_staff_charge as staff_charge %}
{% endwith %} {% elif customizations|get_item:"remote_work_on_behalf_of_user" != "never" %}
{% endif %} {% endif %}
{% elif user in tool.superusers.all and customizations|get_item:"training_show_self_option_in_tool_control" == "enabled" %} {# When user is not staff/service personnel but is a tool superuser and training option is enabled #}

What would you like to do?

{% if customizations|get_item:"training_show_self_option_in_tool_control" == "enabled" %}
{% endif %}
{% elif tool.operational and not tool.required_resource_is_unavailable and not tool.delayed_logoff_in_progress and not tool.scheduled_outage_in_progress %} {% include 'tool_control/get_projects.html' with active_projects=user.active_projects user_id=user.id %} {% endif %} {% if user|is_staff_on_tool:tool or user.is_service_personnel and tool in user.qualifications.all or tool.ready_to_use %} {% endif %}
{% endif %} {% if show_wait_list %}
This tool has a wait list. There are {{ wait_list.count }} people in line to use this tool. {% if not wait_list_position == 0 %}
You are number {{ wait_list_position }} in line to use this tool. {% endif %}
{% if wait_list_position == 0 %} {% button type="save" style="margin-right: 20px;" submit=False icon="glyphicon-list" value="Enter Wait List for "|concat:tool.name onclick="enter_wait_list('"|concat:tool.id|concat:"'); return false;" %} {% else %} {% button type="delete" style="margin-right: 20px;" submit=False icon="glyphicon-trash" value="Exit Wait List for "|concat:tool.name onclick="exit_wait_list('"|concat:tool.id|concat:"'); return false;" %} {% endif %} {% if wait_list.count > 0 %} Show Wait List {% endif %}
{% if wait_list.count > 0 %}
{% for entry in wait_list %} {% endfor %}
Position User
{{ forloop.counter }} {{ entry.user.get_full_name }}
{% endif %}
{% endif %}
{# Spacer #}
{% if messages %} {% for message in messages %} {% endfor %} {% endif %} {% if tool.description or tool.image or customizations|get_item:"tool_control_documents_in_separate_tab" != "enabled" and tool.tooldocuments_set.all and user_can_see_documents %}
{% if tool.description %}

{{ tool.description|safe }}

{% endif %} {% if tool.image %}
Tool image
{% endif %} {% if customizations|get_item:"tool_control_documents_in_separate_tab" != "enabled" and tool.tooldocuments_set.all and user_can_see_documents %}
Documents:
{% endif %}
{% endif %}
{# Spacer #}
{% if tool.in_use %} {% if user|is_staff_on_tool:tool or user.is_user_office %}

You may force {{ tool.get_current_usage_event.operator }} off this tool.

{% endif %} {% endif %}

{{ tool.primary_owner.get_contact_info_html|safe }} is primarily responsible for this tool and can be contacted with any questions or concerns about the tool.

{% if tool.backup_owners.all.count == 1 %} {% with tool.backup_owners.all|first as backup %}

If you are unable to reach {{ tool.primary_owner.get_name }} then please contact the backup tool owner, {{ backup.get_contact_info_html|safe }}.

{% endwith %} {% elif tool.backup_owners.all.count > 1 %}

If you are unable to reach {{ tool.primary_owner.get_name }} then please contact {% for x in tool.backup_owners.all %} {% if not forloop.last %} {{ x.get_contact_info_html|safe }}, {% else %} or {{ x.get_contact_info_html|safe }}. {% endif %} {% endfor %}

{% endif %} {% if tool.superusers.all.count == 1 %} {% with tool.superusers.all|first as superuser %}

For equipment training, you can contact the primary, backup or the superuser, {{ superuser.get_contact_info_html|safe }}.

{% endwith %} {% elif tool.superusers.all.count > 1 %}

For equipment training, you can contact the primary, backup or one of the superusers {% for x in tool.superusers.all %} {% if not forloop.last %} {{ x.get_contact_info_html|safe }}, {% else %} or {{ x.get_contact_info_html|safe }}. {% endif %} {% endfor %}

{% endif %} {% if tool.notification_email_address %}

Problem reports for the {{ tool.name_or_child_in_use_name }} are automatically emailed to {{ tool.notification_email_address }}.

{% endif %} {% if tool.location %}

The {{ tool.name_or_child_in_use_name }} is located in room {{ tool.location }}.

{% endif %} {% if tool.phone_number %}

You may dial the phone that is closest to the {{ tool.name_or_child_in_use_name }} at extension {{ tool.phone_number }}.

{% endif %} {% if show_broadcast_upcoming_reservation %}

You can email all users with an upcoming reservation.

{% endif %}
{% if user|is_staff_on_tool:tool and tool_credentials %}

Credentials

    {% for cred in tool_credentials %}
  • {{ cred.username|default_if_none:"" }} {% if cred.password %} {{ cred.password }}{% endif %} {% if cred.comments %}({{ cred.comments }}){% endif %}
  • {% endfor %}
{% endif %} {% if user|is_staff_on_tool:tool %}
{% include 'tool_control/qualified_users.html' %}
{% elif user in tool.superusers.all or customizations|get_item:"tool_control_show_qualified_users_to_all" == "enabled" %} {% with tool.user_set.all as qualified_users %} {% if qualified_users %}

Qualified users

Only qualified users are able to operate the {{ tool.name }}.

Current qualified users are listed below. Inactive qualified users are red.

    {% for u in qualified_users %} {% if u.is_active %}
  • {{ u }}
  • {% else %}
  • {{ u }} [INACTIVE]
  • {% endif %} {% endfor %}
{% endif %} {% endwith %} {% endif %} {% if tool.required_resource_set.exists %}

Resources that are required for this tool to operate

    {% for u in tool.required_resource_set.all %}
  • {{ u.name }} {% if u.category %}({{ u.category }}){% endif %}
  • {% endfor %}
{% endif %} {% if tool.nonrequired_resource_set.exists %}

Resources that are optional for this tool to operate

    {% for u in tool.nonrequired_resource_set.all %}
  • {{ u.name }} ({{ u.category }})
  • {% endfor %}
{% endif %}

Task & comment history for this tool

{% button type="info" onclick="load_tasks_and_comments_for_last_three_months();" value="Created in the last 3 months" icon="glyphicon-list-alt" %}
{% button type="info" onclick="load_ten_most_recent_tasks_and_comments();" value="10 most recent" icon="glyphicon-list-alt" %}
Contains
Between
and
{% button type="save" submit=False value="Go" icon="glyphicon-search" onclick="load_tasks_and_comments();" %}
{% button type="export" style="float: right" onclick="export_tasks_and_comments();" value="Export" %}
{% if tool.properties %}

Tool properties

{% render_tool_properties tool.properties %}
{% endif %}
{# Spacer #}
{# the data to be loaded here is in tool_control/config_history.html #}
{# the data to be loaded here is in tool_control/usage_data.html #}
{% csrf_token %}

Use this form to report a problem relating to the currently selected tool. The {{ facility_name }} staff as well as anyone with an upcoming reservation will be notified of the problem by email and the details of the problem will be visible to everyone on the website.

{% if task_categories %}
{% endif %} {% if task_statuses and user|is_staff_on_tool:tool %}
{% endif %}
{% if user|is_staff_on_tool:tool %}
{% endif %}
{% button type="delete" submit=True icon="glyphicon-send" value="Report problem" %}
{# Spacer #}
{% csrf_token %}

Use this form to comment on the operating status of the selected tool. The comment will be visible to everyone on the website for informational purposes. (Note: if there is something wrong with the tool then please report a problem instead of creating a comment). You may remove the comment at any time because you are its author.

{% if user|is_staff_on_tool:tool %}
{% endif %}
{% button type="save" value="Post comment" icon="glyphicon-send" %}
{# Spacer #}
{% if customizations|get_item:"tool_control_documents_in_separate_tab" == "enabled" and tool.tooldocuments_set.all and user_can_see_documents %}
Documents:
{# Spacer #}
{% endif %}