{% import "entry_macros.html" as macros %} {% macro row(title, value, label) -%} {% set class = label or 'label' %}
<{{ class }} class="col-12 text-sm-left col-form-label ">{{ value }}
{%- endmacro %} {% set booking = session.booking %} {% set is_manager = current_user.is_manager %} {% if not booking %}

Error: This Session does not have a booking

This should not happen, please report this issue to the administrator.

{% else %} {% set owner = booking.owner %} {% set pi = owner.get_pi() %} {% if is_manager or current_user.same_pi(owner) %}

Overview

{{ row('Session Name', session.shortname, 'h4') }} {{ row('Owner', owner.name, 'h4') }} {{ row('PI', owner.pi.name) }} {{ row('Project', macros.project(session.project, True), 'div') }} {{ row('Creator', booking.creator.name) }} {{ row('Staff', booking.operator.name) }} {{ row('Date', session.start|pretty_date) }} {{ row('Status', session.status) }}
{{ booking.resource.name }}
{{ booking.resource.name }}

Acquisition

{% set acq = session.acquisition %} {% set stats = session.stats %} {{ macros.trow('Voltage (kV)', acq['voltage']) }} {{ macros.trow('Magnification', acq['magnification']) }} {{ macros.trow('Pixel Size (A/px)', acq['pixel_size']) }} {{ macros.trow('CS', acq['cs']) }} {{ macros.trow('Dose (per frame)', acq['dose']) }}
{% include 'session_data_card.html' %}
{% else %}

You do not have access to this information.

A session is only visible by people on the same lab

{% endif %} {% endif %}