Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

104 строки
4.1 KiB

  1. {# templates/timetracking/_entry_row.html.twig #}
  2. <div class="entry-row{% if entry.invoiced %} entry-row--invoiced{% endif %}"
  3. id="entry-{{ entry.id }}"
  4. data-id="{{ entry.id }}"
  5. data-duration="{{ entry.duration }}"
  6. data-project-id="{{ entry.project.id }}"
  7. data-service-id="{{ entry.service ? entry.service.id : '' }}"
  8. data-label="{{ entry.label|default('')|e('html_attr') }}"
  9. data-note="{{ entry.note|default('')|e('html_attr') }}"
  10. data-invoiced="{{ entry.invoiced ? 'true' : 'false' }}">
  11. <div class="entry-row__display">
  12. <div class="entry-row__info">
  13. <div class="entry-row__title">
  14. {{ entry.project.client.name }} / {{ entry.project.name }}
  15. {% if entry.service %} / {{ entry.service.name }}{% endif %}
  16. </div>
  17. {% if entry.label %}
  18. <span class="entry-row__label">{{ entry.label }}</span>
  19. {% endif %}
  20. {% if entry.note %}
  21. <div class="entry-row__note">{{ entry.note }}</div>
  22. {% endif %}
  23. </div>
  24. <div class="entry-row__actions">
  25. <span class="entry-row__badge">{{ entry.durationFormatted }}</span>
  26. {% if entry.invoiced %}
  27. <span class="entry-row__lock-indicator" title="{{ 'app.entry.invoiced_title'|trans }}">
  28. {% include '_atoms/icon-lock.html.twig' %}
  29. </span>
  30. {% else %}
  31. <button class="entry-row__btn entry-row__btn--stopwatch"
  32. title="{{ 'app.stopwatch.resume'|trans }}"
  33. data-action="timer-toggle">
  34. {% include '_atoms/icon-stopwatch.html.twig' %}
  35. </button>
  36. <button class="entry-row__btn entry-row__btn--edit"
  37. title="{{ 'app.entry.btn_edit'|trans }}"
  38. data-action="edit">
  39. {% include '_atoms/icon-edit.html.twig' %}
  40. </button>
  41. <button class="entry-row__btn entry-row__btn--delete"
  42. title="{{ 'app.entry.btn_delete'|trans }}"
  43. data-action="delete">
  44. {% include '_atoms/icon-delete.html.twig' %}
  45. </button>
  46. {% endif %}
  47. </div>
  48. </div>
  49. {% if not entry.invoiced %}
  50. <div class="entry-row__edit" hidden>
  51. <div class="entry-form__grid entry-form__grid--inline">
  52. <label class="entry-form__label">{{ 'app.entry.label_duration'|trans }}</label>
  53. <div class="entry-form__field">
  54. <input type="text"
  55. class="input input--sm edit-duration"
  56. value="{{ entry.durationFormatted }}"
  57. autocomplete="off" />
  58. {% include '_atoms/duration-help.html.twig' %}
  59. </div>
  60. <label class="entry-form__label">{{ 'app.entry.label_project_service'|trans }}</label>
  61. <div class="entry-form__field entry-form__field--selects">
  62. <select class="select edit-project">
  63. {# Wird per JS befüllt #}
  64. </select>
  65. <select class="select edit-service">
  66. {# Wird per JS befüllt #}
  67. </select>
  68. </div>
  69. <label class="entry-form__label">{{ 'app.entry.label_label'|trans }}</label>
  70. <div class="entry-form__field entry-form__field--label">
  71. <div class="label-chips edit-label-chips"></div>
  72. <div class="label-input-wrap">
  73. <input type="text" class="input input--sm edit-label"
  74. value="{{ entry.label|default('') }}"
  75. placeholder="{{ 'app.entry.placeholder_label'|trans }}" autocomplete="off" />
  76. <div class="label-autocomplete edit-label-autocomplete" hidden></div>
  77. </div>
  78. </div>
  79. <label class="entry-form__label">{{ 'app.entry.label_note'|trans }}</label>
  80. <div class="entry-form__field">
  81. <textarea class="textarea edit-note" rows="3">{{ entry.note|default('') }}</textarea>
  82. </div>
  83. <div class="entry-form__actions">
  84. <button type="button" class="btn btn-primary" data-action="save">
  85. {{ 'app.entry.btn_save'|trans }}
  86. </button>
  87. <button type="button" class="btn btn-secondary" data-action="cancel">
  88. {{ 'app.entry.btn_cancel'|trans }}
  89. </button>
  90. </div>
  91. </div>
  92. </div>
  93. {% endif %}
  94. </div>