{% extends "datebook/base.html" %} {% load i18n autobreadcrumb crispy_forms_tags %} {% block datebook_container_css_classes %} large-row-fluid{% endblock %} {% block head_base_js %}{{ block.super }} {% endblock %} {% block datebook_maintitle %}

{% current_title_from_breadcrumbs %}

{% comment %}View mode menu{% endcomment %}
{% endblock %} {% block datebook_content %}
{% comment %}Weeks stats{% endcomment %} {% for week in datebook_calendar.weeks_totals %} {% endfor %}
{% trans "Week" %}
{{ forloop.counter }} {% blocktrans with time_clock=week.elapsed_time %}{{ time_clock }}h{% endblocktrans %} {% blocktrans with time_clock=week.overtime_time %}{{ time_clock }}h{% endblocktrans %} {% blocktrans with counter=week.vacations %}{{ counter }}d{% endblocktrans %}
{% trans "Total" %} {% blocktrans with time_clock=datebook_calendar.elapsed_time %}{{ time_clock }}h{% endblocktrans %} {% if datebook_calendar.overtime_seconds > 0 %} {% blocktrans with time_clock=datebook_calendar.overtime_time %}{{ time_clock }}h{% endblocktrans %} {% else %} {% blocktrans with time_clock=0 %}{{ time_clock }}h{% endblocktrans %} {% endif %} {% if datebook_calendar.vacations > 0 %} {% blocktrans with counter=datebook_calendar.vacations %}{{ counter }}d{% endblocktrans %} {% else %} {% blocktrans with counter=0 %}{{ counter }}d{% endblocktrans %} {% endif %}
{% if user == author or user.is_superuser or perms.datebook.change_dayentry %}
{% comment %}Daymodel menu chooser{% endcomment %} {% endif %}

{% trans "Notes" %}

{% if datebook.notes %}
{% if DATEBOOK_TEXT_MARKUP_RENDER_TEMPLATE %} {% include DATEBOOK_TEXT_MARKUP_RENDER_TEMPLATE with content=datebook.notes %} {% else %} {{ datebook.notes|linebreaks }} {% endif %}
{% else %}

{% trans "Empty" %}

{% endif %} {% if user == author or user.is_superuser or perms.datebook.change_datebook %} {% blocktrans %}Edit{% endblocktrans %} {% endif %}
{% comment %}The Month calendar{% endcomment %}
{% comment %}Week day names{% endcomment %}
{% spaceless %} {% for classname, name in datebook_calendar.weekheader %} {% trans name %} {% endfor %} {% endspaceless %}
{% spaceless %} {% for week in datebook_calendar.month %}
{% trans "Week" %} {{ forloop.counter }}
{% comment %}Days looping on the calendar object{% endcomment %} {% for day in week %} {% cycle 'mon' 'tue' 'wed' 'thu' 'fri' 'sat' 'sun' as day_name silent %}
{% if not day.noday %}

{{ day.date|date:"l d F" }}

{% if day.entry %} {% if day.entry.vacation %}

{% trans "Vacation" %}

{% else %}
    {% if not day.entry.projected %}
  • {{ day.entry.get_working_hours }}
  • {{ day.entry.get_elapsed_time }}
  • {% if day.entry.get_overtime_seconds > 0 %}
  • {{ day.entry.get_overtime_time }}
  • {% endif %} {% else %}
  • {% blocktrans with time_clock=day.entry.get_elapsed_time %}Expectation: {{ time_clock }}{% endblocktrans %}
  • {% endif %}
{% if day.entry.content %}
{% if DATEBOOK_TEXT_MARKUP_RENDER_TEMPLATE %} {% include DATEBOOK_TEXT_MARKUP_RENDER_TEMPLATE with content=day.entry.content %} {% else %} {{ day.entry.content|linebreaks }} {% endif %}
{% else %}

{% trans "Empty content" %}

{% endif %} {% endif %} {% else %} {% if user == author or user.is_superuser or perms.datebook.add_dayentry %} {% url 'datebook:day-add' author=author year=datebook.period.year month=datebook.period.month day=day.date.day as add_url %}

{% blocktrans with add_url=add_url %}There is no entry yet, add it{% endblocktrans %}

{% else %}

{% blocktrans %}There is no entry yet{% endblocktrans %}

{% endif %} {% endif %}
{% if day.entry %} {% elif user == author or user.is_superuser or perms.datebook.add_dayentry %} {% endif %} {% comment %} Overlay to select item for daymodel assignment {% endcomment %} {% endif %}
{% endfor %}
{% endfor %} {% endspaceless %}
{% endblock %} {% block foot_more_js %}
{% endblock %}