major refactoring and cleanup

This commit is contained in:
Kevin Papst
2016-10-23 00:12:32 +02:00
parent 5a85b1d37e
commit c492d30be3
70 changed files with 1304 additions and 4027 deletions

View File

@@ -19,7 +19,7 @@
{{ 'http_error.description'|trans({ '%status_code%': status_code }) }}
</p>
<p>
{{ 'http_error.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
{{ 'http_error.suggestion'|trans({ '%url%': path('homepage') })|raw }}
</p>
{% endblock %}

View File

@@ -19,7 +19,7 @@
{{ 'http_error_404.description'|trans }}
</p>
<p>
{{ 'http_error_404.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
{{ 'http_error_404.suggestion'|trans({ '%url%': path('homepage') })|raw }}
</p>
{% endblock %}

View File

@@ -19,7 +19,7 @@
{{ 'http_error_500.description'|trans }}
</p>
<p>
{{ 'http_error_500.suggestion'|trans({ '%url%': path('blog_index') })|raw }}
{{ 'http_error_500.suggestion'|trans({ '%url%': path('homepage') })|raw }}
</p>
{% endblock %}

View File

@@ -2,6 +2,52 @@
<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>
<trans-unit id="browser.title">
<source>browser.title</source>
<target>Kimai - Time Tracking</target>
</trans-unit>
<trans-unit id="app.title">
<source>app.title</source>
<target>Kimai</target>
</trans-unit>
<trans-unit id="http_error.name">
<source>http_error.name</source>
<target>Error</target>
</trans-unit>
<trans-unit id="http_error.description">
<source>http_error.description</source>
<target>Error</target>
</trans-unit>
<trans-unit id="http_error.suggestion">
<source>http_error.suggestion</source>
<target>Error</target>
</trans-unit>
<trans-unit id="http_error_403.description">
<source>http_error_403.description</source>
<target>Error</target>
</trans-unit>
<trans-unit id="http_error_403.suggestion">
<source>http_error_403.suggestion</source>
<target>Error</target>
</trans-unit>
<trans-unit id="http_error_404.description">
<source>http_error_404.description</source>
<target>Error</target>
</trans-unit>
<trans-unit id="http_error_404.suggestion">
<source>http_error_404.suggestion</source>
<target>Error</target>
</trans-unit>
<trans-unit id="http_error_405.description">
<source>http_error_405.description</source>
<target>Error</target>
</trans-unit>
<trans-unit id="http_error_405.suggestion">
<source>http_error_405.suggestion</source>
<target>Error</target>
</trans-unit>
<trans-unit id="action.browse_admin">
<source>action.browse_admin</source>
<target>Zum Backend</target>
@@ -38,10 +84,6 @@
<source>menu.logout</source>
<target>Abmelden</target>
</trans-unit>
<trans-unit id="menu.homepage">
<source>menu.homepage</source>
<target>Blog</target>
</trans-unit>
<trans-unit id="menu.admin">
<source>menu.admin</source>
<target>Backend</target>

View File

@@ -1,25 +0,0 @@
{#
By default, forms enable client-side validation. This means that you can't
test the server-side validation errors from the browser. To temporarily
disable this validation, add the 'novalidate' attribute:
{{ form_start(form, { attr: { novalidate: 'novalidate' } }) }}
#}
{% if show_confirmation|default(false) %}
{% set attr = {'data-confirmation': 'true'} %}
{{ include('blog/_delete_post_confirmation.html.twig') }}
{% endif %}
{{ form_start(form, { attr: attr|default({}) }) }}
{{ form_widget(form) }}
<input type="submit" value="{{ button_label|default('label.create_post'|trans) }}"
class="{{ button_css|default("btn btn-primary") }}" />
{% if include_back_to_home_link|default(false) %}
<a href="{{ path('admin_post_index') }}" class="btn btn-link">
{{ 'action.back_to_list'|trans }}
</a>
{% endif %}
{{ form_end(form) }}

View File

@@ -1,26 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block body_id 'admin_post_edit' %}
{% block main %}
<h1>{{ 'title.edit_post'|trans({'%id%': post.id}) }}</h1>
{{ include('admin/blog/_form.html.twig', {
form: edit_form,
button_label: 'action.save'|trans,
include_back_to_home_link: true,
}, with_context = false) }}
{% endblock %}
{% block sidebar %}
<div class="section actions">
{{ include('admin/blog/_form.html.twig', {
form: delete_form,
button_label: 'action.delete_post'|trans,
button_css: 'btn btn-lg btn-block btn-danger',
show_confirmation: true,
}, with_context = false) }}
</div>
{{ parent() }}
{% endblock %}

View File

@@ -1,57 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block body_id 'admin_post_index' %}
{% block main %}
<h1>{{ 'title.post_list'|trans }}</h1>
<table class="table table-striped">
<thead>
<tr>
<th>{{ 'label.title'|trans }}</th>
<th><i class="fa fa-user"></i> {{ 'label.author'|trans }}</th>
<th><i class="fa fa-calendar"></i> {{ 'label.published_at'|trans }}</th>
<th><i class="fa fa-cogs"></i> {{ 'label.actions'|trans }}</th>
</tr>
</thead>
<tbody>
{% for post in posts %}
<tr>
<td>{{ post.title }}</td>
<td>{{ post.authorEmail }}</td>
{# it's not mandatory to set the timezone in localizeddate(). This is done to
avoid errors when the 'intl' PHP extension is not available and the application
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
<td>{% if post.publishedAt %}{{ post.publishedAt|localizeddate('short', 'short', null, 'UTC') }}{% endif %}</td>
<td>
<div class="item-actions">
<a href="{{ path('admin_post_show', { id: post.id }) }}" class="btn btn-sm btn-default">
{{ 'action.show'|trans }}
</a>
{% if post.isAuthor(app.user) %}
<a href="{{ path('admin_post_edit', { id: post.id }) }}" class="btn btn-sm btn-primary">
<i class="fa fa-edit"></i> {{ 'action.edit'|trans }}
</a>
{% endif %}
</div>
</td>
</tr>
{% else %}
<tr>
<td colspan="4" align="center">{{ 'post.no_posts_found'|trans }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% block sidebar %}
<div class="section actions">
<a href="{{ path('admin_post_new') }}" class="btn btn-lg btn-block btn-success">
<i class="fa fa-plus"></i> {{ 'action.create_post'|trans }}
</a>
</div>
{{ parent() }}
{% endblock %}

View File

@@ -1,27 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block body_id 'admin_post_new' %}
{% block main %}
<h1>{{ 'title.post_new'|trans }}</h1>
{{ form_start(form) }}
{{ form_row(form.title) }}
{{ form_row(form.summary) }}
{{ form_row(form.content) }}
{{ form_row(form.authorEmail) }}
{{ form_row(form.publishedAt) }}
<input type="submit" value="{{ 'label.create_post'|trans }}" class="btn btn-primary" />
{{ form_widget(form.saveAndCreateNew, { label: 'label.save_and_create_new', attr: { class: 'btn btn-primary' } }) }}
<a href="{{ path('admin_post_index') }}" class="btn btn-link">
{{ 'action.back_to_list'|trans }}
</a>
{{ form_end(form) }}
{% endblock %}
{% block sidebar %}
{{ parent() }}
{% endblock %}

View File

@@ -1,48 +0,0 @@
{% extends 'admin/layout.html.twig' %}
{% block body_id 'admin_post_show' %}
{% block main %}
<h1>{{ post.title }}</h1>
<table class="table">
<tbody>
<tr>
<th>{{ 'label.summary'|trans }}</th>
<td>{{ post.summary|md2html }}</td>
</tr>
<tr>
<th>{{ 'label.content'|trans }}</th>
<td>{{ post.content|md2html }}</td>
</tr>
<tr>
<th>{{ 'label.author'|trans }}</th>
<td><p>{{ post.authorEmail }}</p></td>
</tr>
<tr>
<th>{{ 'label.published_at'|trans }}</th>
{# it's not mandatory to set the timezone in localizeddate(). This is done to
avoid errors when the 'intl' PHP extension is not available and the application
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
<td><p>{{ post.publishedAt|localizeddate('long', 'medium', null, 'UTC') }}</p></td>
</tr>
</tbody>
</table>
{% endblock %}
{% block sidebar %}
<div class="section">
<a href="{{ path('admin_post_edit', { id: post.id }) }}" class="btn btn-lg btn-block btn-success">
<i class="fa fa-edit"></i> {{ 'action.edit_contents'|trans }}
</a>
</div>
<div class="section">
{{ include('admin/blog/_form.html.twig', {
form: delete_form,
button_label: 'action.delete_post'|trans,
button_css: 'btn btn-lg btn-block btn-danger',
show_confirmation: true,
}, with_context = false) }}
</div>
{% endblock %}

View File

@@ -1,9 +0,0 @@
{#
This is the base template of the all backend pages.
See http://symfony.com/doc/current/book/templating.html#template-inheritance-and-layouts
#}
{% extends 'base.html.twig' %}
{% block header_navigation_links %}
{{ knp_menu_render('admin', {'template': 'menu/admin_menu.html.twig'}) }}
{% endblock %}

View File

@@ -1,122 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>{% block title %}Symfony Demo application{% endblock %}</title>
{% extends 'AvanzuAdminThemeBundle:layout:base-layout.html.twig' %}
{% block stylesheets %}
{# uncomment the following lines to compile SCSS assets with Assetic
{% block page_content %}
{% block main %}
{% endblock %}
{% endblock %}
{% stylesheets filter="scssphp" output="css/app.css"
"%kernel.root_dir%/Resources/assets/scss/bootstrap-flatly.scss"
"%kernel.root_dir%/Resources/assets/scss/font-awesome.scss"
"%kernel.root_dir%/Resources/assets/css/*.css"
"%kernel.root_dir%/Resources/assets/scss/main.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
#}
{% block flash_messages %}
{{ include('default/_flash_messages.html.twig') }}
{% endblock %}
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
{% endblock %}
{#
<title>{% block title %}{{ 'browser.title'|trans }}{% endblock %}</title>
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
</head>
<body id="{% block body_id %}{% endblock %}">
<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>
<ul class="dropdown-menu locales" role="menu">
{% for locale in locales() %}
<li {% if app.request.locale == locale.code %}class="active"{% endif %}><a href="{{ path(app.request.get('_route', 'homepage'), app.request.get('_route_params', [])|merge({ _locale: locale.code })) }}">{{ locale.name|capitalize }}</a></li>
{% endfor %}
</ul>
</li>
{% block header %}
<header>
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="{{ path('homepage') }}">
Timesheet
</a>
<button type="button" class="navbar-toggle"
data-toggle="collapse"
data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
{% block header_navigation_links %}
{{ knp_menu_render('main', {'template': 'menu/main_menu.html.twig'}) }}
{% endblock %}
<p>&copy; {{ 'now'|date('Y') }} - {{ 'kimai.footer'|trans }}</p>
<p>{{ 'kimai.license'|trans }}</p>
{#
<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>
<ul class="dropdown-menu locales" role="menu">
{% for locale in locales() %}
<li {% if app.request.locale == locale.code %}class="active"{% endif %}><a href="{{ path(app.request.get('_route', 'blog_index'), app.request.get('_route_params', [])|merge({ _locale: locale.code })) }}">{{ locale.name|capitalize }}</a></li>
{% endfor %}
</ul>
</li>
#}
<!-- Page rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->
</div>
</div>
</div>
</header>
{% endblock %}
<div class="container body-container">
{% block body %}
<div class="row">
<div id="main" class="col-sm-12">
{{ include('default/_flash_messages.html.twig') }}
{% block main %}{% endblock %}
</div>
</div>
{% endblock %}
</div>
{% block footer %}
<footer>
<div class="container">
<div class="row">
<div id="footer-copyright" class="col-md-6">
<p>&copy; {{ 'now'|date('Y') }} - {{ 'kimai.footer'|trans }}</p>
<p>{{ 'kimai.license'|trans }}</p>
</div>
<div id="footer-resources" class="col-md-6">
<p>
<a href="https://twitter.com/symfony"><i class="fa fa-twitter"></i></a>
<a href="https://www.facebook.com/SensioLabs"><i class="fa fa-facebook"></i></a>
<a href="https://symfony.com/blog/"><i class="fa fa-rss"></i></a>
</p>
</div>
</div>
</div>
</footer>
{% endblock %}
{% block javascripts %}
{# uncomment the following lines to combine and minimize JavaScript assets with Assetic
{% javascripts filter="?jsqueeze" output="js/app.js"
"%kernel.root_dir%/Resources/assets/js/jquery-2.1.4.js"
"%kernel.root_dir%/Resources/assets/js/moment.min.js"
"%kernel.root_dir%/Resources/assets/js/bootstrap-3.3.4.js"
"%kernel.root_dir%/Resources/assets/js/highlight.pack.js"
"%kernel.root_dir%/Resources/assets/js/bootstrap-datetimepicker.min.js"
"%kernel.root_dir%/Resources/assets/js/main.js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
#}
<script src="{{ asset('js/app.js') }}"></script>
{% endblock %}
{# it's not mandatory to set the timezone in localizeddate(). This is done to
avoid errors when the 'intl' PHP extension is not available and the application
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
<!-- Page rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->
</body>
</html>
#}

View File

@@ -1,35 +0,0 @@
{#
By default, forms enable client-side validation. This means that you can't
test the server-side validation errors from the browser. To temporarily
disable this validation, add the 'novalidate' attribute:
{{ form_start(form, { method: ..., action: ..., attr: { novalidate: 'novalidate' } }) }}
#}
{{ form_start(form, { method: 'POST', action: path('comment_new', { 'postSlug': post.slug }) }) }}
{# instead of displaying form fields one by one, you can also display them
all with their default options and styles just by calling to this function:
{{ form_widget(form) }}
#}
<fieldset>
<legend>{{ 'title.add_comment'|trans }}</legend>
{# Render any global form error (e.g. when a constraint on a public getter method failed) #}
{{ form_errors(form) }}
<div class="form-group {% if not form.content.vars.valid %}has-error{% endif %}">
{{ form_label(form.content, 'label.content', { label_attr: { class: 'hidden' }}) }}
{# Render any errors for the "content" field (e.g. when a class property constraint failed) #}
{{ form_errors(form.content) }}
{{ form_widget(form.content, { attr: { rows: 10 } }) }}
</div>
<div class="form-group">
<button class="btn btn-primary pull-right" type="submit">{{ 'action.publish_comment'|trans }}</button>
</div>
</fieldset>
{{ form_end(form) }}

View File

@@ -1,19 +0,0 @@
{# Bootstrap modal, see http://getbootstrap.com/javascript/#modals #}
<div class="modal fade" id="confirmationModal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<h4>{{ 'delete_post_modal.title'|trans }}</h4>
<p>{{ 'delete_post_modal.body'|trans }}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" id="btnNo" data-dismiss="modal">
{{ 'label.cancel'|trans }}
</button>
<button type="button" class="btn btn-danger" id="btnYes" data-dismiss="modal">
{{ 'label.delete_post'|trans }}
</button>
</div>
</div>
</div>
</div>

View File

@@ -1,15 +0,0 @@
<div class="section about">
<div class="well well-lg">
<p>
{{ 'help.app_description'|trans|raw }}
</p>
<p>
{{ 'help.more_information'|trans|raw }}
</p>
</div>
</div>
{# it's not mandatory to set the timezone in localizeddate(). This is done to
avoid errors when the 'intl' PHP extension is not available and the application
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
<!-- Fragment rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->

View File

@@ -1,11 +0,0 @@
{% extends 'base.html.twig' %}
{% block body_id 'comment_form_error' %}
{% block main %}
<h1 class="text-danger">{{ 'title.comment_error'|trans }}</h1>
<div class="well">
{{ include('blog/_comment_form.html.twig') }}
</div>
{% endblock %}

View File

@@ -1,27 +0,0 @@
{% extends 'base.html.twig' %}
{% block body_id 'blog_index' %}
{% block main %}
{% for post in posts %}
<article class="post">
<h2>
<a href="{{ path('blog_post', { slug: post.slug }) }}">
{{ post.title }}
</a>
</h2>
{{ post.summary|md2html }}
</article>
{% else %}
<div class="well">{{ 'post.no_posts_found'|trans }}</div>
{% endfor %}
<div class="navigation text-center">
{{ pagerfanta(posts, 'twitter_bootstrap3_translated', { routeName: 'blog_index_paginated' }) }}
</div>
{% endblock %}
{% block sidebar %}
{{ parent() }}
{% endblock %}

View File

@@ -1,64 +0,0 @@
{% extends 'base.html.twig' %}
{% block body_id 'blog_post_show' %}
{% block main %}
<h1>{{ post.title }}</h1>
{{ post.content|md2html }}
<div id="post-add-comment" class="well">
{# The 'IS_AUTHENTICATED_FULLY' role ensures that the user has entered
his/her credentials (login + password) during this session. If he/she
is automatically logged via the 'Remember Me' functionality, he/she won't
be able to add a comment.
See http://symfony.com/doc/current/cookbook/security/remember_me.html#forcing-the-user-to-re-authenticate-before-accessing-certain-resources
#}
{% if is_granted('IS_AUTHENTICATED_FULLY') %}
{{ render(controller('AppBundle:Blog:commentForm', { 'id': post.id })) }}
{% else %}
<p>
<a class="btn btn-success" href="{{ path('security_login') }}">
<i class="fa fa-sign-in"></i> {{ 'action.sign_in'|trans }}
</a>
{{ 'post.to_publish_a_comment'|trans }}
</p>
{% endif %}
</div>
<h3>{{ 'post.num_comments'|transchoice(post.comments|length) }}</h3>
{% for comment in post.comments %}
<div class="row post-comment">
<h4 class="col-sm-3">
<strong>{{ comment.authorEmail }}</strong> {{ 'post.commented_on'|trans }}
{# it's not mandatory to set the timezone in localizeddate(). This is done to
avoid errors when the 'intl' PHP extension is not available and the application
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
<strong>{{ comment.publishedAt|localizeddate('medium', 'short', null, 'UTC') }}</strong>
</h4>
<div class="col-sm-9">
{{ comment.content|md2html }}
</div>
</div>
{% else %}
<div class="post-comment">
<p>{{ 'post.no_comments'|trans }}</p>
</div>
{% endfor %}
{% endblock %}
{% block sidebar %}
{% if app.user and post.isAuthor(app.user) %}
<div class="section">
<a class="btn btn-lg btn-block btn-success" href="{{ path('admin_post_edit', { id: post.id }) }}">
<i class="fa fa-edit"></i> {{ 'action.edit_post'|trans }}
</a>
</div>
{% endif %}
{# the parent() function includes the contents defined by the parent template
('base.html.twig') for this block ('sidebar'). This is a very convenient way
to share common contents in different templates #}
{{ parent() }}
{% endblock %}

View File

@@ -0,0 +1,119 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>{% block title %}{{ 'browser.title'|trans }}{% endblock %}</title>
{% block stylesheets %}
{# uncomment the following lines to compile SCSS assets with Assetic
{% stylesheets filter="scssphp" output="css/app.css"
"%kernel.root_dir%/Resources/assets/scss/bootstrap-flatly.scss"
"%kernel.root_dir%/Resources/assets/scss/font-awesome.scss"
"%kernel.root_dir%/Resources/assets/css/*.css"
"%kernel.root_dir%/Resources/assets/scss/main.scss"
%}
<link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
#}
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
</head>
<body id="{% block body_id %}{% endblock %}">
{% block header %}
<header>
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="{{ path('homepage') }}">
{{ 'app.title'|trans }}
</a>
<button type="button" class="navbar-toggle"
data-toggle="collapse"
data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="navbar-collapse collapse">
{#
<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>
<ul class="dropdown-menu locales" role="menu">
{% for locale in locales() %}
<li {% if app.request.locale == locale.code %}class="active"{% endif %}><a href="{{ path(app.request.get('_route', 'blog_index'), app.request.get('_route_params', [])|merge({ _locale: locale.code })) }}">{{ locale.name|capitalize }}</a></li>
{% endfor %}
</ul>
</li>
#}
</div>
</div>
</div>
</header>
{% endblock %}
<div class="container body-container">
{% block body %}
<div class="row">
<div id="main" class="col-sm-12">
{{ include('default/_flash_messages.html.twig') }}
{% block main %}{% endblock %}
</div>
</div>
{% endblock %}
</div>
{% block footer %}
<footer>
<div class="container">
<div class="row">
<div id="footer-copyright" class="col-md-6">
<p>&copy; {{ 'now'|date('Y') }} - {{ 'kimai.footer'|trans }}</p>
<p>{{ 'kimai.license'|trans }}</p>
</div>
<div id="footer-resources" class="col-md-6">
{#
<p>
<a href="https://twitter.com/symfony"><i class="fa fa-twitter"></i></a>
<a href="https://www.facebook.com/SensioLabs"><i class="fa fa-facebook"></i></a>
<a href="https://symfony.com/blog/"><i class="fa fa-rss"></i></a>
</p>
#}
</div>
</div>
</div>
</footer>
{% endblock %}
{% block javascripts %}
{# uncomment the following lines to combine and minimize JavaScript assets with Assetic
{% javascripts filter="?jsqueeze" output="js/app.js"
"%kernel.root_dir%/Resources/assets/js/jquery-2.1.4.js"
"%kernel.root_dir%/Resources/assets/js/moment.min.js"
"%kernel.root_dir%/Resources/assets/js/bootstrap-3.3.4.js"
"%kernel.root_dir%/Resources/assets/js/highlight.pack.js"
"%kernel.root_dir%/Resources/assets/js/bootstrap-datetimepicker.min.js"
"%kernel.root_dir%/Resources/assets/js/main.js" %}
<script src="{{ asset_url }}"></script>
{% endjavascripts %}
#}
<script src="{{ asset('js/app.js') }}"></script>
{% endblock %}
{# it's not mandatory to set the timezone in localizeddate(). This is done to
avoid errors when the 'intl' PHP extension is not available and the application
is forced to use the limited "intl polyfill", which only supports UTC and GMT #}
<!-- Page rendered on {{ 'now'|localizeddate('long', 'long', null, 'UTC') }} -->
</body>
</html>

View File

@@ -0,0 +1,7 @@
{% extends 'base.html.twig' %}
{% block page_title %}Dashboard{% endblock %}
{% block page_subtitle %}Welcome!{% endblock %}
{% block main %}
{% endblock %}

View File

@@ -1 +0,0 @@
{% extends 'menu/main_menu.html.twig' %}

View File

@@ -1,18 +0,0 @@
{% extends 'knp_menu.html.twig' %}
{% block linkElement %}
<a href="{{ item.uri }}"{{ knp_menu.attributes(item.linkAttributes) }}>
{% if item.childrenAttributes.icon is defined %}
<i class="fa fa-{{ item.childrenAttributes.icon }} }}"></i>
{% endif %}
{{ block('label') }}
</a>
{% endblock %}
{% block label %}
{% if options.allow_safe_labels and item.getExtra('safe_label', false) %}
{{ item.label|raw }}
{% else %}
{{ item.label|trans }}
{% endif %}
{% endblock %}

View File

@@ -1,4 +1,4 @@
{% extends 'base.html.twig' %}
{% extends 'bootstrap.html.twig' %}
{% block body_id 'login' %}
@@ -40,6 +40,7 @@
{{ parent() }}
<script>
// FIXME remove me
$(document).ready(function() {
var usernameEl = $('#username');
var passwordEl = $('#password');