improvements
This commit is contained in:
@@ -61,6 +61,10 @@
|
||||
<source>menu.admin_activity</source>
|
||||
<target>Aktivitäten</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="menu.admin_user">
|
||||
<source>menu.admin_user</source>
|
||||
<target>Benutzer</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Footer
|
||||
@@ -181,6 +185,18 @@
|
||||
<source>dashboard.subtitle</source>
|
||||
<target>Willkommen!</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="dashboard.you">
|
||||
<source>dashboard.you</source>
|
||||
<target>Deine Statistiken</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="dashboard.all">
|
||||
<source>dashboard.all</source>
|
||||
<target>Alle Benutzer</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="dashboard.admin">
|
||||
<source>dashboard.admin</source>
|
||||
<target>Administrator</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Widgets
|
||||
@@ -210,6 +226,18 @@
|
||||
<target>Verwalten Sie Ihre Zeiteinträge</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
User profile
|
||||
-->
|
||||
<trans-unit id="profile.title">
|
||||
<source>profile.title</source>
|
||||
<target>Benutzerprofil</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="profile.subtitle">
|
||||
<source>profile.subtitle</source>
|
||||
<target>Verwalte Deine Einstellungen</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Admin: Timesheet
|
||||
-->
|
||||
@@ -245,6 +273,80 @@
|
||||
<source>admin_activity.subtitle</source>
|
||||
<target>Aufgaben zur Zeiterfassung</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Admin: User
|
||||
-->
|
||||
<trans-unit id="admin_user.title">
|
||||
<source>admin_user.title</source>
|
||||
<target>Benutzer</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="admin_user.subtitle">
|
||||
<source>admin_user.subtitle</source>
|
||||
<target>Alle registrierten Nutzer</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.alias">
|
||||
<source>label.alias</source>
|
||||
<target>Name</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.email">
|
||||
<source>label.email</source>
|
||||
<target>Email</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.title">
|
||||
<source>label.title</source>
|
||||
<target>Titel</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.active">
|
||||
<source>label.active</source>
|
||||
<target>Aktiv</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.roles">
|
||||
<source>label.roles</source>
|
||||
<target>Rolle</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
ROLES
|
||||
-->
|
||||
<trans-unit id="ROLE_ADMIN">
|
||||
<source>ROLE_ADMIN</source>
|
||||
<target>Administrator</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ROLE_TEAMLEAD">
|
||||
<source>ROLE_TEAMLEAD</source>
|
||||
<target>Teamleiter</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ROLE_USER">
|
||||
<source>ROLE_USER</source>
|
||||
<target>Benutzer</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="ROLE_CUSTOMER">
|
||||
<source>ROLE_CUSTOMER</source>
|
||||
<target>Kunde</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Statistics
|
||||
-->
|
||||
<trans-unit id="stats.durationThisMonth">
|
||||
<source>stats.durationThisMonth</source>
|
||||
<target>Arbeitszeit diesen Monat</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="stats.amountThisMonth">
|
||||
<source>stats.amountThisMonth</source>
|
||||
<target>Umsatz diesen Monat</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="stats.durationTotal">
|
||||
<source>stats.durationTotal</source>
|
||||
<target>Arbeitszeit total</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="stats.amountTotal">
|
||||
<source>stats.amountTotal</source>
|
||||
<target>Umsatz total</target>
|
||||
</trans-unit>
|
||||
|
||||
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
||||
37
app/Resources/views/admin/user.html.twig
Normal file
37
app/Resources/views/admin/user.html.twig
Normal file
@@ -0,0 +1,37 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% import "macros/datatables.html.twig" as tables %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
|
||||
|
||||
{% block page_title %}{{ 'admin_user.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'admin_user.subtitle'|trans }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{% if entries.count > 0 %}
|
||||
{{ tables.data_table_header({
|
||||
'label.id': '',
|
||||
'label.username': 'user',
|
||||
'label.alias': 'comment-o',
|
||||
'label.email': 'envelope-o',
|
||||
'label.title': 'graduation-cap',
|
||||
'label.active': 'lock',
|
||||
'label.roles': 'users',
|
||||
}) }}
|
||||
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td>{{ entry.id }}</td>
|
||||
<td>{{ entry.username }}</td>
|
||||
<td>{{ entry.alias }}</td>
|
||||
<td>{{ entry.email }}</td>
|
||||
<td>{{ entry.title }}</td>
|
||||
<td>{{ widgets.label_visible(entry.active) }}</td>
|
||||
<td>{{ entry.roles|join(',')|trans }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{{ tables.data_table_footer(entries, 'admin_user_paginated') }}
|
||||
{% else %}
|
||||
{{ widgets.callout('warning', 'error.no_entries_found') }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -36,6 +36,25 @@
|
||||
{{ include('default/_flash_messages.html.twig') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_head %}
|
||||
<link rel="stylesheet" href="{{ asset('css/kimai.css') }}">
|
||||
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
|
||||
<script src="{{ asset('js/kimai.js') }}"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$(document).kimai({imagePath: '{{ asset('images') }}'});
|
||||
$(document).kimai('ticktac', 'a#ticktac');
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_sidebar_user %}
|
||||
{% if app.user is not null and is_granted('IS_AUTHENTICATED_FULLY') %}
|
||||
{{ render(controller('TimesheetBundle:Timesheet:statusEntry')) }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_footer %}
|
||||
{% block footer %}
|
||||
<footer class="main-footer">
|
||||
@@ -49,8 +68,6 @@
|
||||
{% endblock %}
|
||||
|
||||
{#
|
||||
|
||||
avanzu_head
|
||||
avanzu_navbar_toggle
|
||||
avanzu_navbar_messages
|
||||
avanzu_navbar_notifications
|
||||
|
||||
@@ -6,21 +6,10 @@
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Bla blub', 300, 'bar-chart', 'blue') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Steigerungsrate', 80, 'line-chart', 'red') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Anzahl Tage', 27, 'calendar', 'yellow') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Stunden total / Monat', 460, 'clock-o', 'green') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# FIXME Übersetzungen hinzufügen #}
|
||||
{# blue / yellow / purple / green / black #}
|
||||
{# bar-chart / line-chart / calendar / clock-o #}
|
||||
{#
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_progress('Bewilligte Stunden', 'Stunden zur Abrechnung bewilligt', 120, 10, 'star-o') }}
|
||||
@@ -35,19 +24,79 @@
|
||||
{{ widgets.info_box_progress('Anzahl Benutzer', 'Mehr ist besser!', 5, 90, 'user') }}
|
||||
</div>
|
||||
</div>
|
||||
#}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Bewilligte Stunden', 120, 'h', 'star-o', 'purple') }}
|
||||
{% if is_granted('ROLE_USER') %}
|
||||
{{ widgets.page_header('dashboard.you') }}
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('stats.durationThisMonth', timesheetUser.durationThisMonth|duration(true), 'hourglass-o', 'blue') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('stats.amountThisMonth', timesheetUser.amountThisMonth|money, 'money', 'green') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('stats.durationTotal', timesheetUser.durationTotal|duration(true), 'hourglass-o', 'yellow') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('stats.amountTotal', timesheetUser.amountTotal|money, 'money', 'red') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Umsatz / Monat', 6830, '$', '', 'yellow') }}
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_TEAMLEAD') %}
|
||||
{{ widgets.page_header('dashboard.all') }}
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Arbeitszeit diesen Monat', timesheetGlobal.durationThisMonth|duration(true), 'hourglass-o', 'blue') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Umsatz diesen Monat', timesheetGlobal.amountThisMonth|money, 'money', 'green') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Arbeitszeit total', timesheetGlobal.durationTotal|duration(true), 'hourglass-o', 'yellow') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Umsatz total', timesheetGlobal.amountTotal|money, 'money', 'red') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Stunden persönlich', 135, '€', 'hourglass-o', 'red') }}
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_TEAMLEAD') %}
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Anzahl Benutzer', user.totalAmount, 'users', 'blue') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Aktive Benutzer diesen Monat', timesheetGlobal.activeThisMonth, 'users', 'yellow') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Aktive Benutzer jemals', timesheetGlobal.activeTotal, 'users', 'red') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_counter('Momentan aktiv', timesheetGlobal.activeCurrently, 'users', 'green') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Anzahl Benutzer', 5, '', 'user') }}
|
||||
{% endif %}
|
||||
|
||||
{% if is_granted('ROLE_ADMIN') %}
|
||||
{{ widgets.page_header('dashboard.admin') }}
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Anzahl Aktivitäten', activity.totalAmount, '', path('admin_activity'), 'tasks', 'purple') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Anzahl Projekte', project.totalAmount, '', path('admin_project'), 'book', 'yellow') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Anzahl Benutzer', user.totalAmount, ' ', path('admin_user'), 'users') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{# FIXME #}
|
||||
{{ widgets.info_box_more('Momentan aktiv', timesheetGlobal.activeCurrently, '', '#', 'hourglass-o', 'red') }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
53
app/Resources/views/macros/datatables.html.twig
Normal file
53
app/Resources/views/macros/datatables.html.twig
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
{% macro data_table_header(entries) %}
|
||||
<div class="box">
|
||||
{# <div class="box-header">
|
||||
<h3 class="box-title">Hover Data Table</h3>
|
||||
</div> #}
|
||||
<div class="box-body no-padding">
|
||||
<div class="dataTables_wrapper form-inline dt-bootstrap">
|
||||
<div class="row">
|
||||
<div class="col-sm-6"></div>
|
||||
<div class="col-sm-6"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="table table-striped table-hover dataTable" role="grid">
|
||||
<thead>
|
||||
<tr>
|
||||
{% for title, icon in entries %}
|
||||
<th>
|
||||
{% if kimai_context.table_icons and icon %}<i class="fa fa-{{ icon }}"></i>{% endif %}
|
||||
{{ title|trans }}
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro data_table_footer(entries, route) %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{#<div class="row">
|
||||
<div class="col-sm-5">
|
||||
{#<div class="dataTables_info" id="example2_info" role="status" aria-live="polite">
|
||||
{{ 'datatables.entry_counter'|trans({'%from%': '1', '%to%': '10', '%total%': entries.count}) }}
|
||||
</div># }
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
<div class="dataTables_paginate paging_simple_numbers">
|
||||
{{ pagerfanta(entries, 'twitter_bootstrap3_translated', { routeName: route }) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>#}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="navigation text-center">
|
||||
{{ pagerfanta(entries, 'twitter_bootstrap3_translated', { routeName: route }) }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -1,10 +1,14 @@
|
||||
|
||||
{% macro badge_visible(visible) %}
|
||||
{% macro page_header(title) %}
|
||||
<h2 class="page-header">{{ title|trans }}</h2>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro label_visible(visible) %}
|
||||
{% import _self as macro %}
|
||||
{% if visible %}
|
||||
{{ macro.badge('badge.visible', 'green') }}
|
||||
{{ macro.label('badge.visible', 'success') }}
|
||||
{% else %}
|
||||
{{ macro.badge('badge.invisible', 'red') }}
|
||||
{{ macro.label('badge.invisible', 'warning') }}
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
@@ -16,7 +20,13 @@
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro label(title, type) %}
|
||||
{# success, warning, danger, primary #}
|
||||
<span class="label label-{{ type|default('success') }}">{{ title|trans }}</span>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro badge(title, color) %}
|
||||
{# black, green, blue, yellow #}
|
||||
<span class="badge bg-{{ color|default('red') }}">{{ title|trans }}</span>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -35,55 +45,6 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro profile_list(user, items, color) %}
|
||||
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
|
||||
<div class="box box-widget widget-user-2">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<div class="widget-user-image">
|
||||
{{ macro.avatar(user.avatar, user.username) }}
|
||||
</div>
|
||||
<!-- /.widget-user-image -->
|
||||
<h3 class="widget-user-username">{{ user.alias }} ({{ user.username }})</h3>
|
||||
<h5 class="widget-user-desc">{{ user.title }}</h5>
|
||||
</div>
|
||||
<div class="box-footer no-padding">
|
||||
<ul class="nav nav-stacked">
|
||||
{% for entry in items %}
|
||||
<li><a href="{{ entry.url }}">{{ entry.title|trans }} <span class="pull-right badge bg-{{ entry.color }}">{{ entry.amount }}</span></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro profile_box(user, items) %}
|
||||
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
|
||||
|
||||
<div class="box box-widget widget-user">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<h3 class="widget-user-username">{{ user.alias }} ({{ user.username }})</h3>
|
||||
<h5 class="widget-user-desc">{{ user.title }}</h5>
|
||||
</div>
|
||||
<div class="widget-user-image">
|
||||
{{ macro.avatar(user.avatar, user.username) }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
{% for entry in items|slice(0, 3) %}
|
||||
<div class="col-sm-4 border-right">
|
||||
<div class="description-block">
|
||||
<h5 class="description-header">{{ entry.amount }}</h5>
|
||||
<span class="description-text">{{ entry.title|trans }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_box_counter(title, amount, icon, color) %}
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-{{ color|default(kimai_context.box_color) }}"><i class="fa fa-{{ icon|default('flag-o') }}"></i></span>
|
||||
@@ -114,16 +75,16 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_box_more(title, amount, unit, icon, color) %}
|
||||
{% macro info_box_more(title, amount, unit, url, icon, color) %}
|
||||
<div class="small-box bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<div class="inner">
|
||||
<h3>{{ amount }}<sup style="font-size: 20px">{{ unit|default('%') }}</sup></h3>
|
||||
<h3>{{ amount }}<sup style="font-size: 20px">{{ unit|default('') }}</sup></h3>
|
||||
<p>{{ title|trans }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-{{ icon|default('bar-chart') }}"></i>
|
||||
</div>
|
||||
<a href="#" class="small-box-footer">
|
||||
<a href="{{ url }}" class="small-box-footer">
|
||||
{{ 'more.info.link'|trans }} <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,81 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
|
||||
{% block page_title %}Profile{% endblock %}
|
||||
{% block page_subtitle %}manage your settings{% endblock %}
|
||||
{% block page_title %}{{ 'profile.title'|trans }}{% endblock %}
|
||||
{% block page_subtitle %}{{ 'profile.subtitle'|trans }}{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{{ widgets.profile_list(user, items, 'aqua-active') }}
|
||||
{{ widgets.profile_box(user, items, 'aqua-active') }}
|
||||
{% endblock %}
|
||||
{% import _self as widgets %}
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-12 col-xs-12">
|
||||
{{ widgets.profile_list(user, settings, 'aqua-active') }}
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 col-xs-12">
|
||||
{{ widgets.profile_box(user, stats, 'aqua-active') }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% macro profile_list(user, items, color) %}
|
||||
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
|
||||
<div class="box box-widget widget-user-2">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<div class="widget-user-image">
|
||||
{{ macro.avatar(user.avatar, user.username) }}
|
||||
</div>
|
||||
<!-- /.widget-user-image -->
|
||||
<h3 class="widget-user-username">{{ user.alias }} ({{ user.username }})</h3>
|
||||
<h5 class="widget-user-desc">{{ user.title }}</h5>
|
||||
</div>
|
||||
<div class="box-footer no-padding">
|
||||
<ul class="nav nav-stacked">
|
||||
{% for entry in items %}
|
||||
<li><a href="{{ entry.url }}">{{ entry.title|trans }} <span class="pull-right badge bg-{{ entry.color }}">{{ entry.value }}</span></a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro profile_box(user, stats, color) %}
|
||||
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
|
||||
|
||||
<div class="box box-widget widget-user">
|
||||
<!-- Add the bg color to the header using any of the bg-* classes -->
|
||||
<div class="widget-user-header bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<h3 class="widget-user-username">{{ user.alias }} ({{ user.username }})</h3>
|
||||
<h5 class="widget-user-desc">{{ user.title }}</h5>
|
||||
</div>
|
||||
<div class="widget-user-image">
|
||||
{{ macro.avatar(user.avatar, user.username) }}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-3 border-right">
|
||||
<div class="description-block">
|
||||
<h5 class="description-header">{{ stats.durationTotal|duration }}</h5>
|
||||
<span class="description-text">{{ 'stats.durationTotal'|trans }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 border-right">
|
||||
<div class="description-block">
|
||||
<h5 class="description-header">{{ stats.amountTotal|money }}</h5>
|
||||
<span class="description-text">{{ 'stats.amountTotal'|trans }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 border-right">
|
||||
<div class="description-block">
|
||||
<h5 class="description-header">{{ stats.durationThisMonth|duration }}</h5>
|
||||
<span class="description-text">{{ 'stats.durationThisMonth'|trans }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 border-right">
|
||||
<div class="description-block">
|
||||
<h5 class="description-header">{{ stats.amountThisMonth|money }}</h5>
|
||||
<span class="description-text">{{ 'stats.amountThisMonth'|trans }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -61,6 +61,7 @@ twig:
|
||||
kimai_context:
|
||||
date_1: "d.m.Y" # used for display in timesheets
|
||||
box_color: "green"
|
||||
table_icons: false
|
||||
|
||||
# Assetic Configuration (used for managing web assets: CSS, JavaScript, Sass, etc.)
|
||||
assetic:
|
||||
|
||||
Reference in New Issue
Block a user