Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.93 KB | None | 0 0
  1. {% extends '::base.html.twig' %}
  2.  
  3. {% block page_title %}{{ app.request.get('day') }}.{{ app.request.get('month') }}.{{ app.request.get('year') }}{% endblock %}
  4.  
  5. {% block page_content %}
  6. <h3>Projects</h3>
  7.  
  8. <div class="row">
  9. {% if projects is empty %}
  10. <h3 class="ml-1">No projects assigned to {{ user.firstName ~ ' ' ~ user.lastName }}</h3>
  11. {% else %}
  12. {% for project in projects %}
  13. {% set hours = times[project.id] is defined ? times[project.id] // 60 : 0 %}
  14. {% set minutes = times[project.id] is defined ? times[project.id] % 60 : 0 %}
  15.  
  16. <div class="col-md-3 text-center">
  17. <a href="{{ path('hours', { projectId: project.id, year: date|date('Y'), month: date|date('m'), day: date|date('d') }) }}">
  18. <div class="project-card">
  19. <h3>{{ project.name }}</h3>
  20. <h4>{{ '%02d'|format(hours) }}h:{{ '%02d'|format(minutes) }}m</h4>
  21. </div>
  22. </a>
  23. </div>
  24. {% endfor %}
  25. {% endif %}
  26. </div>
  27.  
  28. <h3>Daily project reports</h3>
  29.  
  30. {% if reports is empty %}
  31. <h3>No reports created for {{ app.request.get('day') ~ '.' ~ app.request.get('month') ~ '.' ~ app.request.get('year') }}</h3>
  32. {% else %}
  33. <div>
  34.  
  35.  
  36. {% for report in reports %}
  37. {% set hours = times[report.project.id] is defined ? times[report.project.id] // 60 : 0 %}
  38. {% set minutes = times[report.project.id] is defined ? times[report.project.id] % 60 : 0 %}
  39.  
  40.  
  41.  
  42. <div class="col-md-3">
  43.  
  44. <h4>{{ report.project }} - {{ '%02d'|format(hours) }} hours
  45. {% if minutes > 0 %}
  46. {{ '%02d'|format(minutes) }} minutes
  47. {% endif %}
  48. </h4>
  49.  
  50. <ul class="list-group">
  51. <li class="list-group-item row">
  52. <div class="col-md-2 h-bold">Done:</div>
  53. <div class="col-md-10">
  54. {% for taskHour in report.hours %}
  55. <div class="item-task">
  56. <span>Task {{ '%03d'|format(taskHour.task.counter) ~ ' - ' ~ taskHour.task.name }}:</span>
  57. <div class="pre ml-1">
  58. {{- '- ' ~ taskHour.comment ?? '------' -}}
  59. </div>
  60. </div>
  61. {% endfor %}
  62. </div>
  63. </li>
  64.  
  65. <li class="list-group-item row">
  66. <div class="col-md-3 h-bold">Issues:</div>
  67. <div class="col-md-4">
  68. <div class="pre">{{ report.issues }}</div>
  69. </div>
  70. </li>
  71.  
  72. <li class="list-group-item row">
  73. <div class="col-md-3 h-bold">Next steps:</div>
  74. <div class="col-md-4">
  75. <div class="pre">{{ report.plans }}</div>
  76. </div>
  77. </li>
  78.  
  79. <li class="list-group-item row">
  80. <div class="col-md-3 h-bold">Suggestions:</div>
  81. <div class="col-md-4">
  82. <div class="pre">{{ report.suggestions }}</div>
  83. </div>
  84. </li>
  85.  
  86. <li class="list-group-item row">
  87. <div class="col-md-3 h-bold">Demo/Live:</div>
  88. <div class="col-md-1">
  89. {{ report.demo }}
  90. </div>
  91. </li>
  92. </ul>
  93. </div>
  94.  
  95. {#<ul>#}
  96. {#<li>#}
  97. {#Done:#}
  98. {#<ul>#}
  99. {#{% for hour in report.hours %}#}
  100. {#<li>{{ hour.task.name ~ ': ' ~ hour.comment ?? '----' }}</li>#}
  101. {#{% endfor %}#}
  102. {#</ul>#}
  103. {#</li>#}
  104.  
  105. {#<li>Issues: {{ report.issues }}</li>#}
  106. {#<li>Next steps: {{ report.plans }}</li>#}
  107. {#<li>suggestions: {{ report.suggestions }}</li>#}
  108. {#<li>#}
  109. {#Demo/Live:#}
  110. {#<ul>#}
  111. {#{% for productLink in report.productLinks %}#}
  112. {#<li>{{ (constant('PRODUCT_LINK_TYPE_DEMO', productLink) == productLink.type ? 'Demo: ' : 'Live: ') ~ productLink.link }}</li>#}
  113. {#{% endfor %}#}
  114. {#</ul>#}
  115. {#</li>#}
  116. {#</ul>#}
  117. {% endfor %}
  118. </div>
  119. {% endif %}
  120. {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement