2016-11-08 18:26:55 +08:00
|
|
|
# Extends class holds the arrays for the models enum fields
|
|
|
|
# so that can be extended in sub modules.
|
|
|
|
|
|
|
|
class Extends
|
|
|
|
# To extend the enum fields in the engine you have to put in
|
|
|
|
# lib/engine_name/engine.rb file as in the example:
|
|
|
|
|
|
|
|
# > initializer 'add_additional enum values to my model' do
|
|
|
|
# > Extends::MY_ARRAY_OF_ENUM_VALUES.merge!(value1, value2, ....)
|
|
|
|
# > end
|
|
|
|
# >
|
|
|
|
|
2017-03-08 21:14:03 +08:00
|
|
|
# Extends enum types. Should not be freezed, as modules might append to this.
|
2017-03-23 22:45:02 +08:00
|
|
|
# !!!Check all addons for the correct order!!!
|
2016-11-08 18:26:55 +08:00
|
|
|
NOTIFICATIONS_TYPES = { assignment: 0,
|
|
|
|
recent_changes: 1,
|
2017-03-23 22:45:02 +08:00
|
|
|
system_message: 2,
|
|
|
|
deliver: 5 }
|
2017-02-10 21:27:20 +08:00
|
|
|
|
|
|
|
TASKS_STATES = { uncompleted: 0,
|
2017-02-13 22:42:28 +08:00
|
|
|
completed: 1 }
|
2017-02-27 20:53:46 +08:00
|
|
|
|
|
|
|
REPORT_ELEMENT_TYPES = { project_header: 0,
|
|
|
|
my_module: 1,
|
|
|
|
step: 2,
|
|
|
|
result_asset: 3,
|
|
|
|
result_table: 4,
|
|
|
|
result_text: 5,
|
|
|
|
my_module_activity: 6,
|
|
|
|
my_module_samples: 7,
|
|
|
|
step_checklist: 8,
|
|
|
|
step_asset: 9,
|
|
|
|
step_table: 10,
|
|
|
|
step_comments: 11,
|
|
|
|
result_comments: 12,
|
|
|
|
project_activity: 13, # TODO
|
|
|
|
project_samples: 14, # TODO
|
2017-06-05 18:24:06 +08:00
|
|
|
experiment: 15,
|
2017-06-08 17:23:24 +08:00
|
|
|
# Higher number because of addons
|
|
|
|
my_module_repository: 17 }
|
2017-03-08 21:14:03 +08:00
|
|
|
|
2017-05-16 21:27:36 +08:00
|
|
|
# Data type name should match corresponding model's name
|
|
|
|
REPOSITORY_DATA_TYPES = { RepositoryTextValue: 0,
|
2018-02-07 22:28:28 +08:00
|
|
|
RepositoryDateValue: 1,
|
2018-03-10 00:04:54 +08:00
|
|
|
RepositoryListValue: 2,
|
|
|
|
RepositoryAssetValue: 3 }
|
2018-03-13 18:36:05 +08:00
|
|
|
|
|
|
|
# Data types which can be imported to repository,
|
|
|
|
# name should match record in REPOSITORY_DATA_TYPES
|
|
|
|
REPOSITORY_IMPORTABLE_TYPES = %i(RepositoryTextValue RepositoryListValue)
|
|
|
|
|
2018-03-09 18:05:43 +08:00
|
|
|
# Extra attributes used for search in repositories, text columns
|
|
|
|
# are only supported
|
|
|
|
REPOSITORY_EXTRA_SEARCH_ATTR = ['repository_text_values.data',
|
|
|
|
'repository_list_items.data']
|
|
|
|
|
|
|
|
# Array of includes used in search query for repository rows
|
|
|
|
REPOSITORY_SEARCH_INCLUDES = [:repository_text_value,
|
|
|
|
repository_list_value: :repository_list_item]
|
2017-08-30 00:49:07 +08:00
|
|
|
|
|
|
|
# List of implemented core API versions
|
|
|
|
API_VERSIONS = ['20170715']
|
|
|
|
|
|
|
|
# Array used for injecting names of additional authentication methods for API
|
|
|
|
API_PLUGABLE_AUTH_METHODS = []
|
|
|
|
|
2018-03-01 16:18:36 +08:00
|
|
|
OMNIAUTH_PROVIDERS = [:linkedin]
|
2018-01-18 22:25:51 +08:00
|
|
|
|
|
|
|
INITIAL_USER_OPTIONS = {}
|
2018-03-01 21:04:57 +08:00
|
|
|
|
2018-02-26 21:23:02 +08:00
|
|
|
# Hash used for mapping file extensions to custom icons,
|
|
|
|
# 'extension' => 'path_to_the_icon'
|
|
|
|
FILE_ICON_MAPPINGS = {}
|
2016-11-08 18:26:55 +08:00
|
|
|
end
|