Files
kimai2/templates/navbar/active-entries.html.twig
Kevin Papst e35d73eab5 fixed short invoice calculator (#114)
* fixed money display and address field for InvoiceTemplate entity
* added quick start button for users without active records
* rearranged columns on project and customer admin page
* improved extensions docu
2018-01-28 12:08:44 +01:00

38 lines
1.7 KiB
Twig

<li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle ddt-large ticktac" data-toggle="dropdown">
<i class="fa fa-play-circle fa-2x"></i>
{% if entries is not empty %}<span class="label label-{% if entries|length >= kimai_context.active_warning %}danger{% else %}warning{% endif %}">{{ entries|length }}</span>{% endif %}
</a>
<ul class="dropdown-menu">
<li class="header">
{{ 'active.entries'|transchoice(entries|length) }}
</li>
<li>
{% if entries is not empty %}
<ul class="menu">
{% for entry in entries %}
<li>
<a href="{{ path('timesheet_stop', {'id' : entry.id}) }}">
<div class="pull-left">
<i class="fa fa-stop-circle fa-2x"></i>
</div>
<h4>
{{ entry.activity.name }}
<small><i class="fa fa-clock-o"></i> {{ entry|durationForEntry }}</small>
</h4>
<p>{{ entry.activity.project.name }} ({{ entry.activity.project.customer.name }})</p>
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="start_record">
<a href="{{ path('timesheet_create') }}"><i class="fa fa-play-circle-o fa-5x"></i></a>
</div>
{% endif %}
</li>
<li class="footer"><a href="{{ path('timesheet_create') }}">{{ 'timesheet.start'|trans }}</a></li>
</ul>
</li>