added config to brand Kimai with logo and company name (#856)
This commit is contained in:
@@ -326,6 +326,20 @@ class Configuration implements ConfigurationInterface
|
|||||||
->scalarNode('height')->defaultValue('200')->end()
|
->scalarNode('height')->defaultValue('200')->end()
|
||||||
->end()
|
->end()
|
||||||
->end()
|
->end()
|
||||||
|
->arrayNode('branding')
|
||||||
|
->addDefaultsIfNotSet()
|
||||||
|
->children()
|
||||||
|
->scalarNode('logo')
|
||||||
|
->defaultNull()
|
||||||
|
->end()
|
||||||
|
->scalarNode('mini')
|
||||||
|
->defaultNull()
|
||||||
|
->end()
|
||||||
|
->scalarNode('company')
|
||||||
|
->defaultNull()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
|
->end()
|
||||||
->end()
|
->end()
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,19 @@
|
|||||||
{% block page_subtitle %}{% endblock %}
|
{% block page_subtitle %}{% endblock %}
|
||||||
|
|
||||||
{% block logo_mini %}
|
{% block logo_mini %}
|
||||||
|
{% if not kimai_context.branding.mini is empty %}
|
||||||
|
{{ kimai_context.branding.mini|raw }}
|
||||||
|
{% else %}
|
||||||
<b>K</b>TT
|
<b>K</b>TT
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block logo_large %}
|
{% block logo_large %}
|
||||||
|
{% if not kimai_context.branding.company is empty %}
|
||||||
|
{{ kimai_context.branding.company|raw }}
|
||||||
|
{% else %}
|
||||||
<b>Kimai</b> - Time Tracking
|
<b>Kimai</b> - Time Tracking
|
||||||
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
|
|||||||
@@ -1 +1,7 @@
|
|||||||
|
{% if not kimai_context.branding.logo is empty %}
|
||||||
|
<img src="{{ kimai_context.branding.logo }}" style="max-width: 300px;">
|
||||||
|
{% elseif not kimai_context.branding.company is empty %}
|
||||||
|
<b>{{ kimai_context.branding.company|raw }}</b>
|
||||||
|
{% else %}
|
||||||
{{- get_title('<b>', '</b><br>')|raw -}}
|
{{- get_title('<b>', '</b><br>')|raw -}}
|
||||||
|
{% endif %}
|
||||||
|
|||||||
@@ -102,7 +102,12 @@ class AppExtensionTest extends TestCase
|
|||||||
'border_color' => '#3b8bba',
|
'border_color' => '#3b8bba',
|
||||||
'grid_color' => 'rgba(0,0,0,.05)',
|
'grid_color' => 'rgba(0,0,0,.05)',
|
||||||
'height' => '200'
|
'height' => '200'
|
||||||
]
|
],
|
||||||
|
'branding' => [
|
||||||
|
'logo' => null,
|
||||||
|
'mini' => null,
|
||||||
|
'company' => null,
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'kimai.theme.select_type' => null,
|
'kimai.theme.select_type' => null,
|
||||||
'kimai.theme.show_about' => true,
|
'kimai.theme.show_about' => true,
|
||||||
|
|||||||
Reference in New Issue
Block a user