removed setting for table icons and improved responsivness by hiding several columns on small screens

This commit is contained in:
Kevin Papst
2018-01-01 16:27:33 +01:00
parent 2f09ea7c74
commit 588c0b85ed
7 changed files with 59 additions and 61 deletions

View File

@@ -9,23 +9,23 @@
{% block main %} {% block main %}
{% if entries.count > 0 %} {% if entries.count > 0 %}
{{ tables.data_table_header({ {{ tables.data_table_header({
'label.id': '', 'label.id': 'hidden-xs',
'label.alias': 'bookmark-o', 'label.alias': '',
'label.username': 'user', 'label.username': 'hidden-xs',
'label.email': 'envelope-o', 'label.email': 'hidden-xs hidden-sm',
'label.title': 'graduation-cap', 'label.title': 'hidden-xs',
'label.active': 'lock', 'label.active': '',
'label.roles': 'users', 'label.roles': '',
'label.actions': 'pencil-square-o', 'label.actions': '',
}) }} }) }}
{% for entry in entries %} {% for entry in entries %}
<tr> <tr>
<td>{{ entry.id }}</td> <td class="hidden-xs">{{ entry.id }}</td>
<td>{{ entry.alias }}</td> <td>{{ entry.alias }}</td>
<td>{{ entry.username }}</td> <td class="hidden-xs">{{ entry.username }}</td>
<td>{{ entry.email }}</td> <td class="hidden-xs hidden-sm">{{ entry.email }}</td>
<td>{{ entry.title }}</td> <td class="hidden-xs">{{ entry.title }}</td>
<td>{{ widgets.label_visible(entry.active) }}</td> <td>{{ widgets.label_visible(entry.active) }}</td>
<td>{{ entry.roles|join(',')|trans }}</td> <td>{{ entry.roles|join(',')|trans }}</td>
<td> <td>

View File

@@ -26,9 +26,8 @@
<table class="table table-striped table-hover dataTable" role="grid"> <table class="table table-striped table-hover dataTable" role="grid">
<thead> <thead>
<tr> <tr>
{% for title, icon in entries %} {% for title, class in entries %}
<th> <th{% if class %} class="{{ class }}"{% endif %}>
{% if kimai_context.table_icons and icon %}<i class="fa fa-{{ icon }}"></i>{% endif %}
{{ title|trans }} {{ title|trans }}
</th> </th>
{% endfor %} {% endfor %}

View File

@@ -61,7 +61,6 @@ twig:
kimai_context: kimai_context:
date_1: "d.m.Y" # used for display in timesheets date_1: "d.m.Y" # used for display in timesheets
box_color: "green" box_color: "green"
table_icons: false
# Assetic Configuration (used for managing web assets: CSS, JavaScript, Sass, etc.) # Assetic Configuration (used for managing web assets: CSS, JavaScript, Sass, etc.)
#assetic: #assetic:

View File

@@ -10,20 +10,20 @@
{% if entries.count > 0 %} {% if entries.count > 0 %}
{{ tables.data_table_header({ {{ tables.data_table_header({
'label.id': '', 'label.id': 'hidden-xs',
'label.name': 'bookmark-o', 'label.name': '',
'label.project': 'book', 'label.project': '',
'label.comment': 'comment-o', 'label.comment': 'hidden-xs',
'label.visible': 'eye', 'label.visible': '',
'label.actions': 'pencil-square-o', 'label.actions': '',
}) }} }) }}
{% for entry in entries %} {% for entry in entries %}
<tr> <tr>
<td>{{ entry.id }}</td> <td class="hidden-xs">{{ entry.id }}</td>
<td>{{ entry.name }}</td> <td>{{ entry.name }}</td>
<td>{{ entry.project }}</td> <td>{{ entry.project }}</td>
<td>{{ entry.comment }}</td> <td class="hidden-xs">{{ entry.comment }}</td>
<td>{{ widgets.label_visible(entry.visible) }}</td> <td>{{ widgets.label_visible(entry.visible) }}</td>
<td> <td>
{{ widgets.button_group({ {{ widgets.button_group({

View File

@@ -10,24 +10,24 @@
{% if entries.count > 0 %} {% if entries.count > 0 %}
{{ tables.data_table_header({ {{ tables.data_table_header({
'label.id': '', 'label.id': 'hidden-xs',
'label.name': 'bookmark-o', 'label.name': '',
'label.customer': 'address-card-o', 'label.customer': '',
'label.comment': 'comment-o', 'label.comment': 'hidden-xs hidden-sm',
'label.activity': 'tasks', 'label.activity': 'hidden-xs hidden-sm',
'label.budget': 'credit-card', 'label.budget': 'hidden-xs',
'label.visible': 'eye', 'label.visible': '',
'label.actions': 'pencil-square-o', 'label.actions': '',
}) }} }) }}
{% for entry in entries %} {% for entry in entries %}
<tr> <tr>
<td>{{ entry.id }}</td> <td class="hidden-xs">{{ entry.id }}</td>
<td>{{ entry.name }}</td> <td>{{ entry.name }}</td>
<td>{{ entry.customer.name }}</td> <td>{{ entry.customer.name }}</td>
<td>{{ entry.comment }}</td> <td class="hidden-xs hidden-sm">{{ entry.comment }}</td>
<td>{{ widgets.badge_counter(entry.activities.count) }}</td> <td class="hidden-xs hidden-sm">{{ widgets.badge_counter(entry.activities.count) }}</td>
<td>{{ entry.budget|money(entry.currency) }}</td> <td class="hidden-xs">{{ entry.budget|money(entry.currency) }}</td>
<td>{{ widgets.label_visible(entry.visible) }}</td> <td>{{ widgets.label_visible(entry.visible) }}</td>
<td> <td>
{{ widgets.button_group({ {{ widgets.button_group({

View File

@@ -8,31 +8,31 @@
{% block main %} {% block main %}
{% if entries.count > 0 %} {% if entries.count > 0 %}
{{ datatables.data_table_header({ {{ datatables.data_table_header({
'label.date': 'calendar', 'label.date': '',
'label.starttime': 'hourglass-start', 'label.starttime': 'hidden-xs',
'label.endtime': 'hourglass-end', 'label.endtime': 'hidden-xs',
'label.duration': 'clock-o', 'label.duration': '',
'label.rate': 'money', 'label.rate': '',
'label.username': 'user', 'label.username': 'hidden-xs',
'label.description': 'comment-o', 'label.description': 'hidden-xs hidden-sm',
'label.actions': 'pencil-square-o', 'label.actions': '',
}) }} }) }}
{% for entry in entries %} {% for entry in entries %}
<tr> <tr>
<td>{{ entry.begin|date(kimai_context.date_1) }}</td> <td>{{ entry.begin|date(kimai_context.date_1) }}</td>
<td>{{ entry.begin|date("H:i") }}</td> <td class="hidden-xs">{{ entry.begin|date("H:i") }}</td>
{% if entry.end %} {% if entry.end %}
<td>{{ entry.end|date("H:i") }}</td> <td class="hidden-xs">{{ entry.end|date("H:i") }}</td>
<td>{{ entry.duration|duration }}</td> <td>{{ entry.duration|duration }}</td>
<td>{{ entry.rate|money }}</td> <td>{{ entry.rate|money }}</td>
{% else %} {% else %}
<td>&dash;</td> <td class="hidden-xs">&dash;</td>
<td>&dash;</td> <td>&dash;</td>
<td>&dash;</td> <td>&dash;</td>
{% endif %} {% endif %}
<td><a href="{{ path('profile'|route_alias, {'username' : entry.user.username}) }}">{{ entry.user.username }}</a></td> <td class="hidden-xs"><a href="{{ path('profile'|route_alias, {'username' : entry.user.username}) }}">{{ entry.user.username }}</a></td>
<td>{{ entry.description }}</td> <td class="hidden-xs hidden-sm">{{ entry.description }}</td>
<td> <td>
{{ widgets.button_group({'edit': '#', 'trash': '#'}) }} {{ widgets.button_group({'edit': '#', 'trash': '#'}) }}
</td> </td>

View File

@@ -8,13 +8,13 @@
{% block main %} {% block main %}
{% if entries.count > 0 %} {% if entries.count > 0 %}
{{ datatables.data_table_header({ {{ datatables.data_table_header({
'label.date': 'calendar', 'label.date': '',
'label.starttime': 'hourglass-start', 'label.starttime': '',
'label.endtime': 'hourglass-end', 'label.endtime': '',
'label.duration': 'clock-o', 'label.duration': 'hidden-xs',
'label.rate': 'money', 'label.rate': 'hidden-xs',
'label.description': 'comment-o', 'label.description': 'hidden-xs hidden-sm',
'label.actions': 'pencil-square-o', 'label.actions': '',
}) }} }) }}
{% for entry in entries %} {% for entry in entries %}
@@ -23,14 +23,14 @@
<td>{{ entry.begin|date("H:i") }}</td> <td>{{ entry.begin|date("H:i") }}</td>
{% if entry.end %} {% if entry.end %}
<td>{{ entry.end|date("H:i") }}</td> <td>{{ entry.end|date("H:i") }}</td>
<td>{{ entry.duration|duration }}</td> <td class="hidden-xs">{{ entry.duration|duration }}</td>
<td>{{ entry.rate|money }}</td> <td class="hidden-xs">{{ entry.rate|money }}</td>
{% else %} {% else %}
<td>&dash;</td> <td>&dash;</td>
<td>&dash;</td> <td class="hidden-xs">&dash;</td>
<td>&dash;</td> <td class="hidden-xs">&dash;</td>
{% endif %} {% endif %}
<td>{{ entry.description }}</td> <td class="hidden-xs hidden-sm">{{ entry.description }}</td>
<td> <td>
{{ widgets.button_group({'repeat': '#', 'edit': '#', 'trash': '#'}) }} {{ widgets.button_group({'repeat': '#', 'edit': '#', 'trash': '#'}) }}
</td> </td>