{% import "entry_macros.html" as macros %}
{% set pi = project.user.get_pi() %} {% set project_prefix = 'Project ' + project.id|string %} {% set pi_prefix = (pi.name + '/ ') if pi else ' ' %} {% set title = project_prefix + ": " + pi_prefix + project.user.name %} {% set navigation = [('Projects', url_for_content('projects_list')), (project_prefix, '')] %} {% include 'include_header.html' %} {% set is_admin = current_user.is_admin %} {% set is_manager = current_user.is_manager %} {% set can_edit = current_user.can_edit_project(project) %} {{ macros.hidden_hour_id() }}
{% if can_edit %} {% endif %}
{% for entry in entries %} {% set entry_config = config['entries'][entry.type] %}
{# Booking entries in Project timeline #} {% if entry.type == 'booking' %}

{{ entry_config['label'] }}

{# #}


{% set booking = entry %} {% set r = booking.resource %}

Instrument:

{{ macros.resource(r) }}

Sessions:

{{ macros.project_session_list(project, booking.session) }}
{% if booking.title %}

Title: {{ booking.title }}

{% endif %}
Owner: {{ booking.owner.name }}
{% if booking.operator %}
Staff: {{ booking.operator.name }}
{% endif %} {{ booking.start|pretty_date }} {# Session entries #} {% elif entry.type == 'session' %} {# All other entries #} {% else %}

{{ entry_config['label'] }} (id={{ entry.id}})

{# Only manager can edit any entry....and only the last entry (reversed) can be edited by users #} {% set can_edit_entry = is_manager or (current_user == entry.creation_user and loop.index == 1) %} {% if can_edit %} {% if can_edit_entry %}
{% endif %} {% else %}
{% endif %} {% if 'report' in entry_config %} {% endif %}


{{ entry.title }}


Last update: {{ entry.last_update_user.name }}, {{ entry.last_update_date|pretty_datetime }}
Created: {{ entry.creation_user.name }}, {{ entry.creation_date|pretty_datetime }}
{{ entry.date|pretty_date }} {% endif %}
{% endfor %}

Project Creation

{% if can_edit %}
{% endif %}

{{ project.title }}


Last update: {{ project.last_update_user.name }}, {{ project.last_update_date|pretty_datetime }}
Creation: {{ project.creation_user.name }}, {{ project.creation_date|pretty_datetime }}
{{ project.date|pretty_date }}