Initial registry updates for the linking app
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
"""Configuration options for the linking app"""
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from smart_settings.api import Setting, SettingNamespace
|
||||
|
||||
namespace = SettingNamespace('linking', _(u'Linking'), module='linking.conf.settings', sprite='link')
|
||||
|
||||
Setting(
|
||||
namespace=namespace,
|
||||
name='SHOW_EMPTY_SMART_LINKS',
|
||||
global_name='LINKING_SHOW_EMPTY_SMART_LINKS',
|
||||
default=True,
|
||||
description=_(u'Show smart link that don\'t return any documents.')
|
||||
)
|
||||
6
apps/linking/icons.py
Normal file
6
apps/linking/icons.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from .literals import DRAW_AIRBRUSH
|
||||
from . import Icon
|
||||
|
||||
icon_icons_app = Icon(DRAW_AIRBRUSH)
|
||||
20
apps/linking/registry.py
Normal file
20
apps/linking/registry.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from smart_settings import LocalScope
|
||||
|
||||
#from .icons import icon_tick
|
||||
|
||||
label = _(u'Document linking')
|
||||
#description = _(u'Contains many commonly used models, views and utilities.')
|
||||
dependencies = ['app_registry', 'icons', 'navigation', 'documents', 'metadata']
|
||||
#icon = icon_tick
|
||||
settings = [
|
||||
{
|
||||
'name': 'SHOW_EMPTY_SMART_LINKS',
|
||||
'default': True,
|
||||
'description': _(u'Show smart link that don\'t return any documents.'),
|
||||
'scopes': [LocalScope()]
|
||||
}
|
||||
]
|
||||
@@ -21,7 +21,7 @@ from acls.models import AccessEntry
|
||||
from acls.utils import apply_default_acls
|
||||
|
||||
from .models import SmartLink, SmartLinkCondition
|
||||
from .conf.settings import SHOW_EMPTY_SMART_LINKS
|
||||
from .settings import SHOW_EMPTY_SMART_LINKS
|
||||
from .forms import (SmartLinkInstanceForm, SmartLinkForm,
|
||||
SmartLinkConditionForm)
|
||||
from .links import smart_link_instance_view_link
|
||||
|
||||
Reference in New Issue
Block a user