src/pyams_content/profile/interfaces/__init__.py
changeset 1059 34e6d07ea2e9
parent 1058 1fe028e17f70
child 1060 29b1aaf9e080
equal deleted inserted replaced
1058:1fe028e17f70 1059:34e6d07ea2e9
     1 #
       
     2 # Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
       
     3 # All Rights Reserved.
       
     4 #
       
     5 # This software is subject to the provisions of the Zope Public License,
       
     6 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
     8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
     9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    10 # FOR A PARTICULAR PURPOSE.
       
    11 #
       
    12 
       
    13 __docformat__ = 'restructuredtext'
       
    14 
       
    15 
       
    16 # import standard library
       
    17 
       
    18 # import interfaces
       
    19 from zope.annotation.interfaces import IAttributeAnnotatable
       
    20 
       
    21 # import packages
       
    22 from zope.schema import Choice, List, TextLine
       
    23 
       
    24 from pyams_content import _
       
    25 
       
    26 
       
    27 ADMIN_PROFILE_KEY = 'pyams_content.admin_profile'
       
    28 
       
    29 
       
    30 class IAdminProfile(IAttributeAnnotatable):
       
    31     """User admin profile preferences"""
       
    32 
       
    33     favorites = List(title=_("User favorites"),
       
    34                      description=_("List of internal numbers of shared contents stored for quick access"),
       
    35                      value_type=TextLine())
       
    36 
       
    37     table_page_length = Choice(title=_("Default table length"),
       
    38                                description=_("Default length used for inner tables and dashboards"),
       
    39                                values=(10, 25, 50, 100),
       
    40                                default=10)