improvements
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
{% import "AvanzuAdminThemeBundle:layout:macros.html.twig" as macro %}
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
{{ macro.avatar(user.avatar, user.username, 'user-image') }}
|
||||
<span class="hidden-xs">{{ user.name }}</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header">
|
||||
{{ macro.avatar(user.avatar, user.username) }}
|
||||
<p>
|
||||
{{user.name}} - {{user.title}}
|
||||
<small>{{ 'Member since %date%'|trans({'%date%': user.memberSince|date('m.Y') }, 'AvanzuAdminTheme') }}</small>
|
||||
</p>
|
||||
</li>
|
||||
{#
|
||||
<!-- Menu Body -->
|
||||
<li class="user-body">
|
||||
<div class="col-xs-4 text-center">
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
</div>
|
||||
</li>
|
||||
#}
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="{{ path('profile'|route_alias, {'ident' : user.identifier}) }}" class="btn btn-default btn-flat">{{'Profile'|trans({}, 'AvanzuAdminTheme')}}</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="{{ logout_path() }}" class="btn btn-default btn-flat">{{ 'Sign out'|trans({}, 'AvanzuAdminTheme') }}</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
19
app/Resources/translations/AvanzuAdminTheme.de.xliff
Normal file
19
app/Resources/translations/AvanzuAdminTheme.de.xliff
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file source-language="en" target-language="de" datatype="plaintext" original="not.available">
|
||||
<body>
|
||||
<trans-unit id="Member since %date%">
|
||||
<source>Member since %date%</source>
|
||||
<target>Mitglied seit %date%</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="Profile">
|
||||
<source>Profile</source>
|
||||
<target>Profil</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="Sign out">
|
||||
<source>Sign out</source>
|
||||
<target>Abmelden</target>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -2,6 +2,9 @@
|
||||
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<file date="2016-10-19T21:46:45Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
|
||||
<body>
|
||||
<!--
|
||||
Global template keys
|
||||
-->
|
||||
<trans-unit id="browser.title">
|
||||
<source>browser.title</source>
|
||||
<target>Kimai - Time Tracking</target>
|
||||
@@ -11,6 +14,57 @@
|
||||
<target>Kimai</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Login / Security
|
||||
-->
|
||||
<trans-unit id="security.title.login">
|
||||
<source>security.title.login</source>
|
||||
<target>Anmelden</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="security.label.username">
|
||||
<source>security.label.username</source>
|
||||
<target>Benutzername</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="security.label.password">
|
||||
<source>security.label.password</source>
|
||||
<target>Passwort</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="security.action.sign_in">
|
||||
<source>security.action.sign_in</source>
|
||||
<target>Los geht's</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Menu / Navbar items
|
||||
-->
|
||||
<trans-unit id="menu.homepage">
|
||||
<source>menu.homepage</source>
|
||||
<target>Dashboard</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="menu.admin">
|
||||
<source>menu.admin</source>
|
||||
<target>Administration</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="menu.logout">
|
||||
<source>menu.logout</source>
|
||||
<target>Abmelden</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="menu.timesheet">
|
||||
<source>menu.timesheet</source>
|
||||
<target>Zeiterfassung</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Footer
|
||||
-->
|
||||
<trans-unit id="footer.license">
|
||||
<source>footer.license</source>
|
||||
<target>Alle Rechte vorbehalten.</target>
|
||||
</trans-unit>
|
||||
|
||||
<!--
|
||||
Error templates
|
||||
-->
|
||||
<trans-unit id="http_error.name">
|
||||
<source>http_error.name</source>
|
||||
<target>Error</target>
|
||||
@@ -48,58 +102,34 @@
|
||||
<target>Error</target>
|
||||
</trans-unit>
|
||||
|
||||
<trans-unit id="action.browse_admin">
|
||||
<source>action.browse_admin</source>
|
||||
<target>Zum Backend</target>
|
||||
<!--
|
||||
General labels
|
||||
-->
|
||||
<trans-unit id="label.date">
|
||||
<source>label.date</source>
|
||||
<target>Datum</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="help.browse_admin">
|
||||
<source>help.browse_admin</source>
|
||||
<target>Zum Backend</target>
|
||||
<trans-unit id="label.starttime">
|
||||
<source>label.starttime</source>
|
||||
<target>Begin</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="action.browse_app">
|
||||
<source>action.browse_app</source>
|
||||
<target>Zum Frontend</target>
|
||||
<trans-unit id="label.endtime">
|
||||
<source>label.endtime</source>
|
||||
<target>Ende</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="help.browse_app">
|
||||
<source>help.browse_app</source>
|
||||
<target>Zum Frontend</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="title.login">
|
||||
<source>title.login</source>
|
||||
<target>Anmelden</target>
|
||||
<trans-unit id="label.duration">
|
||||
<source>label.duration</source>
|
||||
<target>Dauer</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.username">
|
||||
<source>label.username</source>
|
||||
<target>Benutzername</target>
|
||||
<target>Benutzer</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="label.password">
|
||||
<source>label.password</source>
|
||||
<target>Passwort</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="action.sign_in">
|
||||
<source>action.sign_in</source>
|
||||
<target>Los geht's</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="menu.logout">
|
||||
<source>menu.logout</source>
|
||||
<target>Abmelden</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="menu.admin">
|
||||
<source>menu.admin</source>
|
||||
<target>Backend</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="menu.timesheet">
|
||||
<source>menu.timesheet</source>
|
||||
<target>Zeiterfassung</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="kimai.license">
|
||||
<source>kimai.license</source>
|
||||
<target>Copyright Kevin Papst. Alle Rechte vorbehalten.</target>
|
||||
</trans-unit>
|
||||
<trans-unit id="kimai.footer">
|
||||
<source>kimai.footer</source>
|
||||
<target>Kimai Time-Tracking</target>
|
||||
<trans-unit id="label.description">
|
||||
<source>label.description</source>
|
||||
<target>Beschreibung</target>
|
||||
</trans-unit>
|
||||
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
|
||||
@@ -1,18 +1,68 @@
|
||||
{% extends 'AvanzuAdminThemeBundle:layout:base-layout.html.twig' %}
|
||||
{% extends 'AvanzuAdminThemeBundle:layout:default-layout.html.twig' %}
|
||||
|
||||
{% block page_content %}
|
||||
{% block main %}
|
||||
{% endblock %}
|
||||
{% block avanzu_page_content %}
|
||||
{% block main %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_document_title %}
|
||||
{% block title %}{{ 'browser.title'|trans }}{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_sidebar_search %}
|
||||
<!-- right now we simply deactivate that box -->
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_page_title %}
|
||||
{% block page_title %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_page_subtitle %}
|
||||
{% block page_subtitle %}{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_logo_path %}
|
||||
{{ path('dashboard') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_logo_mini %}
|
||||
<b>K</b>TT
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_logo_lg %}
|
||||
<b>Kimai</b> - Time Tracking
|
||||
{% endblock %}
|
||||
|
||||
{% block flash_messages %}
|
||||
{{ include('default/_flash_messages.html.twig') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block avanzu_footer %}
|
||||
{% block footer %}
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b>Version</b> 2.0
|
||||
</div>
|
||||
<strong>Copyright © {{ 'now'|date('Y') }} - <a href="http://www.kevinpapst.de">Kevin Papst</a></strong>.
|
||||
{{ 'footer.license'|trans }}
|
||||
</footer>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
{#
|
||||
<title>{% block title %}{{ 'browser.title'|trans }}{% endblock %}</title>
|
||||
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
|
||||
|
||||
avanzu_head
|
||||
avanzu_navbar_toggle
|
||||
avanzu_navbar_messages
|
||||
avanzu_navbar_notifications
|
||||
avanzu_navbar_tasks
|
||||
avanzu_navbar_user
|
||||
avanzu_navbar_control_sidebar_toggle
|
||||
avanzu_sidebar_user
|
||||
avanzu_sidebar_nav
|
||||
avanzu_breadcrumb
|
||||
avanzu_control_sidebar
|
||||
avanzu_javascripts
|
||||
avanzu_javascripts_inline
|
||||
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-globe"></i> <span class="caret"></span></a>
|
||||
@@ -23,11 +73,6 @@
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
|
||||
<p>© {{ 'now'|date('Y') }} - {{ 'kimai.footer'|trans }}</p>
|
||||
<p>{{ 'kimai.license'|trans }}</p>
|
||||
|
||||
<!-- Page rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->
|
||||
|
||||
#}
|
||||
@@ -1,7 +1,53 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
|
||||
{% block page_title %}Dashboard{% endblock %}
|
||||
{% block page_subtitle %}Welcome!{% endblock %}
|
||||
|
||||
{% 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>
|
||||
|
||||
<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') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_progress('Umsatz / Monat', '70% Increase in 30 Days', 6830, 30, 'credit-card', 'black') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_progress('Stunden persönlich', 'Das ist noch nicht genug', 135, 60, 'hourglass-o') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ 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') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Umsatz / Monat', 6830, '$', '', 'yellow') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Stunden persönlich', 135, '€', 'hourglass-o', 'red') }}
|
||||
</div>
|
||||
<div class="col-md-3 col-sm-6 col-xs-12">
|
||||
{{ widgets.info_box_more('Anzahl Benutzer', 5, '', 'user') }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
94
app/Resources/views/macros/widgets.html.twig
Normal file
94
app/Resources/views/macros/widgets.html.twig
Normal file
@@ -0,0 +1,94 @@
|
||||
|
||||
{% 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>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ title|trans }}</span>
|
||||
<span class="info-box-number">{{ amount }}</span>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_box_progress(title, description, amount, percentage, icon, color) %}
|
||||
<div class="info-box bg-{{ color|default(kimai_context.box_color) }}">
|
||||
<span class="info-box-icon"><i class="fa fa-{{ icon|default('thumbs-o-up') }}"></i></span>
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">{{ title|trans }}</span>
|
||||
<span class="info-box-number">{{ amount }}</span>
|
||||
|
||||
<div class="progress">
|
||||
<div class="progress-bar" style="width: {{ percentage }}%"></div>
|
||||
</div>
|
||||
<span class="progress-description">
|
||||
{{ description }}
|
||||
</span>
|
||||
</div>
|
||||
<!-- /.info-box-content -->
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro info_box_more(title, amount, unit, 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>
|
||||
<p>{{ title|trans }}</p>
|
||||
</div>
|
||||
<div class="icon">
|
||||
<i class="fa fa-{{ icon|default('bar-chart') }}"></i>
|
||||
</div>
|
||||
<a href="#" class="small-box-footer">
|
||||
{{ 'more.info.link'|trans }} <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -15,18 +15,18 @@
|
||||
<div class="well">
|
||||
<form action="{{ path('security_login') }}" method="post">
|
||||
<fieldset>
|
||||
<legend><i class="fa fa-lock"></i> {{ 'title.login'|trans }}</legend>
|
||||
<legend><i class="fa fa-lock"></i> {{ 'security.title.login'|trans }}</legend>
|
||||
<div class="form-group">
|
||||
<label for="username">{{ 'label.username'|trans }}</label>
|
||||
<label for="username">{{ 'security.label.username'|trans }}</label>
|
||||
<input type="text" id="username" name="_username" value="{{ last_username }}" class="form-control"/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password">{{ 'label.password'|trans }}</label>
|
||||
<label for="password">{{ 'security.label.password'|trans }}</label>
|
||||
<input type="password" id="password" name="_password" class="form-control" />
|
||||
</div>
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
<i class="fa fa-sign-in"></i> {{ 'action.sign_in'|trans }}
|
||||
<i class="fa fa-sign-in"></i> {{ 'security.action.sign_in'|trans }}
|
||||
</button>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
10
app/Resources/views/user/profile.html.twig
Normal file
10
app/Resources/views/user/profile.html.twig
Normal file
@@ -0,0 +1,10 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
{% import "macros/widgets.html.twig" as widgets %}
|
||||
|
||||
{% block page_title %}Profile{% endblock %}
|
||||
{% block page_subtitle %}manage your settings{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
{{ widgets.profile_list(user, items, 'aqua-active') }}
|
||||
{{ widgets.profile_box(user, items, 'aqua-active') }}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user