Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% extends '::base.html.twig' %}
- {% block page_title %}{{ app.request.get('day') }}.{{ app.request.get('month') }}.{{ app.request.get('year') }}{% endblock %}
- {% block page_content %}
- <h3>Projects</h3>
- <div class="row">
- {% if projects is empty %}
- <h3 class="ml-1">No projects assigned to {{ user.firstName ~ ' ' ~ user.lastName }}</h3>
- {% else %}
- {% for project in projects %}
- {% set hours = times[project.id] is defined ? times[project.id] // 60 : 0 %}
- {% set minutes = times[project.id] is defined ? times[project.id] % 60 : 0 %}
- <div class="col-md-3 text-center">
- <a href="{{ path('hours', { projectId: project.id, year: date|date('Y'), month: date|date('m'), day: date|date('d') }) }}">
- <div class="project-card">
- <h3>{{ project.name }}</h3>
- <h4>{{ '%02d'|format(hours) }}h:{{ '%02d'|format(minutes) }}m</h4>
- </div>
- </a>
- </div>
- {% endfor %}
- {% endif %}
- </div>
- <h3>Daily project reports</h3>
- {% if reports is empty %}
- <h3>No reports created for {{ app.request.get('day') ~ '.' ~ app.request.get('month') ~ '.' ~ app.request.get('year') }}</h3>
- {% else %}
- <div>
- {% for report in reports %}
- {% set hours = times[report.project.id] is defined ? times[report.project.id] // 60 : 0 %}
- {% set minutes = times[report.project.id] is defined ? times[report.project.id] % 60 : 0 %}
- <div class="col-md-3">
- <h4>{{ report.project }} - {{ '%02d'|format(hours) }} hours
- {% if minutes > 0 %}
- {{ '%02d'|format(minutes) }} minutes
- {% endif %}
- </h4>
- <ul class="list-group">
- <li class="list-group-item row">
- <div class="col-md-2 h-bold">Done:</div>
- <div class="col-md-10">
- {% for taskHour in report.hours %}
- <div class="item-task">
- <span>Task {{ '%03d'|format(taskHour.task.counter) ~ ' - ' ~ taskHour.task.name }}:</span>
- <div class="pre ml-1">
- {{- '- ' ~ taskHour.comment ?? '------' -}}
- </div>
- </div>
- {% endfor %}
- </div>
- </li>
- <li class="list-group-item row">
- <div class="col-md-3 h-bold">Issues:</div>
- <div class="col-md-4">
- <div class="pre">{{ report.issues }}</div>
- </div>
- </li>
- <li class="list-group-item row">
- <div class="col-md-3 h-bold">Next steps:</div>
- <div class="col-md-4">
- <div class="pre">{{ report.plans }}</div>
- </div>
- </li>
- <li class="list-group-item row">
- <div class="col-md-3 h-bold">Suggestions:</div>
- <div class="col-md-4">
- <div class="pre">{{ report.suggestions }}</div>
- </div>
- </li>
- <li class="list-group-item row">
- <div class="col-md-3 h-bold">Demo/Live:</div>
- <div class="col-md-1">
- {{ report.demo }}
- </div>
- </li>
- </ul>
- </div>
- {#<ul>#}
- {#<li>#}
- {#Done:#}
- {#<ul>#}
- {#{% for hour in report.hours %}#}
- {#<li>{{ hour.task.name ~ ': ' ~ hour.comment ?? '----' }}</li>#}
- {#{% endfor %}#}
- {#</ul>#}
- {#</li>#}
- {#<li>Issues: {{ report.issues }}</li>#}
- {#<li>Next steps: {{ report.plans }}</li>#}
- {#<li>suggestions: {{ report.suggestions }}</li>#}
- {#<li>#}
- {#Demo/Live:#}
- {#<ul>#}
- {#{% for productLink in report.productLinks %}#}
- {#<li>{{ (constant('PRODUCT_LINK_TYPE_DEMO', productLink) == productLink.type ? 'Demo: ' : 'Live: ') ~ productLink.link }}</li>#}
- {#{% endfor %}#}
- {#</ul>#}
- {#</li>#}
- {#</ul>#}
- {% endfor %}
- </div>
- {% endif %}
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement