'type': 'object', 'properties': { 'filename': { 'type': 'string' }, 'uuid': uuid_object(display=False) } } }, # 'calendar_reference': uuid_object(title='Calendar') }) SessionForm = [ 'name', section(1, 2, [[{ 'key': 'speakers', 'add': 'Add Speaker', 'startEmpty': True }, 'topics']]), 'abstract', section(1, 2, [[lookup_field('sessiontype', 'sessiontype'), 'keywords']]), { 'key': 'files', 'add': None, 'remove': None, 'startEmpty': True }, ] Session = {'schema': SessionSchema, 'form': SessionForm}
}, 'name': { 'type': 'string', 'title': 'Name', 'description': 'Name of Task' } } }, 'creator': uuid_object(title='Unique Creator ID') } } } }) TaskForm = [ section(2, 3, [['name', lookup_field('assignee', 'user'), 'priority'], [lookup_field('project'), lookup_field('taskgroup'), 'creator']]), section(1, 2, [['alert_date', 'alert_time']]), # { # 'type': 'section', # 'htmlClass': 'row', # 'items': [ # { # 'type': 'section', # 'htmlClass': 'col-xs-6', # 'items': [ # 'name', { # 'key': 'project', # 'type': 'strapselect', # 'placeholder': 'Select a Project', # 'options': { # "type": "project",
from isomer.schemata.defaultform import editbuttons, section from isomer.schemata.base import base_object SessionTypeSchema = base_object('sessiontype', roles_write=['chair'], roles_create=['chair'], roles_read=['crew'], roles_list=['crew']) SessionTypeSchema['properties'].update({ 'name': { 'type': 'string', 'title': 'Title', 'description': 'Title of SessionType' }, 'open': { 'type': 'boolean', 'title': 'Open', 'description': 'Allow SessionType type registration' }, 'length': { 'type': 'number', 'title': 'Length', 'description': 'Duration of SessionType in minutes' }, }) SessionTypeForm = ['name', section(1, 2, [['open', 'length']]), editbuttons] SessionType = {'schema': SessionTypeSchema, 'form': SessionTypeForm}
"default": False }, "rdate": { "format": "datetimepicker", "type": "string", "description": "Recurrence date" }, "rrule": { "type": "string", "description": "Recurrence rule" }, "category": { "type": "string", "description": "Event category" }, # "geo": GeometrySchema }) EventForm = [ fieldset('General', [ section(3, 2, [['name', 'category'], ['dtstart', 'dtend'], ['duration', 'location']]), section(1, 2, [[lookup_field('calendar'), 'color']]), 'summary', 'geo', 'recurring' ]), fieldset('Recurrence', [section(1, 2, [['rdate', 'rrule']])], options={'condition': '$ctrl.model.recurring'}), editbuttons ] Event = {'schema': EventSchema, 'form': EventForm}
'usage low and eliminate the need for ' 'reserving new memory whenever a new tile ' 'is needed.' }, 'bounds': { 'type': 'array', 'description': 'When this option is set, the TileLayer ' 'only loads tiles that are in the given ' 'geographical bounds.', 'items': { 'type': 'array', 'maxItems': 2, 'items': { 'type': 'number', 'maxItems': 2, 'minItems': 2, } } } } } }) LayerForm = [ section(2, 2, [['name', 'category'], ['color', 'layeroptions.opacity']]), 'notes', editbuttons ] Layer = {'schema': LayerSchema, 'form': LayerForm}
}, 'opacity': { 'type': 'number', 'description': 'The opacity of the GeoObject.', 'default': 1.0 }, 'zIndex': { 'type': 'number', 'description': 'The explicit zIndex of the GeoObject.' 'Not set by default.', }, 'geojson': { 'type': 'object', 'default': {}, 'properties': {} } }) GeoObjectForm = [ section(4, 2, [ ['name', 'type'], [lookup_field('layer'), 'icon'], ['color', 'iconcolor'], ['minZoom', 'maxZoom'], ]), 'notes', editbuttons ] GeoObject = {'schema': GeoObjectSchema, 'form': GeoObjectForm}
ReviewSchema['properties'].update({ 'status': { 'type': 'string', 'enum': ['Denied', 'Accepted', 'Not reviewed'], 'default': 'Not reviewed' }, 'calendar_reference': uuid_object(title='Calendar'), 'session_reference': uuid_object(title='Session'), 'comments': { 'type': 'string', 'format': 'html' }, 'rating': { 'type': 'integer' } }) ReviewForm = [ section(2, 2, [['owner', 'status'], [ lookup_field('calendar_reference', 'calendar'), lookup_field('session_reference', 'session') ]]), rating_widget(), 'comments', editbuttons ] Review = {'schema': ReviewSchema, 'form': ReviewForm}
'CollisionIncident', 'DistressIncident', 'EngineIncident', 'PollutionIncident', 'SalvageIncident', 'SpillpreventionIncident', ] } } }, }) LogbookEntryForm = [ section(2, 4, [['start', 'end', 'category', 'severity'], [ 'coordinate.lat', 'coordinate.lng', ]]), horizontal_divider(), section( 4, 3, [['weather.wind.direction', 'weather.wind.speed', 'weather.wind.gust'], [ 'weather.hygrometer', 'weather.thermometer.air', 'weather.thermometer.water', ], ['weather.coverage', 'weather.barometer'], ['weather.waves']], condition="$ctrl.model.category === 'Weather'"), section(2, 3, [['technical', 'technical.subcategory']],