Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
a7a96ab03c | |||
a6db6615df | |||
1c3370a784 | |||
59f4987371 | |||
c1e24593fa |
@ -13,7 +13,6 @@ description: ''
|
|||||||
tag: ''
|
tag: ''
|
||||||
base_table: oc_activity_field_data
|
base_table: oc_activity_field_data
|
||||||
base_field: id
|
base_field: id
|
||||||
core: 8.x
|
|
||||||
display:
|
display:
|
||||||
default:
|
default:
|
||||||
display_plugin: default
|
display_plugin: default
|
||||||
@ -233,7 +232,7 @@ display:
|
|||||||
more_link_text: ''
|
more_link_text: ''
|
||||||
more_link_path: ''
|
more_link_path: ''
|
||||||
strip_tags: false
|
strip_tags: false
|
||||||
trim: true
|
trim: false
|
||||||
preserve_tags: ''
|
preserve_tags: ''
|
||||||
html: false
|
html: false
|
||||||
element_type: ''
|
element_type: ''
|
||||||
|
@ -465,20 +465,7 @@ display:
|
|||||||
entity_field: created
|
entity_field: created
|
||||||
plugin_id: date
|
plugin_id: date
|
||||||
title: ''
|
title: ''
|
||||||
header:
|
header: { }
|
||||||
area:
|
|
||||||
id: area
|
|
||||||
table: views
|
|
||||||
field: area
|
|
||||||
relationship: none
|
|
||||||
group_type: group
|
|
||||||
admin_label: ''
|
|
||||||
empty: true
|
|
||||||
tokenize: false
|
|
||||||
content:
|
|
||||||
value: '<p>To <strong>add a new case</strong>, first search for the person you want to add it to. If the person is not on the system yet, you can add them using the "People" menu.</p>'
|
|
||||||
format: basic_html
|
|
||||||
plugin_id: text
|
|
||||||
footer: { }
|
footer: { }
|
||||||
empty:
|
empty:
|
||||||
area_text_custom:
|
area_text_custom:
|
||||||
|
@ -41,3 +41,8 @@ body {
|
|||||||
.block-superfish .menu ul li a:hover {
|
.block-superfish .menu ul li a:hover {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* In views, display label at top of field. Ths is because full descriptions are displayed in the activity view so having the label in the middle means it disappears down the page. */
|
||||||
|
td.views-field {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
@ -39,6 +39,13 @@ processor_configs:
|
|||||||
sort: 40
|
sort: 40
|
||||||
settings:
|
settings:
|
||||||
sort: ASC
|
sort: ASC
|
||||||
|
exclude_specified_items:
|
||||||
|
processor_id: exclude_specified_items
|
||||||
|
weights:
|
||||||
|
build: 50
|
||||||
|
settings:
|
||||||
|
exclude: client
|
||||||
|
regex: true
|
||||||
translate_entity:
|
translate_entity:
|
||||||
processor_id: translate_entity
|
processor_id: translate_entity
|
||||||
weights:
|
weights:
|
||||||
|
31
modules/opencase_entities/opencase_entities.install
Normal file
31
modules/opencase_entities/opencase_entities.install
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add 'activity_date_time' field to 'oc_activity' entities.
|
||||||
|
*/
|
||||||
|
function opencase_entities_update_8003() {
|
||||||
|
$storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('datetime')
|
||||||
|
->setLabel(t('Date and time'))
|
||||||
|
->setDescription(t('When the activity started.'))
|
||||||
|
->setRevisionable(TRUE)
|
||||||
|
->setSettings([
|
||||||
|
'datetime_type' => 'date'
|
||||||
|
])
|
||||||
|
->setDefaultValue('2000-01-01')
|
||||||
|
->setDisplayOptions('view', [
|
||||||
|
'type' => 'datetime_default',
|
||||||
|
'settings' => [
|
||||||
|
'format_type' => 'medium',
|
||||||
|
],
|
||||||
|
'label' => 'above',
|
||||||
|
'weight' => -3,
|
||||||
|
])
|
||||||
|
->setDisplayOptions('form', [
|
||||||
|
'type' => 'datetime_default',
|
||||||
|
'weight' => -3,
|
||||||
|
]);
|
||||||
|
|
||||||
|
\Drupal::entityDefinitionUpdateManager()
|
||||||
|
->installFieldStorageDefinition('activity_date_time', 'oc_activity', 'oc_activity', $storage_definition);
|
||||||
|
}
|
||||||
|
|
@ -210,6 +210,27 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
|||||||
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
|
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
|
||||||
$fields = parent::baseFieldDefinitions($entity_type);
|
$fields = parent::baseFieldDefinitions($entity_type);
|
||||||
|
|
||||||
|
$fields['activity_date_time'] = BaseFieldDefinition::create('datetime')
|
||||||
|
->setLabel(t('Date and time'))
|
||||||
|
->setDescription(t('When the activity started.'))
|
||||||
|
->setRevisionable(TRUE)
|
||||||
|
->setSettings([
|
||||||
|
'datetime_type' => 'date'
|
||||||
|
])
|
||||||
|
->setDefaultValue('2000-01-01')
|
||||||
|
->setDisplayOptions('view', [
|
||||||
|
'label' => 'above',
|
||||||
|
'type' => 'datetime_default',
|
||||||
|
'settings' => [
|
||||||
|
'format_type' => 'medium',
|
||||||
|
],
|
||||||
|
'weight' => -3,
|
||||||
|
])
|
||||||
|
->setDisplayOptions('form', [
|
||||||
|
'type' => 'datetime_default',
|
||||||
|
'weight' => -3,
|
||||||
|
]);
|
||||||
|
|
||||||
// not currently in use. Will set view and form settings when ready
|
// not currently in use. Will set view and form settings when ready
|
||||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||||
->setLabel(t('Publishing status'))
|
->setLabel(t('Publishing status'))
|
||||||
|
@ -2,6 +2,7 @@ name: 'OpenCase'
|
|||||||
type: module
|
type: module
|
||||||
description: 'Simple Case Management'
|
description: 'Simple Case Management'
|
||||||
core: 8.x
|
core: 8.x
|
||||||
|
version: 8.x-1.6
|
||||||
package: 'OpenCase'
|
package: 'OpenCase'
|
||||||
dependencies:
|
dependencies:
|
||||||
- opencase_entities
|
- opencase_entities
|
||||||
|
@ -138,6 +138,8 @@ function opencase_form_oc_case_type_edit_form_alter(&$form, $form_state) {
|
|||||||
function opencase_uninstall() {
|
function opencase_uninstall() {
|
||||||
$configs = [
|
$configs = [
|
||||||
'block.block.opencasecontextualmenu',
|
'block.block.opencasecontextualmenu',
|
||||||
|
'block.block.opencase',
|
||||||
|
'system.menu.opencase',
|
||||||
'views.view.cases',
|
'views.view.cases',
|
||||||
'views.view.activities'
|
'views.view.activities'
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user