Update icon app
This commit is contained in:
@@ -1,7 +1,15 @@
|
|||||||
|
from __future__ import absolute_import
|
||||||
|
|
||||||
|
from .conf import settings
|
||||||
from .sets import THEME_ICONSETS, DEFAULT_THEME
|
from .sets import THEME_ICONSETS, DEFAULT_THEME
|
||||||
|
from .literals import ERROR
|
||||||
|
|
||||||
|
|
||||||
def get_icon_name(icon):
|
def get_icon_name(icon):
|
||||||
return THEME_ICONSETS[DEFAULT_THEME]['icons'][icon]
|
try:
|
||||||
|
return THEME_ICONSETS[settings.ICON_SET][icon]
|
||||||
|
except KeyError:
|
||||||
|
return THEME_ICONSETS[settings.ICON_SET][ERROR]
|
||||||
|
|
||||||
|
|
||||||
def get_sprite_name(icon):
|
def get_sprite_name(icon):
|
||||||
|
|||||||
@@ -1,2 +1,10 @@
|
|||||||
|
#from icons.sets import fat_cow, famfamfam
|
||||||
|
|
||||||
|
#DEFAULT_ICON_SET = fat_cow.ID
|
||||||
|
DEFAULT_ICON_SET = 'fat_cow'
|
||||||
|
|
||||||
APP = 'app'
|
APP = 'app'
|
||||||
BACKUPS = 'backups'
|
BACKUPS = 'backups'
|
||||||
|
ERROR = 'error'
|
||||||
|
ICONS = 'icons'
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,19 @@ from django.utils.translation import ugettext_lazy as _
|
|||||||
|
|
||||||
from icons.sets import fat_cow, famfamfam
|
from icons.sets import fat_cow, famfamfam
|
||||||
|
|
||||||
|
|
||||||
|
SET_CHOICES = (
|
||||||
|
(fat_cow.ID, fat_cow.LABEL),
|
||||||
|
(famfamfam.ID, famfamfam.LABEL),
|
||||||
|
)
|
||||||
|
|
||||||
|
ICON_THEMES: {
|
||||||
|
fat_cow.ID: fat_cow.DICTIONARY,
|
||||||
|
famfamfam.ID: famfamfam.DICTIONARY
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
THEME_DEFAULT = 'default'
|
THEME_DEFAULT = 'default'
|
||||||
|
|
||||||
SET_CHOICES = (
|
SET_CHOICES = (
|
||||||
@@ -23,3 +36,4 @@ THEMES_CHOICES = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DEFAULT_THEME = THEME_DEFAULT
|
DEFAULT_THEME = THEME_DEFAULT
|
||||||
|
"""
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
from icons.literals import *
|
from icons.literals import *
|
||||||
|
|
||||||
|
PATH = os.path.join('Fat Cow', '32x32')
|
||||||
ID = 'fat_cow'
|
ID = 'fat_cow'
|
||||||
LABEL = _(u'Fat cow')
|
LABEL = _(u'Fat cow')
|
||||||
|
|
||||||
DICTIONARY = {
|
DICTIONARY = {
|
||||||
APP: 'plugin.png',
|
APP: 'plugin.png',
|
||||||
BACKUPS: 'cd_burn.png',
|
BACKUPS: 'cd_burn.png',
|
||||||
|
ERROR: 'error.png',
|
||||||
|
ICONS: 'application_view_icons.png',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ INSTALLED_APPS = (
|
|||||||
'compressor',
|
'compressor',
|
||||||
'djangorestframework',
|
'djangorestframework',
|
||||||
# Base generic
|
# Base generic
|
||||||
|
'app_registry',
|
||||||
'permissions',
|
'permissions',
|
||||||
'project_setup',
|
'project_setup',
|
||||||
'project_tools',
|
'project_tools',
|
||||||
@@ -166,7 +167,6 @@ INSTALLED_APPS = (
|
|||||||
'clustering',
|
'clustering',
|
||||||
'scheduler',
|
'scheduler',
|
||||||
'job_processor',
|
'job_processor',
|
||||||
'app_registry',
|
|
||||||
'icons',
|
'icons',
|
||||||
# Mayan EDMS
|
# Mayan EDMS
|
||||||
'diagnostics',
|
'diagnostics',
|
||||||
|
|||||||
Reference in New Issue
Block a user