highlight invisible items (#2493)

This commit is contained in:
Kevin Papst
2021-04-07 19:14:33 +02:00
committed by GitHub
parent 68bb01d064
commit cdad5913ca
27 changed files with 218 additions and 155 deletions

View File

@@ -29,14 +29,14 @@
{% endif %}
<table class="table table-hover dataTable">
{% if not project.visible %}
<tr>
<tr class="{{ widgets.class_project_row(project, now) }}">
<th>{{ 'label.visible'|trans }}</th>
<td colspan="3">
{{ widgets.label_boolean(project.visible) }}
</td>
</tr>
{% endif %}
<tr>
<tr class="{{ widgets.class_customer_row(project.customer, now) }}">
<th>{{ 'label.customer'|trans }}</th>
<td>
{{ widgets.label_customer(project.customer) }}

View File

@@ -24,15 +24,17 @@
<tr>
<th>{{ 'label.name'|trans }}</th>
<th class="hidden-xs">{{ 'label.comment'|trans }}</th>
<th class="w-min text-center">{{ 'label.visible'|trans }}</th>
<th class="w-min text-center">{{ 'label.team'|trans }}</th>
<th class="actions"></th>
</tr>
</thead>
<tbody>
{% for activity in activities %}
<tr>
<tr class="{{ widgets.class_activity_row(activity, now) }}">
<td>{{ widgets.label_activity(activity) }}</td>
<td class="hidden-xs">{{ activity.comment|comment2html }}</td>
<td class="w-min text-center">{{ widgets.label_visible(activity.visible) }}</td>
<td class="w-min text-center">{{ widgets.badge_team_access(activity.teams) }}</td>
<td class="actions">{{ actions.activity(activity, 'custom') }}</td>
</tr>

View File

@@ -44,7 +44,13 @@
{{ tables.datatable_header(tableName, columns, query, {'reload': 'kimai.projectUpdate kimai.projectTeamUpdate'}) }}
{% for entry in entries %}
<tr{% if is_granted('view', entry) %} class="alternative-link open-edit" data-href="{{ path('project_details', {'id': entry.id}) }}"{% endif %}>
{% set class = widgets.class_project_row(entry, now) %}
{% set dataHref = '' %}
{% if is_granted('view', entry) %}
{% set class = class ~ ' alternative-link open-edit' %}
{% set dataHref = path('project_details', {'id': entry.id}) %}
{% endif %}
<tr class="{{ class }}" data-href="{{ dataHref }}">
<td class="{{ tables.data_table_column_class(tableName, columns, 'name') }}">{{ widgets.label_color_dot('project', true, entry.name, null, entry.color) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'customer') }}">{{ widgets.label_customer(entry.customer) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'comment') }}">{{ entry.comment|comment2html }}</td>