Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
b83f0b44b4 | |||
7f88d409f0 | |||
8841fd4d25 | |||
87241c1f87 | |||
2a1607c6d9 | |||
e4a04a254d | |||
f47ded38fa |
@ -477,7 +477,7 @@ display:
|
|||||||
admin_label: ''
|
admin_label: ''
|
||||||
empty: true
|
empty: true
|
||||||
tokenize: false
|
tokenize: false
|
||||||
content: "<p>Either there are no cases involving this person, or you do not have access to them.</p> <p>To create a case, use the sidebar menu to the right</p>"
|
content: "<p>Either there are no cases involving this person, or you do not have access to them.</p>\n"
|
||||||
plugin_id: text_custom
|
plugin_id: text_custom
|
||||||
relationships: { }
|
relationships: { }
|
||||||
arguments:
|
arguments:
|
||||||
@ -584,7 +584,7 @@ display:
|
|||||||
admin_label: ''
|
admin_label: ''
|
||||||
empty: true
|
empty: true
|
||||||
tokenize: false
|
tokenize: false
|
||||||
content: "<h1>No cases found</h1>\n<p>You do not have access to any existing cases.</p>\n<p>To <b>add a new case</b>, first search for the person you want to create a case for, using the search bar at the top right of the screen. If they are not on the system yet, add them using the <b>Add People</b> tab.</p>\n"
|
content: "<h1>No cases found</h1>\n<p>You do not have access to any existing cases.</p>\n<p>To <b>add a new case</b>, first search for the person you want to add a case to. If they are not on the system yet you can add them using the <b>Add actors</b> menu in the left sidebar.</p>\n"
|
||||||
plugin_id: text_custom
|
plugin_id: text_custom
|
||||||
cache_metadata:
|
cache_metadata:
|
||||||
max-age: -1
|
max-age: -1
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
function opencase_default_reporting_uninstall() {
|
function opencase_default_reporting_uninstall() {
|
||||||
$configs = [
|
$configs = [
|
||||||
'search_api.index.opencase_reporting_cases',
|
// 'search_api.index.opencase_reporting_cases',
|
||||||
'search_api.index.opencase_reporting_clients',
|
// 'search_api.index.opencase_reporting_clients',
|
||||||
'search_api.index.opencase_reporting_volunteers',
|
// 'search_api.index.opencase_reporting_volunteers',
|
||||||
'block.block.facet_asylum_status',
|
'block.block.facet_asylum_status',
|
||||||
'block.block.facet_created',
|
'block.block.facet_created',
|
||||||
'block.block.facet_disability',
|
'block.block.facet_disability',
|
||||||
|
@ -1,24 +1,19 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
function opencase_entities_update_8013() {
|
function opencase_entities_update_8016() {
|
||||||
$update_manager = \Drupal::entityDefinitionUpdateManager();
|
$update_manager = \Drupal::entityDefinitionUpdateManager();
|
||||||
$definition = $update_manager->getFieldStorageDefinition('activity_date_time', 'oc_activity');
|
$definition = $update_manager->getFieldStorageDefinition('activity_date_time', 'oc_activity');
|
||||||
// $definition->setDescription('');
|
|
||||||
// $definition->setRequired('');
|
|
||||||
//->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
|
|
||||||
$update_manager->updateFieldStorageDefinition($definition);
|
$update_manager->updateFieldStorageDefinition($definition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add 'activity_date_time' field to 'oc_activity' entities.
|
* Add 'activity_date_time' field to 'oc_activity' entities.
|
||||||
*/
|
*/
|
||||||
function opencase_entities_update_8003() {
|
function opencase_entities_update_8003() {
|
||||||
$storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('datetime')
|
$storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('datetime')
|
||||||
->setLabel(t('Date and time'))
|
->setLabel(t('Date and time'))
|
||||||
->setDescription(t('When the activity started.'))
|
|
||||||
->setRevisionable(TRUE)
|
->setRevisionable(TRUE)
|
||||||
->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
|
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
|
||||||
->setDisplayOptions('view', [
|
->setDisplayOptions('view', [
|
||||||
'type' => 'datetime_default',
|
'type' => 'datetime_default',
|
||||||
'settings' => [
|
'settings' => [
|
||||||
|
@ -219,10 +219,9 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
|||||||
|
|
||||||
$fields['activity_date_time'] = BaseFieldDefinition::create('datetime')
|
$fields['activity_date_time'] = BaseFieldDefinition::create('datetime')
|
||||||
->setLabel(t('Date and time'))
|
->setLabel(t('Date and time'))
|
||||||
->setDescription('')
|
|
||||||
->setRevisionable(TRUE)
|
->setRevisionable(TRUE)
|
||||||
->setRequired(TRUE)
|
->setRequired(TRUE)
|
||||||
->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
|
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
|
||||||
->setDisplayOptions('view', [
|
->setDisplayOptions('view', [
|
||||||
'label' => 'above',
|
'label' => 'above',
|
||||||
'type' => 'datetime_default',
|
'type' => 'datetime_default',
|
||||||
|
@ -2,7 +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.1
|
version: 8.x-1.6.5
|
||||||
package: 'OpenCase'
|
package: 'OpenCase'
|
||||||
dependencies:
|
dependencies:
|
||||||
- opencase_entities
|
- opencase_entities
|
||||||
|
@ -9,6 +9,29 @@ use Drupal\Core\Routing\RouteMatchInterface;
|
|||||||
use Drupal\Core\Access\AccessResult;
|
use Drupal\Core\Access\AccessResult;
|
||||||
use Drupal\opencase\EntityTypeRelationsWidget;
|
use Drupal\opencase\EntityTypeRelationsWidget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements hook_element_info_alter().
|
||||||
|
*/
|
||||||
|
function opencase_element_info_alter(array &$types) {
|
||||||
|
$types['datetime']['#process'][] = 'opencase_process_element';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Element process callback for datetime fields. Removes the seconds part.
|
||||||
|
*/
|
||||||
|
function opencase_process_element($element) {
|
||||||
|
if ($element['#date_time_element'] !== 'none') {
|
||||||
|
$element['#date_time_format'] = 'H:i';
|
||||||
|
}
|
||||||
|
if (!empty($element['time']['#value'])) {
|
||||||
|
$parts = explode(':', $element['time']['#value']);
|
||||||
|
$parts = array_splice($parts, 0, 2);
|
||||||
|
$element['time']['#value'] = implode(':', $parts);
|
||||||
|
}
|
||||||
|
// Remove seconds in browsers that support HTML5 type=date.
|
||||||
|
$element['time']['#attributes']['step'] = 60;
|
||||||
|
return $element;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_block_access
|
* Implements hook_block_access
|
||||||
|
Reference in New Issue
Block a user