Added `logo_max_width` and `logo_max_height`. #127
parent
a3b3f8922d
commit
a388ec234c
|
|
@ -38,6 +38,8 @@ class ThemeAdmin(admin.ModelAdmin):
|
||||||
'classes': ('wide', ),
|
'classes': ('wide', ),
|
||||||
'fields': (
|
'fields': (
|
||||||
'logo',
|
'logo',
|
||||||
|
'logo_max_width',
|
||||||
|
'logo_max_height',
|
||||||
'logo_color',
|
'logo_color',
|
||||||
'logo_visible',
|
'logo_visible',
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('admin_interface', '0021_file_extension_validator'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='theme',
|
||||||
|
name='logo_max_height',
|
||||||
|
field=models.PositiveSmallIntegerField(blank=True, default=100, verbose_name='max height'),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='theme',
|
||||||
|
name='logo_max_width',
|
||||||
|
field=models.PositiveSmallIntegerField(blank=True, default=400, verbose_name='max width'),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -103,6 +103,14 @@ class Theme(models.Model):
|
||||||
help_text='#FFFFFF',
|
help_text='#FFFFFF',
|
||||||
max_length=10,
|
max_length=10,
|
||||||
verbose_name=_('color'))
|
verbose_name=_('color'))
|
||||||
|
logo_max_width = models.PositiveSmallIntegerField(
|
||||||
|
blank=True,
|
||||||
|
default=400,
|
||||||
|
verbose_name=_('max width'))
|
||||||
|
logo_max_height = models.PositiveSmallIntegerField(
|
||||||
|
blank=True,
|
||||||
|
default=100,
|
||||||
|
verbose_name=_('max height'))
|
||||||
logo_visible = models.BooleanField(
|
logo_visible = models.BooleanField(
|
||||||
default=True,
|
default=True,
|
||||||
verbose_name=_('visible'))
|
verbose_name=_('visible'))
|
||||||
|
|
|
||||||
|
|
@ -87,8 +87,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-interface #branding h1 img.logo {
|
.admin-interface #branding h1 img.logo {
|
||||||
max-width: 400px;
|
|
||||||
max-height:100px;
|
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
margin-bottom:10px;
|
margin-bottom:10px;
|
||||||
margin-right:15px;
|
margin-right:15px;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue