Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated to AdminLTEBundle 1.0 #206

Merged
merged 3 commits into from
Jul 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,22 @@ Kimai v2 - the open source time-tracking application with a mobile-first approac
## Introduction

This is the reloaded version of the open source timetracker Kimai.
Kimai v2 has nothing in common with its predecessor [Kimai v1](http://www.kimai.org) besides the basic ideas of time-tracking and the current development team.

Right now its in an early development phase, its usable but some advanced features from Kimai v1 are missing by now.

Kimai v2 has nothing in common with its predecessor [Kimai v1](http://www.kimai.org) besides the basic ideas of time-tracking and the current development team.
It is based on a lot of great frameworks. Special thanks to [Symfony v4](https://github.com/symfony/symfony), [Doctrine](https://github.com/doctrine/),
[AdminThemeBundle](https://github.com/avanzu/AdminThemeBundle/) (based on [AdminLTE](https://github.com/almasaeed2010/AdminLTE/)).
It is developed with modern frameworks like [Symfony v4](https://github.com/symfony/symfony), [Doctrine](https://github.com/doctrine/),
[AdminLTE](https://github.com/kevinpapst/AdminLTEBundle/) and [many](composer.json) [more](package.json)...

### Requirements

- PHP 7.1.3 or higher
- One PHP extension of [PDO-SQLite](https://php.net/manual/en/ref.pdo-sqlite.php) or [PDO-MySQL](https://php.net/manual/en/ref.pdo-mysql.php) enabled (it might work with PostgreSQL and Oracle as well, but that wasn't tested and is not officially supported)
- The PHP extension [intl](https://php.net/manual/en/book.intl.php)
- the [usual Symfony application requirements](http://symfony.com/doc/current/reference/requirements.html)
- The [usual Symfony application requirements](http://symfony.com/doc/current/reference/requirements.html)
- If you use MariaDB, make sure its at least v10.7.2 (see #191)
- Kimai needs to be installed in the root directory of a domain or you need to [recompile the frontend assets](var/docs/developers.md)
- a modern browser, Kimai v2 might be broken on old browsers like IE 9
- A modern browser, Kimai v2 might be broken on old browsers like IE 9

## Documentation & Roadmap

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ext-pdo_sqlite": "*",
"beberlei/DoctrineExtensions": "^1.0",
"erusev/parsedown": "^1.6",
"kevinpapst/adminlte-bundle": "^0.3.0",
"kevinpapst/adminlte-bundle": "^1.0",
"ocramius/proxy-manager": "2.1.1",
"sensio/framework-extra-bundle": "^5.1",
"symfony/asset": "^4.0",
Expand Down
40 changes: 17 additions & 23 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/packages/admin_lte.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ admin_lte:

routes:
adminlte_profile: user_profile
adminlte_welcome: dashboard
adminlte_login: security_login
23 changes: 10 additions & 13 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{% extends '@AdminLTE/layout/default-layout.html.twig' %}

{% block avanzu_page_content_class %}{{ parent() }} {% block main_content_class %}{% endblock %}{% endblock %}
{% extends '@AdminLTE/layout/default-layout-avanzu.html.twig' %}

{% block avanzu_page_content_before %}
<div class="pad no-print">
Expand All @@ -13,7 +11,6 @@
{% endblock %}

{% block avanzu_page_content %}
{{ include('default/_flash_messages.html.twig') }}
{% block main %}{% endblock %}
{% endblock %}

Expand All @@ -29,8 +26,6 @@
{% block page_subtitle %}{% endblock %}
{% endblock %}

{% block avanzu_logo_path %}{{ path('dashboard') }}{% endblock %}

{% block avanzu_logo_mini %}
<b>K</b>TT
{% endblock %}
Expand Down Expand Up @@ -74,28 +69,30 @@
{% endif %}
{% endblock %}

{% block avanzu_navbar_toggle %}{{ parent() }}{% endblock %}
{% block avanzu_navbar_tasks %}{#{ parent() }#}{% endblock %}
{% block avanzu_navbar_user %}{#{ parent() }#}{% endblock %}
{% block avanzu_navbar_control_sidebar_toggle %}{{ parent() }}{% endblock %}

{% block avanzu_sidebar_user %}{# right now we simply deactivate that box #}{% endblock %}
{% block avanzu_sidebar_search %}{# right now we simply deactivate that box #}{% endblock %}
{% block avanzu_sidebar_nav %}{{ parent() }}{% endblock %}

{% block avanzu_breadcrumb %}
{{ block('page_actions') }}
{% endblock %}

{% block page_actions %}{% endblock %}

{% block avanzu_control_sidebar %}{{ parent() }}{% endblock %}
{% block stylesheets %}
{# we do not call parent() as we use a custom built for the frontend assets and don't want the default <stylesheet> #}
<link rel="stylesheet" href="{{ asset('build/app.css') }}">
{% endblock %}

{% block avanzu_javascripts %}
{% block javascript_imports %}{% endblock %}
{% block head %}
{{ parent() }}
<script src="{{ asset('build/app.js') }}"></script>
{% endblock %}

{% block avanzu_javascripts_inline %}
{% block javascripts %}
{# we do not call parent() as we use a custom built for the frontend assets and don't want the default <script> #}
<script type="text/javascript">
$(document).ready(function () {
$.kimai.init({imagePath: '{{ asset('images') }}', confirmDelete: '{{ 'confirm.delete'|trans }}'});
Expand Down
2 changes: 1 addition & 1 deletion templates/dashboard/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% block page_title %}{{ 'dashboard.title'|trans }}{% endblock %}
{% block page_subtitle %}{{ 'dashboard.subtitle'|trans }}{% endblock %}

{% block main_content_class %}dashboard{% endblock %}
{% block page_content_class %}{{ parent() }} dashboard{% endblock %}

{% block main %}

Expand Down
9 changes: 0 additions & 9 deletions templates/default/_flash_messages.html.twig

This file was deleted.

2 changes: 1 addition & 1 deletion templates/invoice/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% block page_subtitle %}{{ 'invoice.subtitle'|trans }}{% endblock %}
{% block page_actions %}{{ widgets.page_actions({'filter': '#collapseInvoice', 'create': path('admin_invoice_template_create'), 'list': path('admin_invoice_template')}) }}{% endblock %}

{% block main_content_class %}invoice{% endblock %}
{% block page_content_class %}{{ parent() }} invoice{% endblock %}

{% block main_before %}
{{ toolbar.toolbar(form, 'collapseInvoice', true) }}
Expand Down
90 changes: 11 additions & 79 deletions templates/security/login.html.twig
Original file line number Diff line number Diff line change
@@ -1,82 +1,14 @@
<!DOCTYPE html{% block avanzu_html_start %}{% endblock %}>
<html>
<head>
{% include('@AdminLTE/Partials/_head.html.twig') %}
<title>{{ 'browser.title'|trans }}</title>
</head>
<body{% block avanzu_body_start %}{% endblock %} class="hold-transition login-page">
{% block avanzu_after_body_start %}{% endblock %}
{% block avanzu_login_box %}
<div class="login-box">
<div class="login-logo">
<a href="{{ path('homepage') }}"><b>Kimai</b><br>TimeTracking</a>
</div>
<div class="login-box-body">
<p class="login-box-msg">
{{ 'security.title.login'|trans }}
{% extends '@AdminLTE/layout/login-layout.html.twig' %}

{% if error|default(false) %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
</p>
{% block login_social_auth %}{% endblock %}
{% block login_actions %}{% endblock %}
{% block logo_login %}<b>Kimai</b><br>TimeTracking{% endblock %}

{% block avanzu_login_form %}
<form action="{{ path('security_login') }}" method="post">
<div class="form-group has-feedback">
<input type="text" name="_username" class="form-control" placeholder="{{ 'label.username'|trans }}" value="{{ last_username }}">
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input name="_password" type="password" class="form-control" placeholder="{{ 'label.password'|trans }}">
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
<div class="checkbox icheck">
<label>
<input id="remember_me" name="_remember_me" type="checkbox">
<label for="remember_me">{{ 'Remember Me'|trans({}, 'AvanzuAdminTheme') }}</label>
</label>
</div>
</div>
<div class="col-xs-4">
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ 'action.sign_in'|trans }}</button>
</div>
</div>
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
</form>
{% endblock %}
{#% block avanzu_login_social_auth %}
<div class="social-auth-links text-center">
<p>{{ '- OR -'|trans({}, 'AvanzuAdminTheme') }}</p>
<a href="#" class="btn btn-block btn-social btn-facebook btn-flat"><i class="fa fa-facebook"></i>
{{ 'Sign in using Facebook'|trans({}, 'AvanzuAdminTheme') }}
</a>
<a href="#" class="btn btn-block btn-social btn-google btn-flat"><i class="fa fa-google-plus"></i>
{{ 'Sign in usingGoogle+'|trans({}, 'AvanzuAdminTheme') }}
</a>
</div>
{% endblock %}
{% block avanzu_login_actions %}
<a href="#">
{{ 'I forgot my password'|trans({}, 'AvanzuAdminTheme') }}
</a>
<br>
<a href="register.html" class="text-center">
{{ 'Register a new membership'|trans({}, 'AvanzuAdminTheme') }}
</a>
{% endblock %#}
</div>
</div>
{% block stylesheets %}
{# we do not call parent() as we use a custom built for the frontend assets and don't want the default <stylesheet> #}
<link rel="stylesheet" href="{{ asset('build/app.css') }}">
{% endblock %}

{% block login_form_end %}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"/>
{% endblock %}
<script>
$(function () {
$('input').iCheck({
checkboxClass: 'icheckbox_square-blue',
radioClass: 'iradio_square-blue',
increaseArea: '20%' // optional
});
});
</script>
</body>
</html>
2 changes: 2 additions & 0 deletions templates/user/profile.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<canvas id="barChart{{ year }}" style="height: 230px;"></canvas>
</div>
<script type="text/javascript">
$(document).ready(function () {
var barChartData{{ year }} = {
labels: barChartLabels,
datasets: [
Expand Down Expand Up @@ -89,6 +90,7 @@
var barChart = new Chart(barChartCanvas{{ year }});
barChart.Bar(barChartData{{ year }}, barChartOptions);
});
});
</script>
{% endfor %}

Expand Down
31 changes: 31 additions & 0 deletions translations/AdminLTEBundle.de.xliff
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file date="2017-01-12T20:00:00Z" source-language="en" target-language="de" datatype="plaintext" original="AdminLTEBundle.en.xliff">
<body>
<trans-unit id="Toggle navigation">
<source>Toggle navigation</source>
<target>Ansicht der Seitenleiste umschalten</target>
</trans-unit>
<trans-unit id="Remember Me">
<source>Remember Me</source>
<target>Dauerhaft anmelden</target>
</trans-unit>
<trans-unit id="Sign in to start your session">
<source>Sign in to start your session</source>
<target>Anmelden</target>
</trans-unit>
<trans-unit id="Sign In">
<source>Sign In</source>
<target>Anmelden</target>
</trans-unit>
<trans-unit id="Username">
<source>Username</source>
<target>Benutzername</target>
</trans-unit>
<trans-unit id="Password">
<source>Password</source>
<target>Passwort</target>
</trans-unit>
</body>
</file>
</xliff>
31 changes: 31 additions & 0 deletions translations/AdminLTEBundle.en.xliff
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file date="2017-01-12T20:00:00Z" source-language="en" target-language="en" datatype="plaintext" original="none">
<body>
<trans-unit id="Toggle navigation">
<source>Toggle navigation</source>
<target>Toggle navigation</target>
</trans-unit>
<trans-unit id="Remember Me">
<source>Remember Me</source>
<target>Remember Me</target>
</trans-unit>
<trans-unit id="Sign in to start your session">
<source>Sign in to start your session</source>
<target>Login</target>
</trans-unit>
<trans-unit id="Sign In">
<source>Sign In</source>
<target>Login</target>
</trans-unit>
<trans-unit id="Username">
<source>Username</source>
<target>Username</target>
</trans-unit>
<trans-unit id="Password">
<source>Password</source>
<target>Password</target>
</trans-unit>
</body>
</file>
</xliff>
Loading