Exemple #1
0
    # Rest (web services)
    rest_login = Rest_Login
    rest_query = Rest_Query
    rest_create = Rest_Create
    rest_read = Rest_Read
    rest_update = Rest_Update
    rest_delete = Rest_Delete
    rest_schema = Rest_Schema


###########################################################################
# Register read-only fields
###########################################################################

# Path related fields
register_field('abspath', String(indexed=True, stored=True))
register_field('abspath_depth', Integer(indexed=True, stored=True))
register_field('parent_paths', String(multiple=True, indexed=True))
register_field('name', String(stored=True, indexed=True))
# Class related fields
register_field('format', String(indexed=True, stored=True))
register_field('base_classes', String(multiple=True, indexed=True))
# Referential integrity
register_field('links', String(multiple=True, indexed=True))
register_field('onchange_reindex', String(multiple=True, indexed=True))
# Full text search
register_field('text', Unicode(indexed=True))
# Various classifications
register_field('is_content', Boolean(indexed=True))
# Time events
register_field('next_time_event', DateTime(stored=True))
Exemple #2
0
###########################################################################
# Users
###########################################################################
class Users(Folder):

    class_id = 'users'
    class_title = MSG(u'Users')
    class_description = MSG(u'Manage users.')
    class_icon48 = '/ui/ikaaro/icons/48x48/userfolder.png'
    is_content = False

    def get_document_types(self):
        return [self.database.get_resource_class('user')]

    # Views
    class_views = ['browse_users', 'add_user', 'edit']
    browse_users = Users_Browse
    add_user = Users_AddUser

    # Configuration
    config_name = '/users'
    config_group = 'access'


###########################################################################
# Register
###########################################################################
Configuration.register_module(Users)
register_field('email_domain', String(indexed=True, stored=True))
Exemple #3
0
# Users
###########################################################################
class Users(Folder):

    class_id = 'users'
    class_title = MSG(u'Users')
    class_description = MSG(u'Manage users.')
    class_icon48 = 'icons/48x48/userfolder.png'
    is_content = False

    def get_document_types(self):
        return [self.database.get_resource_class('user')]


    # Views
    class_views = ['browse_users', 'add_user', 'edit']
    browse_users = Users_Browse
    add_user = Users_AddUser

    # Configuration
    config_name = '/users'
    config_group = 'access'



###########################################################################
# Register
###########################################################################
Configuration.register_module(Users)
register_field('email_domain', String(indexed=True, stored=True))
Exemple #4
0
    # Rest (web services)
    rest_login = Rest_Login
    rest_query = Rest_Query
    rest_create = Rest_Create
    rest_read = Rest_Read
    rest_update = Rest_Update
    rest_delete = Rest_Delete
    rest_schema = Rest_Schema


###########################################################################
# Register read-only fields
###########################################################################

# Path related fields
register_field('abspath', String(indexed=True, stored=True))
register_field('abspath_depth', Integer(indexed=True, stored=True))
register_field('parent_paths', String(multiple=True, indexed=True))
register_field('name', String(stored=True, indexed=True))
# Class related fields
register_field('format', String(indexed=True, stored=True))
register_field('base_classes', String(multiple=True, indexed=True))
# Referential integrity
register_field('links', String(multiple=True, indexed=True))
# Full text search
register_field('text', Unicode(indexed=True))
# Various classifications
register_field('is_content', Boolean(indexed=True))
# Time events
register_field('next_time_event', DateTime(stored=True))
register_field('next_time_event_payload', String(stored=True))
Exemple #5
0
    # Rest (web services)
    rest_login = Rest_Login()
    rest_query = Rest_Query()
    rest_create = Rest_Create()
    rest_read = Rest_Read()
    rest_update = Rest_Update()
    rest_delete = Rest_Delete()
    rest_schema = Rest_Schema()


###########################################################################
# Register read-only fields
###########################################################################

# Path related fields
register_field('abspath', String(indexed=True, stored=True))
register_field('abspath_depth', Integer(indexed=True, stored=True))
register_field('parent_paths', String(multiple=True, indexed=True))
register_field('name', String(stored=True, indexed=True))
# Class related fields
register_field('format', String(indexed=True, stored=True))
register_field('base_classes', String(multiple=True, indexed=True))
register_field('class_version', Date(indexed=True, stored=True))
# Referential integrity
register_field('links', String(multiple=True, indexed=True))
register_field('onchange_reindex', String(multiple=True, indexed=True))
# Full text search
register_field('text', Unicode(indexed=True))
# Time events
register_field('next_time_event', DateTime(stored=True))
register_field('next_time_event_payload', String(stored=True))
Exemple #6
0
        last_author = context.root.get_user_title(last_author)
        body = message.gettext(last_author=last_author, resource_uri=uri,
                               title=title, language=language)

        # And return
        return subject, body


    def get_color(self):
        calendar = self.get_resource(self.get_value('calendar'))
        return calendar.get_value('color')


    # Views
    new_instance = Event_NewInstance
    edit = Event_Edit



class EventModel(Model):

    class_id = 'model-event'
    class_title = MSG(u'Event model')

    base_class = Event



# Register
register_field('dates', Date(indexed=True, multiple=True))