minimize count and visibility columns for better table alignments (#1636)

This commit is contained in:
Kevin Papst
2020-04-15 11:46:54 +02:00
committed by GitHub
parent 0bc9e74853
commit fe8fecafeb
11 changed files with 36 additions and 29 deletions

View File

@@ -15,7 +15,7 @@
}) %}
{% endfor %}
{% set columns = columns|merge({
'visible': {'class': 'text-center hidden', 'orderBy': false},
'visible': {'class': 'text-center hidden w-min', 'orderBy': false},
'actions': {'class': 'actions alwaysVisible'},
}) %}

View File

@@ -26,8 +26,8 @@
}) %}
{% endfor %}
{% set columns = columns|merge({
'team': {'class': 'text-center', 'orderBy': false},
'visible': {'class': 'text-center hidden', 'orderBy': false},
'team': {'class': 'text-center w-min', 'orderBy': false},
'visible': {'class': 'text-center hidden w-min', 'orderBy': false},
'actions': {'class': 'actions alwaysVisible'},
}) %}

View File

@@ -14,11 +14,11 @@
{% else %}
{% set columns = {
'name': '',
'version': '',
'description': 'hidden-xs',
'required_version': 'hidden-xs hidden-sm',
'actions': 'actions alwaysVisible',
'name': {'class': 'alwaysVisible'},
'version': {'class': ' w-min'},
'description': {'class': 'hidden-xs'},
'required_version': {'class': 'hidden-xs hidden-sm w-min'},
'actions': {'class': 'actions alwaysVisible'},
} %}
{% set tableName = 'plugins' %}
@@ -26,14 +26,14 @@
{{ tables.datatable_header(tableName, columns, null, {}) }}
{% for plugin in plugins %}
<tr>
<td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'name') }}">
{% if plugin.id != plugin.name %}
<span data-toggle="tooltip" data-placement="top" title="{{ plugin.id }}">{{ plugin.name }}</span>
{% else %}
{{ plugin.name }}
{% endif %}
</td>
<td>{{ widgets.label(plugin.metadata.version, 'primary') }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'version') }}">{{ widgets.label(plugin.metadata.version, 'primary') }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'description') }}">{{ plugin.metadata.description }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'required_version') }}">
{% if plugin.metadata.kimaiVersion > constant('App\\Constants::VERSION') %}
@@ -44,7 +44,7 @@
{{ widgets.label(plugin.metadata.kimaiVersion, 'success') }}
{% endif %}
</td>
<td class="actions">
<td class="{{ tables.data_table_column_class(tableName, columns, 'actions') }}">
{{ actions.plugin(plugin, 'index') }}
</td>
</tr>

View File

@@ -19,8 +19,8 @@
}) %}
{% endfor %}
{% set columns = columns|merge({
'team': {'class': 'text-center', 'orderBy': false},
'visible': {'class': 'text-center hidden', 'orderBy': false},
'team': {'class': 'text-center w-min', 'orderBy': false},
'visible': {'class': 'text-center hidden w-min', 'orderBy': false},
'actions': {'class': 'actions alwaysVisible'},
}) %}

View File

@@ -21,9 +21,9 @@
{% set columns = {
'id': {'class': 'alwaysVisible multiCheckbox', 'orderBy': false, 'title': false, 'html_before': tables.datatable_multiupdate_all()},
'name': '',
'amount': '',
'actions': 'actions alwaysVisible',
'name': {'class': 'alwaysVisible'},
'amount': {'class': 'text-center w-min'},
'actions': {'class': 'actions alwaysVisible'},
} %}
{% set tableName = 'admin_tags' %}
@@ -38,12 +38,12 @@
<tr{% if manageAllowed %} class="modal-ajax-form open-edit" data-href="{{ path('tags_edit', {'id': tag.id}) }}"{% endif %}>
<td class="text-nowrap">{{ tables.datatable_multiupdate_row(tag.id) }}</td>
<td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'name') }}">
{{ widgets.color_dot(tag.color|default('#00a65a')) }}
{{ tag.name }}
</td>
<td>{{ widgets.label(tag.amount, type) }}</td>
<td class="actions">
<td class="{{ tables.data_table_column_class(tableName, columns, 'amount') }}">{{ widgets.label(tag.amount, type) }}</td>
<td class="{{ tables.data_table_column_class(tableName, columns, 'actions') }}">
{{ actions.tag(tag, 'index') }}
</td>
</tr>

View File

@@ -15,10 +15,10 @@
{% else %}
{% set columns = {
'name': '',
'teamlead': '',
'name': {'class': ''},
'teamlead': {'class': ''},
'user': {'class': 'hidden-xs', 'orderBy': false},
'actions': 'actions alwaysVisible',
'actions': {'class': 'actions alwaysVisible'},
} %}
{% set tableName = 'admin_teams' %}
@@ -33,7 +33,7 @@
{{ widgets.label_user(user) }}&nbsp;
{% endfor %}
</td>
<td class="actions">
<td class="{{ tables.data_table_column_class(tableName, columns, 'actions') }}">
{{ actions.team(team, 'index') }}
</td>
</tr>

View File

@@ -17,8 +17,8 @@
}) %}
{% endfor %}
{% set columns = columns|merge({
'team': {'class': 'text-center hidden-xs', 'orderBy': false},
'active': {'class': 'hidden-xs hidden', 'orderBy': false},
'team': {'class': 'text-center hidden-xs w-min', 'orderBy': false},
'active': {'class': 'hidden-xs hidden w-min', 'orderBy': false},
'actions': {'class': 'actions alwaysVisible'},
}) %}