Compare commits
59 Commits
Author | SHA1 | Date | |
---|---|---|---|
86c0fb1f65 | |||
92bce34fb1 | |||
02715bdc44 | |||
4ab621100f | |||
aa0c350766 | |||
17406061f9 | |||
489f4c0c94 | |||
2f06caa261 | |||
aa6d580d62 | |||
8c3f2bcbc3 | |||
55f34cb4d7 | |||
20ed3d4f39 | |||
b85cbaf398 | |||
34b7a1c7c9 | |||
fb2249d9bd | |||
614293c114 | |||
167166b898 | |||
c3f802835f | |||
13ddf5aa13 | |||
225e92a51c | |||
60c64afcab | |||
49ab81ca23 | |||
65fe65474e | |||
57fae7c1c3 | |||
cc551b0851 | |||
40435a16be | |||
f783fa2373 | |||
8b725e5a9a | |||
7c3b007ff9 | |||
f39f4a331d | |||
6069ac0901 | |||
240a55f54f | |||
b194367eef | |||
f293676fa5 | |||
ba4e6668aa | |||
3b62ebd0ee | |||
198a3f0558 | |||
833c21346d | |||
4b84c99541 | |||
0de22b7e90 | |||
dad1ffc746 | |||
f6c7519a11 | |||
27e7e3ae2a | |||
5eef57f470 | |||
d0fea802ee | |||
260979edcc | |||
dbc38e8f61 | |||
c95f8280bc | |||
24a8e8864f | |||
90c4462512 | |||
52f77cb342 | |||
5f790c73c7 | |||
f617fc207e | |||
0c9707419e | |||
042e5853bb | |||
720b6f005d | |||
cc2f03ddb3 | |||
2411813bd6 | |||
d4e8991804 |
@ -0,0 +1,8 @@
|
||||
uuid: 85aacc47-8df9-4309-b7f4-f58be70f83d0
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
name: 'Case Provider Roles'
|
||||
vid: oc_case_provider_role
|
||||
description: ''
|
||||
weight: 0
|
8
config/install/taxonomy.vocabulary.oc_fee_category.yml
Normal file
8
config/install/taxonomy.vocabulary.oc_fee_category.yml
Normal file
@ -0,0 +1,8 @@
|
||||
uuid: 93a96bb4-da95-4d69-be37-d1477624f849
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
name: 'Fee categories'
|
||||
vid: oc_fee_category
|
||||
description: ''
|
||||
weight: 0
|
@ -3,6 +3,25 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* paragraphs */
|
||||
|
||||
|
||||
.paragraph .field {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.field.field--type-entity-reference-revisions {
|
||||
border: none;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
.field.field--type-entity-reference-revisions .field__item {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* end paragraphs */
|
||||
|
||||
|
||||
/* MOVE THIS INTO GNO! */
|
||||
#block-accreditationcount {
|
||||
position: absolute;
|
||||
@ -32,16 +51,14 @@ body {
|
||||
font-size: 100% !important;
|
||||
}
|
||||
|
||||
.field--type-entity-reference-revisions .field__items {
|
||||
margin-left: 2em;
|
||||
.field.field--type-entity-reference {
|
||||
margin: inherit;
|
||||
}
|
||||
|
||||
.field--type-entity-reference-revisions .field__items .field{
|
||||
margin-top: 0;
|
||||
}
|
||||
.field--type-entity-reference-revisions .field__items .paragraph{
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
.field {
|
||||
width: 30%;
|
||||
display: inline-block;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
/* remove this confusing thing from user creation page */
|
||||
@ -130,14 +147,6 @@ td.views-field {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
/* Styling for grouped views */
|
||||
table.views-table.views-view-table caption {
|
||||
text-align: left;
|
||||
margin-bottom: 1em;
|
||||
margin-top: 2em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* remove "details" accordion, see https://drupal.stackexchange.com/questions/294312/why-has-this-details-accordion-appeared-in-this-view */
|
||||
.views-table details {
|
||||
display: none;
|
||||
@ -153,8 +162,17 @@ form.oc-organisation-relation-form tr:first-child {
|
||||
margin-top: -2.20em !important;
|
||||
}
|
||||
|
||||
.follow-up-due {
|
||||
.follow-ups-due td {
|
||||
background-color: #FB8A4F;
|
||||
}
|
||||
|
||||
#block-accreditationcount th,
|
||||
#block-accreditationcount td {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#block-accreditationcount {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
tr:nth-child(even) {
|
||||
@ -171,7 +189,6 @@ tr:nth-child(odd) {
|
||||
|
||||
.Off a {
|
||||
color:gray;
|
||||
background-color:black;
|
||||
}
|
||||
|
||||
.field--type-entity-reference-revisions {
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: 'Opencase Cases'
|
||||
type: module
|
||||
description: 'Provides case entities and a required field on activities linking them to a case.'
|
||||
core: 8.x
|
||||
core_version_requirement: 9.x
|
||||
package: OpenCase
|
||||
dependencies:
|
||||
0: opencase_entities
|
||||
|
@ -1,4 +1,20 @@
|
||||
<?php
|
||||
use \Drupal\Core\Field\BaseFieldDefinition;
|
||||
|
||||
function opencase_cases_update_90002() {
|
||||
$field_storage_definition = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Target'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSetting('target_type', 'oc_actor')
|
||||
->setSetting('handler', 'default')
|
||||
->setDefaultValueCallback('\Drupal\opencase_cases\Entity\OCCase::defaultTarget')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installFieldStorageDefinition('oc_target', 'oc_case', 'opencase_cases', $field_storage_definition);
|
||||
}
|
||||
|
||||
function opencase_cases_update_8025() {
|
||||
//check if the table exists first. If not, then create the entity.
|
||||
@ -10,7 +26,7 @@ function opencase_cases_update_8025() {
|
||||
}
|
||||
|
||||
function opencase_cases_update_8026() {
|
||||
$storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('entity_reference')
|
||||
$storage_definition = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Role'))
|
||||
->setSetting('target_type', 'taxonomy_term')
|
||||
->setSetting('handler_settings', ['target_bundles' => ['oc_case_provider_role' => 'oc_case_provider_role']])
|
||||
|
@ -7,6 +7,9 @@ declare(strict_types = 1);
|
||||
*/
|
||||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use PHPUnit\Framework\Constraint\IsEmpty;
|
||||
|
||||
use function PHPUnit\Framework\isEmpty;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
@ -17,7 +20,7 @@ function opencase_cases_help($route_name, RouteMatchInterface $route_match) {
|
||||
case 'help.page.opencase_cases':
|
||||
$output = '';
|
||||
$output .= '<h3>' . t('About') . '</h3>';
|
||||
$output .= '<p>' . t('Provides case entities and a required field on activities linking them to a case.') . '</p>';
|
||||
$output .= '<p>' . t('Provides case entities and a required field on activities linking them to a case, plus case fee and case provision entities.') . '</p>';
|
||||
return $output;
|
||||
|
||||
default:
|
||||
@ -79,35 +82,33 @@ function opencase_cases_get_case_fees(Drupal\opencase_cases\entity\OCCase $case)
|
||||
return $case_fees;
|
||||
}
|
||||
|
||||
function opencase_cases_get_amount(Drupal\opencase_cases\entity\OCCaseFee $case_fee): string {
|
||||
return $case_fee->amount->first()->value;
|
||||
/**
|
||||
* @return Drupal\opencase_cases\entity\OCActivity[]
|
||||
*/
|
||||
function opencase_cases_get_activities(Drupal\opencase_cases\entity\OCCase $case): array {
|
||||
$query = \Drupal::entityQuery('oc_activity')
|
||||
->condition('oc_case.target_id', $case->id());
|
||||
$activity_ids = $query->execute();
|
||||
$activities = [];
|
||||
foreach($activity_ids as $id) {
|
||||
$activities[] = Drupal\opencase_entities\Entity\OCActivity::load($id);
|
||||
}
|
||||
|
||||
function opencase_cases_get_case(Drupal\opencase_cases\entity\OCCaseFee $case_fee): Drupal\opencase_cases\entity\OCCase {
|
||||
return $case_fee->oc_case->referencedEntities()[0];
|
||||
}
|
||||
|
||||
function opencase_cases_update_total_fee_for_case_belonging_to_case_fee(Drupal\opencase_cases\entity\OCCaseFee $case_fee): void {
|
||||
$total = 0;
|
||||
$case = opencase_cases_get_case($case_fee);
|
||||
$case_fees = opencase_cases_get_case_fees($case);
|
||||
foreach($case_fees as $case_fee) {
|
||||
$total += opencase_cases_get_amount($case_fee);
|
||||
}
|
||||
$case->set('total_fee', $total);
|
||||
$case->save();
|
||||
return $activities;
|
||||
}
|
||||
|
||||
function opencase_cases_oc_case_fee_update(Drupal\opencase_cases\entity\OCCaseFee $case_fee): void {
|
||||
opencase_cases_update_total_fee_for_case_belonging_to_case_fee($case_fee);
|
||||
$case = $case_fee->getCase();
|
||||
$case->addToTotalFee($case_fee->amount->value - $case_fee->original->amount->value);
|
||||
}
|
||||
|
||||
function opencase_cases_oc_case_fee_insert(Drupal\opencase_cases\entity\OCCaseFee $case_fee): void {
|
||||
opencase_cases_update_total_fee_for_case_belonging_to_case_fee($case_fee);
|
||||
$case = $case_fee->getCase();
|
||||
$case->addToTotalFee($case_fee->amount->value);
|
||||
}
|
||||
|
||||
function opencase_cases_oc_case_fee_delete(Drupal\opencase_cases\entity\OCCaseFee $case_fee): void {
|
||||
opencase_cases_update_total_fee_for_case_belonging_to_case_fee($case_fee);
|
||||
$case = $case_fee->getCase();
|
||||
$case->addToTotalFee(0 - $case_fee->amount->value);
|
||||
}
|
||||
|
||||
function opencase_cases_entity_base_field_info($entity_type) {
|
||||
@ -132,6 +133,15 @@ function opencase_cases_entity_base_field_info($entity_type) {
|
||||
return $fields;
|
||||
}
|
||||
|
||||
// When deleting a case, delete the activities associated with it
|
||||
function opencase_cases_oc_case_delete(Drupal\opencase_cases\Entity\OCCase $case): void {
|
||||
$activities = opencase_cases_get_activities($case);
|
||||
foreach ($activities as $activity) {
|
||||
$activity->delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* When creating an activity, it sets the case id from the URL.
|
||||
*/
|
||||
@ -157,9 +167,16 @@ function opencase_cases_form_alter(&$form, &$form_state, $form_id) {
|
||||
function _opencase_cases_redirect_to_home($form, &$form_state) {
|
||||
$form_state->setRedirect('<front>');
|
||||
}
|
||||
|
||||
// Upon deletion of an activity, go to the related case if there is one, otherwise to its target.
|
||||
function _opencase_cases_delete_activity_redirect($form, &$form_state) {
|
||||
if (!IsEmpty($form_state->getFormObject()->getEntity()->oc_case)) {
|
||||
$case_id = $form_state->getFormObject()->getEntity()->oc_case->target_id;
|
||||
$form_state->setRedirect('entity.oc_case.canonical', ['oc_case' => $case_id]);
|
||||
} else {
|
||||
$target_actor_id = $form_state->getFormObject()->getEntity()->oc_target->target_id;
|
||||
$form_state->setRedirect('entity.oc_actor.canonical', ['oc_actor' => $target_actor_id]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Implements hook_theme_suggestions_HOOK().
|
||||
@ -177,35 +194,6 @@ function opencase_cases_theme_suggestions_oc_case(array $variables) {
|
||||
return $suggestions;
|
||||
}
|
||||
|
||||
//function opencase_views_query_alter(Drupal\views\ViewExecutable $view, $query) {
|
||||
// if ($view->getBaseEntityType() && $view->getBaseEntityType()->id() == 'oc_case') {
|
||||
// $query->addTag('oc_case_access');
|
||||
// }
|
||||
// if ($view->getBaseEntityType() && $view->getBaseEntityType()->id() == 'oc_activity') {
|
||||
// $query->addTag('oc_activity_access');
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//function opencase_query_oc_case_access_alter($query) {
|
||||
// if (\Drupal::currentUser()->hasPermission('view published case entities')) {
|
||||
// return;
|
||||
// }
|
||||
// $linked_actor_id = CaseInvolvement::getLinkedActorId(\Drupal::currentUser());
|
||||
// $query->addJoin('INNER', 'oc_case__actors_involved', 'access_filter', 'access_filter.entity_id = oc_case_field_data.id');
|
||||
// $query->condition('access_filter.actors_involved_target_id', $linked_actor_id);
|
||||
//}
|
||||
//
|
||||
//function opencase_query_oc_activity_access_alter($query) {
|
||||
// if (\Drupal::currentUser()->hasPermission('view published case entities')) {
|
||||
// return;
|
||||
// }
|
||||
// $linked_actor_id = CaseInvolvement::getLinkedActorId(\Drupal::currentUser());
|
||||
// $query->addJoin('INNER', 'oc_case__actors_involved', 'access_filter', 'access_filter.entity_id = oc_activity_field_data.oc_case');
|
||||
// $query->condition('access_filter.actors_involved_target_id', $linked_actor_id);
|
||||
//}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_theme_suggestions_HOOK().
|
||||
*/
|
||||
|
@ -29,8 +29,6 @@ delete all case provision revisions:
|
||||
title: 'Delete all revisions'
|
||||
description: 'Role requires permission to <em>view Case Provision revisions</em> and <em>delete rights</em> for case provision entities in question or <em>administer case provision entities</em>.'
|
||||
|
||||
permission_callbacks:
|
||||
- \Drupal\opencase_cases\OCCaseProvisionPermissions::generatePermissions
|
||||
add case fee entities:
|
||||
title: 'Create new Case Fee entities'
|
||||
|
||||
@ -61,6 +59,3 @@ revert all case fee revisions:
|
||||
delete all case fee revisions:
|
||||
title: 'Delete all revisions'
|
||||
description: 'Role requires permission to <em>view Case Fee revisions</em> and <em>delete rights</em> for case fee entities in question or <em>administer case fee entities</em>.'
|
||||
|
||||
permission_callbacks:
|
||||
- \Drupal\opencase_cases\OCCaseFeePermissions::generatePermissions
|
||||
|
@ -10,8 +10,11 @@ class CaseInvolvement {
|
||||
|
||||
public static function userIsInvolved($account, $case) {
|
||||
$actorId = self::getLinkedActorId($account);
|
||||
$involvedIds = array_column($case->actors_involved->getValue(), 'target_id');
|
||||
return in_array($actorId, $involvedIds);
|
||||
$query = \Drupal::entityQuery('oc_case_provision')
|
||||
->condition('oc_provider', $actorId)
|
||||
->condition('oc_case', $case->id());
|
||||
$results = $query->execute();
|
||||
return !empty($results);
|
||||
}
|
||||
|
||||
public static function userIsInvolved_activity($account, $activity) {
|
||||
|
@ -25,8 +25,8 @@ class OCCaseController extends ControllerBase implements ContainerInjectionInter
|
||||
* An array suitable for drupal_render().
|
||||
*/
|
||||
public function revisionShow($oc_case_revision) {
|
||||
$oc_case = $this->entityManager()->getStorage('oc_case')->loadRevision($oc_case_revision);
|
||||
$view_builder = $this->entityManager()->getViewBuilder('oc_case');
|
||||
$oc_case = $this->entityTypeManager()->getStorage('oc_case')->loadRevision($oc_case_revision);
|
||||
$view_builder = $this->entityTypeManager()->getViewBuilder('oc_case');
|
||||
|
||||
return $view_builder->view($oc_case);
|
||||
}
|
||||
@ -41,8 +41,10 @@ class OCCaseController extends ControllerBase implements ContainerInjectionInter
|
||||
* The page title.
|
||||
*/
|
||||
public function revisionPageTitle($oc_case_revision) {
|
||||
$oc_case = $this->entityManager()->getStorage('oc_case')->loadRevision($oc_case_revision);
|
||||
return $this->t('Revision of %title from %date', ['%title' => $oc_case->label(), '%date' => format_date($oc_case->getRevisionCreationTime())]);
|
||||
$oc_case = $this->entityTypeManager()->getStorage('oc_case')->loadRevision($oc_case_revision);
|
||||
|
||||
$date = \Drupal::service('date.formatter')->format($oc_case->getRevisionCreationTime());
|
||||
return $this->t('Revision of %title from %date', ['%title' => $oc_case->label(), '%date' => $date]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -60,7 +62,7 @@ class OCCaseController extends ControllerBase implements ContainerInjectionInter
|
||||
$langname = $oc_case->language()->getName();
|
||||
$languages = $oc_case->getTranslationLanguages();
|
||||
$has_translations = (count($languages) > 1);
|
||||
$oc_case_storage = $this->entityManager()->getStorage('oc_case');
|
||||
$oc_case_storage = $this->entityTypeManager()->getStorage('oc_case');
|
||||
|
||||
$build['#title'] = $has_translations ? $this->t('@langname revisions for %title', ['@langname' => $langname, '%title' => $oc_case->label()]) : $this->t('Revisions for %title', ['%title' => $oc_case->label()]);
|
||||
$header = [$this->t('Revision'), $this->t('Operations')];
|
||||
@ -88,10 +90,11 @@ class OCCaseController extends ControllerBase implements ContainerInjectionInter
|
||||
// Use revision link to link to revisions that are not active.
|
||||
$date = \Drupal::service('date.formatter')->format($revision->getRevisionCreationTime(), 'short');
|
||||
if ($vid != $oc_case->getRevisionId()) {
|
||||
$link = $this->l($date, new Url('entity.oc_case.revision', ['oc_case' => $oc_case->id(), 'oc_case_revision' => $vid]));
|
||||
$url = new Url('entity.oc_case.revision', ['oc_case' => $oc_case->id(), 'oc_case_revision' => $vid]);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($date, $url)->toString();
|
||||
}
|
||||
else {
|
||||
$link = $oc_case->link($date);
|
||||
$link = $oc_case->toLink($date)->toString();
|
||||
}
|
||||
|
||||
$row = [];
|
||||
|
@ -118,13 +118,14 @@ class OCCaseFeeController extends ControllerBase implements ContainerInjectionIn
|
||||
// Use revision link to link to revisions that are not active.
|
||||
$date = $this->dateFormatter->format($revision->getRevisionCreationTime(), 'short');
|
||||
if ($vid != $oc_case_fee->getRevisionId()) {
|
||||
$link = $this->l($date, new Url('entity.oc_case_fee.revision', [
|
||||
$url = new Url('entity.oc_case_fee.revision', [
|
||||
'oc_case_fee' => $oc_case_fee->id(),
|
||||
'oc_case_fee_revision' => $vid,
|
||||
]));
|
||||
]);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($date, $url)->toString();
|
||||
}
|
||||
else {
|
||||
$link = $oc_case_fee->link($date);
|
||||
$link = $oc_case_fee->toLink($date)->toString();
|
||||
}
|
||||
|
||||
$row = [];
|
||||
|
@ -118,13 +118,14 @@ class OCCaseProvisionController extends ControllerBase implements ContainerInjec
|
||||
// Use revision link to link to revisions that are not active.
|
||||
$date = $this->dateFormatter->format($revision->getRevisionCreationTime(), 'short');
|
||||
if ($vid != $oc_case_provision->getRevisionId()) {
|
||||
$link = $this->l($date, new Url('entity.oc_case_provision.revision', [
|
||||
$url = new Url('entity.oc_case_provision.revision', [
|
||||
'oc_case_provision' => $oc_case_provision->id(),
|
||||
'oc_case_provision_revision' => $vid,
|
||||
]));
|
||||
]);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($date, $url)->toString();
|
||||
}
|
||||
else {
|
||||
$link = $oc_case_provision->link($date);
|
||||
$link = $oc_case_provision->toLink($date)->toString();
|
||||
}
|
||||
|
||||
$row = [];
|
||||
|
@ -75,30 +75,39 @@ use Drupal\user\UserInterface;
|
||||
* field_ui_base_route = "entity.oc_case_type.edit_form"
|
||||
* )
|
||||
*/
|
||||
class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
class OCCase extends RevisionableContentEntityBase implements OCCaseInterface
|
||||
{
|
||||
|
||||
use EntityChangedTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function preCreate(EntityStorageInterface $storage_controller, array &$values) {
|
||||
public static function preCreate(EntityStorageInterface $storage_controller, array &$values)
|
||||
{
|
||||
parent::preCreate($storage_controller, $values);
|
||||
$values += [
|
||||
'user_id' => \Drupal::currentUser()->id(),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
public static function defaultTarget()
|
||||
{
|
||||
if (opencase_entities_get('target_id')) return [opencase_entities_get('target_id')];
|
||||
else return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function urlRouteParameters($rel) {
|
||||
protected function urlRouteParameters($rel)
|
||||
{
|
||||
$uri_route_parameters = parent::urlRouteParameters($rel);
|
||||
|
||||
if ($rel === 'revision_revert' && $this instanceof RevisionableInterface) {
|
||||
$uri_route_parameters[$this->getEntityTypeId() . '_revision'] = $this->getRevisionId();
|
||||
}
|
||||
elseif ($rel === 'revision_delete' && $this instanceof RevisionableInterface) {
|
||||
} elseif ($rel === 'revision_delete' && $this instanceof RevisionableInterface) {
|
||||
$uri_route_parameters[$this->getEntityTypeId() . '_revision'] = $this->getRevisionId();
|
||||
}
|
||||
|
||||
@ -108,7 +117,8 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function preSave(EntityStorageInterface $storage) {
|
||||
public function preSave(EntityStorageInterface $storage)
|
||||
{
|
||||
parent::preSave($storage);
|
||||
|
||||
foreach (array_keys($this->getTranslationLanguages()) as $langcode) {
|
||||
@ -130,14 +140,16 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName() {
|
||||
public function getName()
|
||||
{
|
||||
return $this->get('name')->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setName($name) {
|
||||
public function setName($name)
|
||||
{
|
||||
$this->set('name', $name);
|
||||
return $this;
|
||||
}
|
||||
@ -145,14 +157,16 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCreatedTime() {
|
||||
public function getCreatedTime()
|
||||
{
|
||||
return $this->get('created')->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setCreatedTime($timestamp) {
|
||||
public function setCreatedTime($timestamp)
|
||||
{
|
||||
$this->set('created', $timestamp);
|
||||
return $this;
|
||||
}
|
||||
@ -160,21 +174,24 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getOwner() {
|
||||
public function getOwner()
|
||||
{
|
||||
return $this->get('user_id')->entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getOwnerId() {
|
||||
public function getOwnerId()
|
||||
{
|
||||
return $this->get('user_id')->target_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setOwnerId($uid) {
|
||||
public function setOwnerId($uid)
|
||||
{
|
||||
$this->set('user_id', $uid);
|
||||
return $this;
|
||||
}
|
||||
@ -182,7 +199,8 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setOwner(UserInterface $account) {
|
||||
public function setOwner(UserInterface $account)
|
||||
{
|
||||
$this->set('user_id', $account->id());
|
||||
return $this;
|
||||
}
|
||||
@ -190,30 +208,39 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function isPublished() {
|
||||
public function isPublished()
|
||||
{
|
||||
return (bool)$this->getEntityKey('status');
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setPublished($published) {
|
||||
public function setPublished($published)
|
||||
{
|
||||
$this->set('status', $published ? TRUE : FALSE);
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addToTotalFee(float $amountToAdd): void {
|
||||
$this->set('total_fee', $this->total_fee->value + $amountToAdd);
|
||||
$this->save();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
|
||||
public static function baseFieldDefinitions(EntityTypeInterface $entity_type)
|
||||
{
|
||||
$fields = parent::baseFieldDefinitions($entity_type);
|
||||
|
||||
// not currently used. Will add form and view settings when ready
|
||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Publishing status'))
|
||||
->setLabel(t('Visible'))
|
||||
->setDescription('If this box is not ticked this record will be hidden from view for most users. Users with access to unpublished entities will be able to restore it if needed.')
|
||||
->setRevisionable(TRUE)
|
||||
->setDisplayConfigurable("form", TRUE)
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDefaultValue(TRUE);
|
||||
|
||||
$fields['user_id'] = BaseFieldDefinition::create('entity_reference')
|
||||
@ -224,12 +251,18 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
->setSetting('handler', 'default')
|
||||
->setTranslatable(TRUE)
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'author',
|
||||
'weight' => 80,
|
||||
]);
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
|
||||
$fields['oc_target'] = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Target'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSetting('target_type', 'oc_actor')
|
||||
->setSetting('handler', 'default')
|
||||
->setDefaultValueCallback('\Drupal\opencase_cases\Entity\OCCase::defaultTarget')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['name'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Title'))
|
||||
->setRevisionable(TRUE)
|
||||
@ -238,14 +271,8 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'hidden',
|
||||
'type' => 'string',
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -100,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(TRUE);
|
||||
|
||||
|
||||
@ -259,34 +286,17 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
->setSetting('uri_scheme', 'private')
|
||||
->setCardinality(-1)
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'file_generic',
|
||||
'weight' => -1,
|
||||
'settings' => [
|
||||
'progress_indicator' => 'throbber',
|
||||
],
|
||||
])
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'settings' => ['use_description_as_link_text' => 'true']
|
||||
]);
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['created'] = BaseFieldDefinition::create('created')
|
||||
->setLabel(t('Created on'))
|
||||
->setDescription(t('When the case was created.'))
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'weight' => 80,
|
||||
]);
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['changed'] = BaseFieldDefinition::create('changed')
|
||||
->setLabel(t('Last updated'))
|
||||
->setDescription(t('When the case was last edited.'))
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'weight' => 80,
|
||||
]);
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['revision_translation_affected'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Revision translation affected'))
|
||||
@ -313,7 +323,8 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
|
||||
->setSettings([
|
||||
'prefix' => '£',
|
||||
])
|
||||
->SetDisplayConfigurable("view", true);
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
@ -55,6 +55,11 @@ use Drupal\user\UserInterface;
|
||||
* "langcode" = "langcode",
|
||||
* "published" = "status",
|
||||
* },
|
||||
* revision_metadata_keys = {
|
||||
* "revision_user" = "revision_user",
|
||||
* "revision_created" = "revision_created",
|
||||
* "revision_log_message" = "revision_log",
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/opencase/oc_case_fee/{oc_case_fee}",
|
||||
* "add-page" = "/opencase/oc_case_fee/add",
|
||||
@ -185,6 +190,10 @@ class OCCaseFee extends EditorialContentEntityBase implements OCCaseFeeInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCase():\Drupal\opencase_cases\Entity\OCCase {
|
||||
return \Drupal\opencase_cases\Entity\OCCase::load($this->oc_case->target_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@ -201,21 +210,6 @@ class OCCaseFee extends EditorialContentEntityBase implements OCCaseFeeInterface
|
||||
->setSetting('target_type', 'user')
|
||||
->setSetting('handler', 'default')
|
||||
->setTranslatable(TRUE)
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'hidden',
|
||||
'type' => 'author',
|
||||
'weight' => 0,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'entity_reference_autocomplete',
|
||||
'weight' => 5,
|
||||
'settings' => [
|
||||
'match_operator' => 'CONTAINS',
|
||||
'size' => '60',
|
||||
'autocomplete_type' => 'tags',
|
||||
'placeholder' => '',
|
||||
],
|
||||
])
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE);
|
||||
|
||||
@ -228,15 +222,6 @@ class OCCaseFee extends EditorialContentEntityBase implements OCCaseFeeInterface
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -4,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -4,
|
||||
])
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE)
|
||||
->setRequired(TRUE);
|
||||
@ -267,10 +252,8 @@ class OCCaseFee extends EditorialContentEntityBase implements OCCaseFeeInterface
|
||||
->setTranslatable(TRUE)
|
||||
->setCardinality(1)
|
||||
->setDefaultValueCallback('opencase_cases_default_case_id') // defined in opencase_cases.module
|
||||
->setDisplayOptions('view', [
|
||||
'type' => 'string',
|
||||
'weight' => 0,
|
||||
])
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setRequired(TRUE);
|
||||
|
||||
$fields['oc_fee_category'] = \Drupal\Core\Field\BaseFieldDefinition::create('entity_reference')
|
||||
|
@ -30,6 +30,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* config_export = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/opencase/oc_case_fee_type/{oc_case_fee_type}",
|
||||
* "add-form" = "/opencase/oc_case_fee_type/add",
|
||||
|
@ -55,6 +55,11 @@ use Drupal\user\UserInterface;
|
||||
* "langcode" = "langcode",
|
||||
* "published" = "status",
|
||||
* },
|
||||
* revision_metadata_keys = {
|
||||
* "revision_user" = "revision_user",
|
||||
* "revision_created" = "revision_created",
|
||||
* "revision_log_message" = "revision_log",
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/opencase/oc_case_provision/{oc_case_provision}",
|
||||
* "add-page" = "/opencase/oc_case_provision/add",
|
||||
@ -72,7 +77,8 @@ use Drupal\user\UserInterface;
|
||||
* field_ui_base_route = "entity.oc_case_provision_type.edit_form"
|
||||
* )
|
||||
*/
|
||||
class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvisionInterface {
|
||||
class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvisionInterface
|
||||
{
|
||||
|
||||
use EntityChangedTrait;
|
||||
use EntityPublishedTrait;
|
||||
@ -80,7 +86,8 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function preCreate(EntityStorageInterface $storage_controller, array &$values) {
|
||||
public static function preCreate(EntityStorageInterface $storage_controller, array &$values)
|
||||
{
|
||||
parent::preCreate($storage_controller, $values);
|
||||
$values += [
|
||||
'user_id' => \Drupal::currentUser()->id(),
|
||||
@ -90,13 +97,13 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function urlRouteParameters($rel) {
|
||||
protected function urlRouteParameters($rel)
|
||||
{
|
||||
$uri_route_parameters = parent::urlRouteParameters($rel);
|
||||
|
||||
if ($rel === 'revision_revert' && $this instanceof RevisionableInterface) {
|
||||
$uri_route_parameters[$this->getEntityTypeId() . '_revision'] = $this->getRevisionId();
|
||||
}
|
||||
elseif ($rel === 'revision_delete' && $this instanceof RevisionableInterface) {
|
||||
} elseif ($rel === 'revision_delete' && $this instanceof RevisionableInterface) {
|
||||
$uri_route_parameters[$this->getEntityTypeId() . '_revision'] = $this->getRevisionId();
|
||||
}
|
||||
|
||||
@ -106,7 +113,8 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function preSave(EntityStorageInterface $storage) {
|
||||
public function preSave(EntityStorageInterface $storage)
|
||||
{
|
||||
parent::preSave($storage);
|
||||
|
||||
foreach (array_keys($this->getTranslationLanguages()) as $langcode) {
|
||||
@ -128,14 +136,16 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getName() {
|
||||
public function getName()
|
||||
{
|
||||
return $this->get('name')->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setName($name) {
|
||||
public function setName($name)
|
||||
{
|
||||
$this->set('name', $name);
|
||||
return $this;
|
||||
}
|
||||
@ -143,14 +153,16 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getCreatedTime() {
|
||||
public function getCreatedTime()
|
||||
{
|
||||
return $this->get('created')->value;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setCreatedTime($timestamp) {
|
||||
public function setCreatedTime($timestamp)
|
||||
{
|
||||
$this->set('created', $timestamp);
|
||||
return $this;
|
||||
}
|
||||
@ -158,21 +170,24 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getOwner() {
|
||||
public function getOwner()
|
||||
{
|
||||
return $this->get('user_id')->entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getOwnerId() {
|
||||
public function getOwnerId()
|
||||
{
|
||||
return $this->get('user_id')->target_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setOwnerId($uid) {
|
||||
public function setOwnerId($uid)
|
||||
{
|
||||
$this->set('user_id', $uid);
|
||||
return $this;
|
||||
}
|
||||
@ -180,7 +195,8 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setOwner(UserInterface $account) {
|
||||
public function setOwner(UserInterface $account)
|
||||
{
|
||||
$this->set('user_id', $account->id());
|
||||
return $this;
|
||||
}
|
||||
@ -188,7 +204,8 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
|
||||
public static function baseFieldDefinitions(EntityTypeInterface $entity_type)
|
||||
{
|
||||
$fields = parent::baseFieldDefinitions($entity_type);
|
||||
|
||||
// Add the published field.
|
||||
@ -201,21 +218,6 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
->setSetting('target_type', 'user')
|
||||
->setSetting('handler', 'default')
|
||||
->setTranslatable(TRUE)
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'hidden',
|
||||
'type' => 'author',
|
||||
'weight' => 0,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'entity_reference_autocomplete',
|
||||
'weight' => 5,
|
||||
'settings' => [
|
||||
'match_operator' => 'CONTAINS',
|
||||
'size' => '60',
|
||||
'autocomplete_type' => 'tags',
|
||||
'placeholder' => '',
|
||||
],
|
||||
])
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE);
|
||||
|
||||
@ -228,22 +230,18 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -4,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -4,
|
||||
])
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE)
|
||||
->setRequired(TRUE);
|
||||
|
||||
$fields['status']->setDescription(t('A boolean indicating whether the Case Provision is published.'))
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE);
|
||||
|
||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Visible'))
|
||||
->setDescription('If this box is not ticked this record will be hidden from view for most users. Users with access to unpublished entities will be able to restore it if needed.')
|
||||
->setRevisionable(TRUE)
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDefaultValue(TRUE);
|
||||
|
||||
|
||||
$fields['created'] = BaseFieldDefinition::create('created')
|
||||
@ -268,10 +266,8 @@ class OCCaseProvision extends EditorialContentEntityBase implements OCCaseProvis
|
||||
->setTranslatable(TRUE)
|
||||
->setCardinality(1)
|
||||
->setDefaultValueCallback('opencase_cases_default_case_id') // defined in opencase_cases.module
|
||||
->setDisplayOptions('view', [
|
||||
'type' => 'string',
|
||||
'weight' => 0,
|
||||
])
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE)
|
||||
->setRequired(TRUE);
|
||||
|
||||
$fields['oc_provider'] = \Drupal\Core\Field\BaseFieldDefinition::create('entity_reference')
|
||||
|
@ -30,6 +30,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* config_export = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/opencase/oc_case_provision_type/{oc_case_provision_type}",
|
||||
* "add-form" = "/opencase/oc_case_provision_type/add",
|
||||
|
@ -31,6 +31,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* config_export = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/admin/opencase/oc_case_type/{oc_case_type}",
|
||||
* "add-form" = "/admin/opencase/oc_case_type/add",
|
||||
|
@ -54,18 +54,9 @@ class OCCaseFeeForm extends ContentEntityForm {
|
||||
*/
|
||||
public function save(array $form, FormStateInterface $form_state) {
|
||||
$entity = $this->entity;
|
||||
|
||||
// Save as a new revision if requested to do so.
|
||||
if (!$form_state->isValueEmpty('new_revision') && $form_state->getValue('new_revision') != FALSE) {
|
||||
$entity->setNewRevision();
|
||||
|
||||
// If a new revision is created, save the current user as revision author.
|
||||
$entity->setRevisionCreationTime($this->time->getRequestTime());
|
||||
$entity->setRevisionUserId($this->account->id());
|
||||
}
|
||||
else {
|
||||
$entity->setNewRevision(FALSE);
|
||||
}
|
||||
$entity->setRevisionCreationTime(REQUEST_TIME);
|
||||
$entity->setRevisionUserId(\Drupal::currentUser()->id());
|
||||
|
||||
$status = parent::save($form, $form_state);
|
||||
|
||||
|
@ -38,18 +38,9 @@ class OCCaseForm extends ContentEntityForm {
|
||||
*/
|
||||
public function save(array $form, FormStateInterface $form_state) {
|
||||
$entity = $this->entity;
|
||||
|
||||
// Save as a new revision if requested to do so.
|
||||
if (!$form_state->isValueEmpty('new_revision') && $form_state->getValue('new_revision') != FALSE) {
|
||||
$entity->setNewRevision();
|
||||
|
||||
// If a new revision is created, save the current user as revision author.
|
||||
$entity->setRevisionCreationTime( \Drupal::time()->getRequestTime());
|
||||
$entity->setRevisionCreationTime(REQUEST_TIME);
|
||||
$entity->setRevisionUserId(\Drupal::currentUser()->id());
|
||||
}
|
||||
else {
|
||||
$entity->setNewRevision(FALSE);
|
||||
}
|
||||
|
||||
$status = parent::save($form, $form_state);
|
||||
|
||||
|
@ -54,18 +54,9 @@ class OCCaseProvisionForm extends ContentEntityForm {
|
||||
*/
|
||||
public function save(array $form, FormStateInterface $form_state) {
|
||||
$entity = $this->entity;
|
||||
|
||||
// Save as a new revision if requested to do so.
|
||||
if (!$form_state->isValueEmpty('new_revision') && $form_state->getValue('new_revision') != FALSE) {
|
||||
$entity->setNewRevision();
|
||||
|
||||
// If a new revision is created, save the current user as revision author.
|
||||
$entity->setRevisionCreationTime($this->time->getRequestTime());
|
||||
$entity->setRevisionUserId($this->account->id());
|
||||
}
|
||||
else {
|
||||
$entity->setNewRevision(FALSE);
|
||||
}
|
||||
$entity->setRevisionCreationTime(REQUEST_TIME);
|
||||
$entity->setRevisionUserId(\Drupal::currentUser()->id());
|
||||
|
||||
$status = parent::save($form, $form_state);
|
||||
|
||||
|
@ -107,7 +107,7 @@ class OCCaseRevisionDeleteForm extends ConfirmFormBase {
|
||||
$this->OCCaseStorage->deleteRevision($this->revision->getRevisionId());
|
||||
|
||||
$this->logger('content')->notice('Case: deleted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
|
||||
drupal_set_message(t('Revision from %revision-date of Case %title has been deleted.', ['%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
|
||||
\Drupal::messenger()->addMessage(t('Revision from %revision-date of Case %title has been deleted.', ['%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
|
||||
$form_state->setRedirect(
|
||||
'entity.oc_case.canonical',
|
||||
['oc_case' => $this->revision->id()]
|
||||
|
@ -120,7 +120,7 @@ class OCCaseRevisionRevertForm extends ConfirmFormBase {
|
||||
$this->revision->save();
|
||||
|
||||
$this->logger('content')->notice('Case: reverted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
|
||||
drupal_set_message(t('Case %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
|
||||
\Drupal::messenger()->addMessage(t('Case %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
|
||||
$form_state->setRedirect(
|
||||
'entity.oc_case.version_history',
|
||||
['oc_case' => $this->revision->id()]
|
||||
|
@ -38,7 +38,7 @@ class OCCaseTypeDeleteForm extends EntityConfirmFormBase {
|
||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||
$this->entity->delete();
|
||||
|
||||
drupal_set_message(
|
||||
\Drupal::messenger()->addMessage(
|
||||
$this->t('content @type: deleted @label.',
|
||||
[
|
||||
'@type' => $this->entity->bundle(),
|
||||
|
@ -49,13 +49,13 @@ class OCCaseTypeForm extends EntityForm {
|
||||
|
||||
switch ($status) {
|
||||
case SAVED_NEW:
|
||||
drupal_set_message($this->t('Created the %label Case type.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Created the %label Case type.', [
|
||||
'%label' => $oc_case_type->label(),
|
||||
]));
|
||||
break;
|
||||
|
||||
default:
|
||||
drupal_set_message($this->t('Saved the %label Case type.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Saved the %label Case type.', [
|
||||
'%label' => $oc_case_type->label(),
|
||||
]));
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ class OCCaseAccessControlHandler extends EntityAccessControlHandler {
|
||||
case 'update': // you can edit the case only if a) you can see it and b) you have the permission to edit cases.
|
||||
return AccessResult::allowedIf(
|
||||
$account->hasPermission('edit case entities')
|
||||
&& ($account->hasPermission('view published case entities') || CaseInvolvement::userIsInvolved($account, $entity))
|
||||
);
|
||||
case 'delete': // you can delete the case only if a) you can see it and b) you have the permission to delete cases.
|
||||
return AccessResult::allowedIf(
|
||||
|
@ -16,18 +16,7 @@
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes.addClass('oc_case') }}>
|
||||
<h2>{{ title }}</h2>
|
||||
<div class="oc_entity">
|
||||
<div class="left">
|
||||
{{ base_fields.actors_involved }}
|
||||
{{ base_fields.changed }}
|
||||
{{ base_fields.created }}
|
||||
{{ base_fields.user_id }}
|
||||
</div>
|
||||
<div class="right">
|
||||
{% for field in other_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% if content %}
|
||||
{{- content -}}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -1,28 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.asylum_status
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: facet_asylum_status
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:asylum_status'
|
||||
settings:
|
||||
id: 'facet_block:asylum_status'
|
||||
label: 'Asylum Status'
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: facet_asylum_status
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: '/opencase/reporting/clients'
|
||||
negate: false
|
||||
context_mapping: { }
|
@ -1,28 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.created
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: facet_created
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:created'
|
||||
settings:
|
||||
id: 'facet_block:created'
|
||||
label: 'Created Date'
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: facet_created
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: '/opencase/reporting/clients'
|
||||
negate: false
|
||||
context_mapping: { }
|
@ -1,28 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.disability
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: facet_disability
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:disability'
|
||||
settings:
|
||||
id: 'facet_block:disability'
|
||||
label: 'Disability'
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: facet_disability
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: '/opencase/reporting/clients'
|
||||
negate: false
|
||||
context_mapping: { }
|
@ -1,28 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.gender_identified_with
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: facet_gender_identified_with
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:gender_identified_with'
|
||||
settings:
|
||||
id: 'facet_block:gender_identified_with'
|
||||
label: 'Gender Identity'
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: facet_gender_identified_with
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: '/opencase/reporting/clients'
|
||||
negate: false
|
||||
context_mapping: { }
|
@ -1,28 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.languages
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: facet_languages
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:languages'
|
||||
settings:
|
||||
id: 'facet_block:languages'
|
||||
label: 'Languages'
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: facet_languages
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: '/opencase/reporting/clients'
|
||||
negate: false
|
||||
context_mapping: { }
|
@ -1,28 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.involved_parties
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: involvedparties
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:involved_parties'
|
||||
settings:
|
||||
id: 'facet_block:involved_parties'
|
||||
label: 'Involved Parties'
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: involvedparties
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: /opencase/reporting/cases
|
||||
negate: false
|
||||
context_mapping: { }
|
@ -1,28 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.nationalities
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: nationalities
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:nationalities'
|
||||
settings:
|
||||
id: 'facet_block:nationalities'
|
||||
label: Nationalities
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: nationalities
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: /opencase/reporting/clients
|
||||
negate: false
|
||||
context_mapping: { }
|
@ -1,28 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.osic_level
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: osiclevel
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:osic_level'
|
||||
settings:
|
||||
id: 'facet_block:osic_level'
|
||||
label: 'OSIC level'
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: osiclevel
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: /opencase/reporting/volunteers
|
||||
negate: false
|
||||
context_mapping: { }
|
@ -1,29 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- facets.facet.outcome
|
||||
module:
|
||||
- facets
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: outcome
|
||||
theme: bartik
|
||||
region: sidebar_second
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'facet_block:outcome'
|
||||
settings:
|
||||
id: 'facet_block:outcome'
|
||||
label: Outcome
|
||||
provider: facets
|
||||
label_display: visible
|
||||
block_id: outcome
|
||||
visibility:
|
||||
request_path:
|
||||
id: request_path
|
||||
pages: /opencase/reporting/cases
|
||||
negate: false
|
||||
context_mapping: { }
|
||||
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: asylum_status
|
||||
name: 'Asylum status'
|
||||
url_alias: asylum_status
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_asylum_status
|
||||
facet_source_id: 'search_api:views_page__reporting_clients__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: asylum_status_export
|
||||
name: 'Asylum status'
|
||||
url_alias: asylum_status
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_asylum_status
|
||||
facet_source_id: 'search_api:views_data_export__reporting_clients__data_export_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,67 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: created
|
||||
name: Created
|
||||
url_alias: created
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: created
|
||||
facet_source_id: 'search_api:views_page__reporting_clients__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: true
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
active_widget_order:
|
||||
processor_id: active_widget_order
|
||||
weights:
|
||||
sort: -8
|
||||
settings:
|
||||
sort: DESC
|
||||
count_widget_order:
|
||||
processor_id: count_widget_order
|
||||
weights:
|
||||
sort: -9
|
||||
settings:
|
||||
sort: DESC
|
||||
date_item:
|
||||
processor_id: date_item
|
||||
weights:
|
||||
build: 35
|
||||
settings:
|
||||
date_display: actual_date
|
||||
granularity: 5
|
||||
date_format: ''
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: -10
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,67 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
module:
|
||||
- views_data_export
|
||||
id: created_export
|
||||
name: 'Created - Export'
|
||||
url_alias: created
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: created
|
||||
facet_source_id: 'search_api:views_data_export__reporting_clients__data_export_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: true
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
active_widget_order:
|
||||
processor_id: active_widget_order
|
||||
weights:
|
||||
sort: 20
|
||||
settings:
|
||||
sort: DESC
|
||||
count_widget_order:
|
||||
processor_id: count_widget_order
|
||||
weights:
|
||||
sort: 30
|
||||
settings:
|
||||
sort: DESC
|
||||
date_item:
|
||||
processor_id: date_item
|
||||
weights:
|
||||
build: 35
|
||||
settings:
|
||||
date_display: actual_date
|
||||
granularity: 5
|
||||
date_format: ''
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
||||
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: disability
|
||||
name: 'Disability'
|
||||
url_alias: disability
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_disability
|
||||
facet_source_id: 'search_api:views_page__reporting_clients__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: disability_export
|
||||
name: 'Disability'
|
||||
url_alias: disability
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_disability
|
||||
facet_source_id: 'search_api:views_data_export__reporting_clients__data_export_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: gender_identified_with
|
||||
name: 'Gender Identity'
|
||||
url_alias: gender_identified_with
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_gender_identified_with
|
||||
facet_source_id: 'search_api:views_page__reporting_clients__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: gender_identified_with_export
|
||||
name: 'Gender Identity'
|
||||
url_alias: gender_identified_with
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_gender_identified_with
|
||||
facet_source_id: 'search_api:views_data_export__reporting_clients__data_export_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,62 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_cases
|
||||
- views.view.reporting_cases
|
||||
module:
|
||||
- search_api
|
||||
id: involved_parties
|
||||
name: 'Involved Parties'
|
||||
url_alias: involved_parties
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: actors_involved
|
||||
facet_source_id: 'search_api:views_page__reporting_cases__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
show_reset_link: false
|
||||
reset_text: 'Show all'
|
||||
hide_reset_when_no_selection: false
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
exclude_specified_items:
|
||||
processor_id: exclude_specified_items
|
||||
weights:
|
||||
build: 50
|
||||
settings:
|
||||
exclude: client
|
||||
regex: true
|
||||
translate_entity:
|
||||
processor_id: translate_entity
|
||||
weights:
|
||||
build: 5
|
||||
settings: { }
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,55 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_cases
|
||||
- views.view.reporting_cases
|
||||
module:
|
||||
- search_api
|
||||
id: involved_parties_export
|
||||
name: 'Involved Parties (Export)'
|
||||
url_alias: involved_parties
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: actors_involved
|
||||
facet_source_id: 'search_api:views_data_export__reporting_cases__data_export_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
show_reset_link: false
|
||||
reset_text: 'Show all'
|
||||
hide_reset_when_no_selection: false
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
translate_entity:
|
||||
processor_id: translate_entity
|
||||
weights:
|
||||
build: 5
|
||||
settings: { }
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: languages
|
||||
name: 'Languages'
|
||||
url_alias: languages
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_languages_spoken
|
||||
facet_source_id: 'search_api:views_page__reporting_clients__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: languages_export
|
||||
name: 'Languages'
|
||||
url_alias: languages
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_languages_spoken
|
||||
facet_source_id: 'search_api:views_data_export__reporting_clients__data_export_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
- views.view.reporting_clients
|
||||
module:
|
||||
- search_api
|
||||
id: nationalities
|
||||
name: Nationalities
|
||||
url_alias: nationalities
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_nationalities
|
||||
facet_source_id: 'search_api:views_page__reporting_clients__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,58 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_clients
|
||||
module:
|
||||
- views_data_export
|
||||
id: nationalities_export
|
||||
name: Nationalities-export
|
||||
url_alias: nationalities_export
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_nationalities
|
||||
facet_source_id: 'search_api:views_data_export__reporting_clients__data_export_1'
|
||||
widget:
|
||||
type: links
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
active_widget_order:
|
||||
processor_id: active_widget_order
|
||||
weights:
|
||||
sort: 20
|
||||
settings:
|
||||
sort: DESC
|
||||
count_widget_order:
|
||||
processor_id: count_widget_order
|
||||
weights:
|
||||
sort: 30
|
||||
settings:
|
||||
sort: DESC
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,47 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_volunteers
|
||||
- views.view.reporting_volunteers
|
||||
module:
|
||||
- search_api
|
||||
id: osic_level
|
||||
name: 'OSIC level'
|
||||
url_alias: osic_level
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_osic_level
|
||||
facet_source_id: 'search_api:views_page__reporting_volunteers__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,58 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_volunteers
|
||||
module:
|
||||
- views_data_export
|
||||
id: osic_level_export
|
||||
name: 'OSIC level Export'
|
||||
url_alias: osic_level
|
||||
weight: 0
|
||||
min_count: 1
|
||||
show_only_one_result: false
|
||||
field_identifier: field_osic_level
|
||||
facet_source_id: 'search_api:views_data_export__reporting_volunteers__data_export_1'
|
||||
widget:
|
||||
type: links
|
||||
config:
|
||||
show_numbers: false
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: true
|
||||
processor_configs:
|
||||
active_widget_order:
|
||||
processor_id: active_widget_order
|
||||
weights:
|
||||
sort: 20
|
||||
settings:
|
||||
sort: DESC
|
||||
count_widget_order:
|
||||
processor_id: count_widget_order
|
||||
weights:
|
||||
sort: 30
|
||||
settings:
|
||||
sort: DESC
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: none
|
||||
show_title: false
|
@ -1,52 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_cases
|
||||
- views.view.reporting_cases
|
||||
module:
|
||||
- search_api
|
||||
id: outcome
|
||||
name: Outcome
|
||||
url_alias: outcome
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_outcome
|
||||
facet_source_id: 'search_api:views_page__reporting_cases__page_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: true
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
show_reset_link: false
|
||||
reset_text: 'Show all'
|
||||
hide_reset_when_no_selection: false
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: false
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: text
|
||||
text_format: plain_text
|
||||
text: ''
|
||||
show_title: false
|
@ -1,52 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- search_api.index.opencase_reporting_cases
|
||||
- views.view.reporting_cases
|
||||
module:
|
||||
- search_api
|
||||
id: outcome_export
|
||||
name: Outcome (Export)
|
||||
url_alias: outcome
|
||||
weight: 0
|
||||
min_count: 0
|
||||
show_only_one_result: false
|
||||
field_identifier: field_outcome
|
||||
facet_source_id: 'search_api:views_data_export__reporting_cases__data_export_1'
|
||||
widget:
|
||||
type: checkbox
|
||||
config:
|
||||
show_numbers: true
|
||||
soft_limit: 0
|
||||
soft_limit_settings:
|
||||
show_less_label: 'Show less'
|
||||
show_more_label: 'Show more'
|
||||
show_reset_link: false
|
||||
reset_text: 'Show all'
|
||||
hide_reset_when_no_selection: false
|
||||
query_operator: or
|
||||
use_hierarchy: false
|
||||
expand_hierarchy: false
|
||||
enable_parent_when_child_gets_disabled: true
|
||||
hard_limit: 0
|
||||
exclude: false
|
||||
only_visible_when_facet_source_is_visible: false
|
||||
processor_configs:
|
||||
display_value_widget_order:
|
||||
processor_id: display_value_widget_order
|
||||
weights:
|
||||
sort: 40
|
||||
settings:
|
||||
sort: ASC
|
||||
url_processor_handler:
|
||||
processor_id: url_processor_handler
|
||||
weights:
|
||||
pre_query: 50
|
||||
build: 15
|
||||
settings: { }
|
||||
empty_behavior:
|
||||
behavior: text
|
||||
text_format: plain_text
|
||||
text: ''
|
||||
show_title: false
|
@ -1,57 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- opencase_entities
|
||||
- search_api
|
||||
config:
|
||||
- field.storage.oc_case.field_outcome
|
||||
- search_api.server.opencase_reporting_server
|
||||
id: opencase_reporting_cases
|
||||
name: 'OpenCase Reporting: Cases'
|
||||
description: ''
|
||||
read_only: false
|
||||
field_settings:
|
||||
actors_involved:
|
||||
label: 'Involved Parties'
|
||||
datasource_id: 'entity:oc_case'
|
||||
property_path: actors_involved
|
||||
type: integer
|
||||
dependencies:
|
||||
module:
|
||||
- opencase_entities
|
||||
created:
|
||||
label: Created
|
||||
datasource_id: 'entity:oc_case'
|
||||
property_path: created
|
||||
type: date
|
||||
dependencies:
|
||||
module:
|
||||
- opencase_entities
|
||||
field_outcome:
|
||||
label: Outcome
|
||||
datasource_id: 'entity:oc_case'
|
||||
property_path: field_outcome
|
||||
type: string
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_case.field_outcome
|
||||
datasource_settings:
|
||||
'entity:oc_case':
|
||||
bundles:
|
||||
default: true
|
||||
selected: { }
|
||||
languages:
|
||||
default: true
|
||||
selected: { }
|
||||
processor_settings:
|
||||
add_url: { }
|
||||
aggregated_field: { }
|
||||
rendered_item: { }
|
||||
tracker_settings:
|
||||
default:
|
||||
indexing_order: fifo
|
||||
options:
|
||||
index_directly: true
|
||||
cron_limit: 50
|
||||
server: opencase_reporting_server
|
@ -1,110 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_asylum_status
|
||||
- field.storage.oc_actor.field_disability
|
||||
- field.storage.oc_actor.field_gender_identified_with
|
||||
- field.storage.oc_actor.field_languages_spoken
|
||||
- field.storage.oc_actor.field_nationalities
|
||||
- search_api.server.opencase_reporting_server
|
||||
module:
|
||||
- opencase_entities
|
||||
- search_api
|
||||
id: opencase_reporting_clients
|
||||
name: 'OpenCase Reporting: Clients'
|
||||
description: ''
|
||||
read_only: false
|
||||
field_settings:
|
||||
created:
|
||||
label: Created
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: created
|
||||
type: date
|
||||
dependencies:
|
||||
module:
|
||||
- opencase_entities
|
||||
field_asylum_status:
|
||||
label: 'Asylum status'
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: field_asylum_status
|
||||
type: string
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_asylum_status
|
||||
field_disability:
|
||||
label: Disability
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: field_disability
|
||||
type: string
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_disability
|
||||
field_gender_identified_with:
|
||||
label: 'Gender identified with'
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: field_gender_identified_with
|
||||
type: string
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_gender_identified_with
|
||||
field_languages_spoken:
|
||||
label: 'Languages spoken'
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: field_languages_spoken
|
||||
type: string
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_languages_spoken
|
||||
field_nationalities:
|
||||
label: Nationality
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: field_nationalities
|
||||
type: string
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_nationalities
|
||||
first_name:
|
||||
label: 'First Name'
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: first_name
|
||||
type: string
|
||||
dependencies:
|
||||
module:
|
||||
- opencase_entities
|
||||
last_name:
|
||||
label: 'Last Name'
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: last_name
|
||||
type: string
|
||||
dependencies:
|
||||
module:
|
||||
- opencase_entities
|
||||
post_code:
|
||||
label: 'Post Code'
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: post_code
|
||||
type: string
|
||||
dependencies:
|
||||
module:
|
||||
- opencase_entities
|
||||
datasource_settings:
|
||||
'entity:oc_actor':
|
||||
bundles:
|
||||
default: false
|
||||
selected:
|
||||
- client
|
||||
languages:
|
||||
default: true
|
||||
selected: { }
|
||||
processor_settings:
|
||||
add_url: { }
|
||||
aggregated_field: { }
|
||||
rendered_item: { }
|
||||
tracker_settings:
|
||||
default:
|
||||
indexing_order: fifo
|
||||
options:
|
||||
index_directly: true
|
||||
cron_limit: 50
|
||||
server: opencase_reporting_server
|
@ -1,59 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_languages_spoken
|
||||
- field.storage.oc_actor.field_osic_level
|
||||
- search_api.server.opencase_reporting_server
|
||||
module:
|
||||
- opencase_entities
|
||||
- search_api
|
||||
id: opencase_reporting_volunteers
|
||||
name: 'OpenCase Reporting: Volunteers'
|
||||
description: ''
|
||||
read_only: false
|
||||
field_settings:
|
||||
field_languages_spoken:
|
||||
label: 'Languages spoken'
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: field_languages_spoken
|
||||
type: string
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_languages_spoken
|
||||
field_osic_level:
|
||||
label: 'OSIC level'
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: field_osic_level
|
||||
type: string
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_osic_level
|
||||
name:
|
||||
label: Name
|
||||
datasource_id: 'entity:oc_actor'
|
||||
property_path: name
|
||||
type: string
|
||||
dependencies:
|
||||
module:
|
||||
- opencase_entities
|
||||
datasource_settings:
|
||||
'entity:oc_actor':
|
||||
bundles:
|
||||
default: false
|
||||
selected:
|
||||
- volunteer
|
||||
languages:
|
||||
default: true
|
||||
selected: { }
|
||||
processor_settings:
|
||||
add_url: { }
|
||||
aggregated_field: { }
|
||||
rendered_item: { }
|
||||
tracker_settings:
|
||||
default:
|
||||
indexing_order: fifo
|
||||
options:
|
||||
index_directly: true
|
||||
cron_limit: 50
|
||||
server: opencase_reporting_server
|
@ -1,728 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_asylum_status
|
||||
- field.storage.oc_actor.field_marital_
|
||||
module:
|
||||
- opencase_entities
|
||||
- options
|
||||
- user
|
||||
id: name_and_status_changes
|
||||
label: 'Name and Status Changes'
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: oc_actor_field_revision
|
||||
base_field: vid
|
||||
display:
|
||||
default:
|
||||
display_plugin: default
|
||||
id: default
|
||||
display_title: Master
|
||||
position: 0
|
||||
display_options:
|
||||
access:
|
||||
type: perm
|
||||
options:
|
||||
perm: 'view published case entities'
|
||||
cache:
|
||||
type: tag
|
||||
options: { }
|
||||
query:
|
||||
type: views_query
|
||||
options:
|
||||
disable_sql_rewrite: false
|
||||
distinct: false
|
||||
replica: false
|
||||
query_comment: ''
|
||||
query_tags: { }
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Go
|
||||
reset_button: false
|
||||
reset_button_label: Reset
|
||||
exposed_sorts_label: 'Sort by'
|
||||
expose_sort_order: false
|
||||
sort_asc_label: Asc
|
||||
sort_desc_label: Desc
|
||||
pager:
|
||||
type: none
|
||||
options:
|
||||
offset: 0
|
||||
style:
|
||||
type: table
|
||||
options:
|
||||
grouping:
|
||||
-
|
||||
field: view_oc_actor
|
||||
rendered: true
|
||||
rendered_strip: false
|
||||
row_class: ''
|
||||
default_row_class: true
|
||||
override: true
|
||||
sticky: false
|
||||
caption: ''
|
||||
summary: ''
|
||||
description: ''
|
||||
columns:
|
||||
first_name: first_name
|
||||
middle_names: middle_names
|
||||
last_name: last_name
|
||||
field_asylum_status-revision_id: field_asylum_status-revision_id
|
||||
field_marital_-revision_id: field_marital_-revision_id
|
||||
view_oc_actor: view_oc_actor
|
||||
revision_created: revision_created
|
||||
info:
|
||||
first_name:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
middle_names:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
last_name:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
field_asylum_status-revision_id:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
field_marital_-revision_id:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
view_oc_actor:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
revision_created:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
default: '-1'
|
||||
empty_table: false
|
||||
row:
|
||||
type: fields
|
||||
options:
|
||||
inline: { }
|
||||
separator: ''
|
||||
hide_empty: false
|
||||
default_field_elements: true
|
||||
fields:
|
||||
revision_created:
|
||||
id: revision_created
|
||||
table: oc_actor_revision
|
||||
field: revision_created
|
||||
relationship: none
|
||||
group_type: min
|
||||
admin_label: ''
|
||||
label: 'Date changed'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: true
|
||||
text: '{{ revision_created | date(''d/m/Y'') }}'
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
set_precision: false
|
||||
precision: 0
|
||||
decimal: .
|
||||
separator: ''
|
||||
format_plural: 0
|
||||
format_plural_string: !!binary MQNAY291bnQ=
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
click_sort_column: value
|
||||
type: timestamp
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
field_api_classes: false
|
||||
entity_type: oc_actor
|
||||
entity_field: revision_created
|
||||
plugin_id: field
|
||||
first_name:
|
||||
id: first_name
|
||||
table: oc_actor_field_revision
|
||||
field: first_name
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'First Name'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: false
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
entity_type: oc_actor
|
||||
entity_field: first_name
|
||||
plugin_id: field
|
||||
middle_names:
|
||||
id: middle_names
|
||||
table: oc_actor_field_revision
|
||||
field: middle_names
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Middle Names'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: false
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
entity_type: oc_actor
|
||||
entity_field: middle_names
|
||||
plugin_id: field
|
||||
last_name:
|
||||
id: last_name
|
||||
table: oc_actor_field_revision
|
||||
field: last_name
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Last Name'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: false
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
entity_type: oc_actor
|
||||
entity_field: last_name
|
||||
plugin_id: field
|
||||
field_asylum_status-revision_id:
|
||||
id: field_asylum_status-revision_id
|
||||
table: oc_actor_revision__field_asylum_status
|
||||
field: field_asylum_status-revision_id
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Asylum status'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
plugin_id: field
|
||||
field_marital_-revision_id:
|
||||
id: field_marital_-revision_id
|
||||
table: oc_actor_revision__field_marital_
|
||||
field: field_marital_-revision_id
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Marital status'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
plugin_id: field
|
||||
view_oc_actor:
|
||||
id: view_oc_actor
|
||||
table: oc_actor_field_revision
|
||||
field: view_oc_actor
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: ''
|
||||
exclude: true
|
||||
alter:
|
||||
alter_text: true
|
||||
text: 'View current record for this person ▼'
|
||||
make_link: true
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: false
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
text: 'See "rewrite results" (had to do it that way because contains HTML).'
|
||||
output_url_as_text: false
|
||||
absolute: false
|
||||
entity_type: oc_actor
|
||||
plugin_id: entity_link
|
||||
filters:
|
||||
first_name:
|
||||
id: first_name
|
||||
table: oc_actor_field_revision
|
||||
field: first_name
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: starts
|
||||
value: ''
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: first_name_op
|
||||
label: 'First Name'
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: first_name_op
|
||||
operator_limit_selection: false
|
||||
operator_list: { }
|
||||
identifier: first_name
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
anonymous: '0'
|
||||
administrator: '0'
|
||||
overseer: '0'
|
||||
caseworker: '0'
|
||||
volunteer_co_ord: '0'
|
||||
opencase_admin: '0'
|
||||
placeholder: ''
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
entity_type: oc_actor
|
||||
entity_field: first_name
|
||||
plugin_id: string
|
||||
last_name:
|
||||
id: last_name
|
||||
table: oc_actor_field_revision
|
||||
field: last_name
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
operator: starts
|
||||
value: ''
|
||||
group: 1
|
||||
exposed: true
|
||||
expose:
|
||||
operator_id: last_name_op
|
||||
label: 'Last Name'
|
||||
description: ''
|
||||
use_operator: false
|
||||
operator: last_name_op
|
||||
operator_limit_selection: false
|
||||
operator_list: { }
|
||||
identifier: last_name
|
||||
required: false
|
||||
remember: false
|
||||
multiple: false
|
||||
remember_roles:
|
||||
authenticated: authenticated
|
||||
anonymous: '0'
|
||||
administrator: '0'
|
||||
overseer: '0'
|
||||
caseworker: '0'
|
||||
volunteer_co_ord: '0'
|
||||
opencase_admin: '0'
|
||||
placeholder: ''
|
||||
is_grouped: false
|
||||
group_info:
|
||||
label: ''
|
||||
description: ''
|
||||
identifier: ''
|
||||
optional: true
|
||||
widget: select
|
||||
multiple: false
|
||||
remember: false
|
||||
default_group: All
|
||||
default_group_multiple: { }
|
||||
group_items: { }
|
||||
entity_type: oc_actor
|
||||
entity_field: last_name
|
||||
plugin_id: string
|
||||
sorts:
|
||||
revision_created:
|
||||
id: revision_created
|
||||
table: oc_actor_revision
|
||||
field: revision_created
|
||||
relationship: none
|
||||
group_type: min
|
||||
admin_label: ''
|
||||
order: ASC
|
||||
exposed: false
|
||||
expose:
|
||||
label: ''
|
||||
granularity: second
|
||||
entity_type: oc_actor
|
||||
entity_field: revision_created
|
||||
plugin_id: date
|
||||
header: { }
|
||||
footer: { }
|
||||
empty: { }
|
||||
relationships: { }
|
||||
arguments: { }
|
||||
display_extenders: { }
|
||||
group_by: true
|
||||
use_ajax: true
|
||||
title: 'Name, Asylum and Marital Status Report'
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_actor.field_asylum_status'
|
||||
- 'config:field.storage.oc_actor.field_marital_'
|
||||
page_1:
|
||||
display_plugin: page
|
||||
id: page_1
|
||||
display_title: Page
|
||||
position: 1
|
||||
display_options:
|
||||
path: opencase/reporting/name_and_status_changes
|
||||
display_extenders:
|
||||
library_in_views_display_extender: { }
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_actor.field_asylum_status'
|
||||
- 'config:field.storage.oc_actor.field_marital_'
|
@ -1,482 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_case.field_outcome
|
||||
- search_api.index.opencase_reporting_cases
|
||||
module:
|
||||
- csv_serialization
|
||||
- options
|
||||
- rest
|
||||
- search_api
|
||||
- serialization
|
||||
- user
|
||||
- views_data_export
|
||||
id: reporting_cases
|
||||
label: 'Reporting: Cases'
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: search_api_index_opencase_reporting_cases
|
||||
base_field: search_api_id
|
||||
core: 8.x
|
||||
display:
|
||||
default:
|
||||
display_plugin: default
|
||||
id: default
|
||||
display_title: Master
|
||||
position: 0
|
||||
display_options:
|
||||
access:
|
||||
type: perm
|
||||
options:
|
||||
perm: 'use opencase'
|
||||
cache:
|
||||
type: none
|
||||
options: { }
|
||||
query:
|
||||
type: views_query
|
||||
options:
|
||||
bypass_access: false
|
||||
skip_access: false
|
||||
preserve_facet_query_args: false
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Apply
|
||||
reset_button: false
|
||||
reset_button_label: Reset
|
||||
exposed_sorts_label: 'Sort by'
|
||||
expose_sort_order: true
|
||||
sort_asc_label: Asc
|
||||
sort_desc_label: Desc
|
||||
pager:
|
||||
type: mini
|
||||
options:
|
||||
items_per_page: 20
|
||||
offset: 0
|
||||
id: 0
|
||||
total_pages: null
|
||||
expose:
|
||||
items_per_page: false
|
||||
items_per_page_label: 'Items per page'
|
||||
items_per_page_options: '5, 10, 25, 50'
|
||||
items_per_page_options_all: false
|
||||
items_per_page_options_all_label: '- All -'
|
||||
offset: false
|
||||
offset_label: Offset
|
||||
tags:
|
||||
previous: ‹‹
|
||||
next: ››
|
||||
style:
|
||||
type: table
|
||||
options:
|
||||
grouping: { }
|
||||
row_class: ''
|
||||
default_row_class: true
|
||||
override: true
|
||||
sticky: false
|
||||
caption: ''
|
||||
summary: ''
|
||||
description: ''
|
||||
columns:
|
||||
name: name
|
||||
type: type
|
||||
actors_involved: actors_involved
|
||||
field_outcome: field_outcome
|
||||
info:
|
||||
name:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
type:
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
actors_involved:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
field_outcome:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
default: '-1'
|
||||
empty_table: false
|
||||
row:
|
||||
type: fields
|
||||
fields:
|
||||
name:
|
||||
id: name
|
||||
table: search_api_datasource_opencase_reporting_cases_entity_oc_case
|
||||
field: name
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: false
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: true
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
entity_type: oc_case
|
||||
plugin_id: search_api_field
|
||||
type:
|
||||
id: type
|
||||
table: search_api_datasource_opencase_reporting_cases_entity_oc_case
|
||||
field: type
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: false
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: target_id
|
||||
type: entity_reference_label
|
||||
settings:
|
||||
link: false
|
||||
group_column: target_id
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api_entity
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
display_methods:
|
||||
oc_case_type:
|
||||
display_method: label
|
||||
entity_type: oc_case
|
||||
plugin_id: search_api_field
|
||||
actors_involved:
|
||||
table: search_api_index_opencase_reporting_cases
|
||||
field: actors_involved
|
||||
id: actors_involved
|
||||
entity_type: null
|
||||
entity_field: null
|
||||
plugin_id: search_api_field
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: target_id
|
||||
type: entity_reference_label
|
||||
settings: { }
|
||||
group_column: target_id
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api_entity
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
display_methods: { }
|
||||
field_outcome:
|
||||
id: field_outcome
|
||||
table: search_api_index_opencase_reporting_cases
|
||||
field: field_outcome
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: ''
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: false
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
plugin_id: search_api_field
|
||||
filters: { }
|
||||
sorts: { }
|
||||
title: 'Reporting: Cases'
|
||||
header: { }
|
||||
footer: { }
|
||||
empty: { }
|
||||
relationships: { }
|
||||
arguments: { }
|
||||
display_extenders: { }
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_case.field_outcome'
|
||||
data_export_1:
|
||||
display_plugin: data_export
|
||||
id: data_export_1
|
||||
display_title: 'Data export'
|
||||
position: 2
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: opencase/reporting/cases
|
||||
filename: '[view:title].csv'
|
||||
displays:
|
||||
page_1: page_1
|
||||
default: '0'
|
||||
style:
|
||||
type: data_export
|
||||
options:
|
||||
formats:
|
||||
csv: csv
|
||||
csv_settings:
|
||||
delimiter: ','
|
||||
enclosure: '"'
|
||||
escape_char: \
|
||||
strip_tags: true
|
||||
trim: true
|
||||
encoding: utf8
|
||||
xls_settings:
|
||||
xls_format: Excel2007
|
||||
metadata:
|
||||
creator: ''
|
||||
last_modified_by: ''
|
||||
title: ''
|
||||
description: ''
|
||||
subject: ''
|
||||
keywords: ''
|
||||
category: ''
|
||||
manager: ''
|
||||
company: ''
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- request_format
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_case.field_outcome'
|
||||
page_1:
|
||||
display_plugin: page
|
||||
id: page_1
|
||||
display_title: Page
|
||||
position: 1
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: opencase/reporting/cases
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_case.field_outcome'
|
@ -1,682 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_asylum_status
|
||||
- field.storage.oc_actor.field_disability
|
||||
- field.storage.oc_actor.field_gender_identified_with
|
||||
- field.storage.oc_actor.field_languages_spoken
|
||||
- field.storage.oc_actor.field_nationalities
|
||||
- search_api.index.opencase_reporting_clients
|
||||
module:
|
||||
- csv_serialization
|
||||
- options
|
||||
- rest
|
||||
- search_api
|
||||
- serialization
|
||||
- user
|
||||
- views_data_export
|
||||
id: reporting_clients
|
||||
label: 'Reporting: Clients'
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: search_api_index_opencase_reporting_clients
|
||||
base_field: search_api_id
|
||||
core: 8.x
|
||||
display:
|
||||
default:
|
||||
display_plugin: default
|
||||
id: default
|
||||
display_title: Master
|
||||
position: 0
|
||||
display_options:
|
||||
access:
|
||||
type: perm
|
||||
options:
|
||||
perm: 'use opencase'
|
||||
cache:
|
||||
type: tag
|
||||
options: { }
|
||||
query:
|
||||
type: views_query
|
||||
options:
|
||||
bypass_access: false
|
||||
skip_access: false
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Apply
|
||||
reset_button: false
|
||||
reset_button_label: Reset
|
||||
exposed_sorts_label: 'Sort by'
|
||||
expose_sort_order: true
|
||||
sort_asc_label: Asc
|
||||
sort_desc_label: Desc
|
||||
pager:
|
||||
type: mini
|
||||
options:
|
||||
items_per_page: 50
|
||||
offset: 0
|
||||
id: 0
|
||||
total_pages: null
|
||||
tags:
|
||||
previous: ‹‹
|
||||
next: ››
|
||||
expose:
|
||||
items_per_page: false
|
||||
items_per_page_label: 'Items per page'
|
||||
items_per_page_options: '5, 10, 25, 50'
|
||||
items_per_page_options_all: false
|
||||
items_per_page_options_all_label: '- All -'
|
||||
offset: false
|
||||
offset_label: Offset
|
||||
style:
|
||||
type: table
|
||||
row:
|
||||
type: fields
|
||||
fields:
|
||||
name:
|
||||
id: name
|
||||
table: search_api_datasource_opencase_reporting_clients_entity_oc_actor
|
||||
field: name
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Name
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: true
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
entity_type: oc_actor
|
||||
plugin_id: search_api_field
|
||||
field_asylum_status:
|
||||
id: field_asylum_status
|
||||
table: search_api_index_opencase_reporting_clients
|
||||
field: field_asylum_status
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Asylum status'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
entity_type: null
|
||||
entity_field: null
|
||||
plugin_id: search_api_field
|
||||
field_disability:
|
||||
id: field_disability
|
||||
table: search_api_index_opencase_reporting_clients
|
||||
field: field_disability
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Disability
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: false
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
plugin_id: search_api_field
|
||||
field_gender_identified_with:
|
||||
id: field_gender_identified_with
|
||||
table: search_api_index_opencase_reporting_clients
|
||||
field: field_gender_identified_with
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Gender ID'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
plugin_id: search_api_field
|
||||
field_nationalities:
|
||||
id: field_nationalities
|
||||
table: search_api_datasource_opencase_reporting_clients_entity_oc_actor
|
||||
field: field_nationalities
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Nationality
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
entity_type: oc_actor
|
||||
plugin_id: search_api_field
|
||||
field_languages_spoken:
|
||||
id: field_languages_spoken
|
||||
table: search_api_index_opencase_reporting_clients
|
||||
field: field_languages_spoken
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Languages
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
plugin_id: search_api_field
|
||||
post_code:
|
||||
id: post_code
|
||||
table: search_api_datasource_opencase_reporting_clients_entity_oc_actor
|
||||
field: post_code
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Post Code'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: false
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
entity_type: oc_actor
|
||||
plugin_id: search_api_field
|
||||
filters: { }
|
||||
sorts: { }
|
||||
title: 'Client Report'
|
||||
header:
|
||||
entity_block_content:
|
||||
id: entity_block_content
|
||||
table: views
|
||||
field: entity_block_content
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
empty: false
|
||||
tokenize: true
|
||||
target: 944ff38d-5931-4439-91d5-f53b5ad7aac7
|
||||
view_mode: default
|
||||
bypass_access: false
|
||||
plugin_id: entity
|
||||
footer: { }
|
||||
empty: { }
|
||||
relationships: { }
|
||||
arguments: { }
|
||||
display_extenders: { }
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_actor.field_asylum_status'
|
||||
- 'config:field.storage.oc_actor.field_disability'
|
||||
- 'config:field.storage.oc_actor.field_gender_identified_with'
|
||||
- 'config:field.storage.oc_actor.field_languages_spoken'
|
||||
- 'config:field.storage.oc_actor.field_nationalities'
|
||||
data_export_1:
|
||||
display_plugin: data_export
|
||||
id: data_export_1
|
||||
display_title: 'Data export'
|
||||
position: 2
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: opencase/reporting/clients
|
||||
filename: '[view:title].csv'
|
||||
cache:
|
||||
type: none
|
||||
defaults:
|
||||
cache: false
|
||||
displays:
|
||||
page_1: page_1
|
||||
default: '0'
|
||||
style:
|
||||
type: data_export
|
||||
options:
|
||||
formats:
|
||||
csv: csv
|
||||
csv_settings:
|
||||
delimiter: ','
|
||||
enclosure: '"'
|
||||
escape_char: \
|
||||
strip_tags: true
|
||||
trim: true
|
||||
encoding: utf8
|
||||
xls_settings:
|
||||
xls_format: Excel2007
|
||||
metadata:
|
||||
creator: ''
|
||||
last_modified_by: ''
|
||||
title: ''
|
||||
description: ''
|
||||
subject: ''
|
||||
keywords: ''
|
||||
category: ''
|
||||
manager: ''
|
||||
company: ''
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- request_format
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_actor.field_asylum_status'
|
||||
- 'config:field.storage.oc_actor.field_disability'
|
||||
- 'config:field.storage.oc_actor.field_gender_identified_with'
|
||||
- 'config:field.storage.oc_actor.field_languages_spoken'
|
||||
- 'config:field.storage.oc_actor.field_nationalities'
|
||||
page_1:
|
||||
display_plugin: page
|
||||
id: page_1
|
||||
display_title: Page
|
||||
position: 1
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: opencase/reporting/clients
|
||||
cache:
|
||||
type: none
|
||||
defaults:
|
||||
cache: false
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_actor.field_asylum_status'
|
||||
- 'config:field.storage.oc_actor.field_disability'
|
||||
- 'config:field.storage.oc_actor.field_gender_identified_with'
|
||||
- 'config:field.storage.oc_actor.field_languages_spoken'
|
||||
- 'config:field.storage.oc_actor.field_nationalities'
|
@ -1,395 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- field.storage.oc_actor.field_languages_spoken
|
||||
- field.storage.oc_actor.field_osic_level
|
||||
- search_api.index.opencase_reporting_volunteers
|
||||
module:
|
||||
- csv_serialization
|
||||
- options
|
||||
- rest
|
||||
- search_api
|
||||
- serialization
|
||||
- user
|
||||
- views_data_export
|
||||
id: reporting_volunteers
|
||||
label: 'Reporting: Volunteers'
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: search_api_index_opencase_reporting_volunteers
|
||||
base_field: search_api_id
|
||||
core: 8.x
|
||||
display:
|
||||
default:
|
||||
display_plugin: default
|
||||
id: default
|
||||
display_title: Master
|
||||
position: 0
|
||||
display_options:
|
||||
access:
|
||||
type: perm
|
||||
options:
|
||||
perm: 'use opencase'
|
||||
cache:
|
||||
type: tag
|
||||
options: { }
|
||||
query:
|
||||
type: views_query
|
||||
options:
|
||||
bypass_access: false
|
||||
skip_access: false
|
||||
exposed_form:
|
||||
type: basic
|
||||
options:
|
||||
submit_button: Apply
|
||||
reset_button: false
|
||||
reset_button_label: Reset
|
||||
exposed_sorts_label: 'Sort by'
|
||||
expose_sort_order: true
|
||||
sort_asc_label: Asc
|
||||
sort_desc_label: Desc
|
||||
pager:
|
||||
type: mini
|
||||
options:
|
||||
items_per_page: 50
|
||||
offset: 0
|
||||
id: 0
|
||||
total_pages: null
|
||||
expose:
|
||||
items_per_page: false
|
||||
items_per_page_label: 'Items per page'
|
||||
items_per_page_options: '5, 10, 25, 50'
|
||||
items_per_page_options_all: false
|
||||
items_per_page_options_all_label: '- All -'
|
||||
offset: false
|
||||
offset_label: Offset
|
||||
tags:
|
||||
previous: ‹‹
|
||||
next: ››
|
||||
style:
|
||||
type: table
|
||||
options:
|
||||
grouping: { }
|
||||
row_class: ''
|
||||
default_row_class: true
|
||||
override: true
|
||||
sticky: false
|
||||
caption: ''
|
||||
summary: ''
|
||||
description: ''
|
||||
columns:
|
||||
field_languages_spoken: field_languages_spoken
|
||||
info:
|
||||
field_languages_spoken:
|
||||
sortable: false
|
||||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
responsive: ''
|
||||
default: '-1'
|
||||
empty_table: false
|
||||
row:
|
||||
type: fields
|
||||
fields:
|
||||
name:
|
||||
id: name
|
||||
table: search_api_index_opencase_reporting_volunteers
|
||||
field: name
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: Name
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: string
|
||||
settings:
|
||||
link_to_entity: true
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
plugin_id: search_api_field
|
||||
field_languages_spoken_1:
|
||||
id: field_languages_spoken_1
|
||||
table: search_api_index_opencase_reporting_volunteers
|
||||
field: field_languages_spoken
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'Languages spoken'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
plugin_id: search_api_field
|
||||
field_osic_level:
|
||||
id: field_osic_level
|
||||
table: search_api_index_opencase_reporting_volunteers
|
||||
field: field_osic_level
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
label: 'OSIC level'
|
||||
exclude: false
|
||||
alter:
|
||||
alter_text: false
|
||||
text: ''
|
||||
make_link: false
|
||||
path: ''
|
||||
absolute: false
|
||||
external: false
|
||||
replace_spaces: false
|
||||
path_case: none
|
||||
trim_whitespace: false
|
||||
alt: ''
|
||||
rel: ''
|
||||
link_class: ''
|
||||
prefix: ''
|
||||
suffix: ''
|
||||
target: ''
|
||||
nl2br: false
|
||||
max_length: 0
|
||||
word_boundary: true
|
||||
ellipsis: true
|
||||
more_link: false
|
||||
more_link_text: ''
|
||||
more_link_path: ''
|
||||
strip_tags: false
|
||||
trim: false
|
||||
preserve_tags: ''
|
||||
html: false
|
||||
element_type: ''
|
||||
element_class: ''
|
||||
element_label_type: ''
|
||||
element_label_class: ''
|
||||
element_label_colon: true
|
||||
element_wrapper_type: ''
|
||||
element_wrapper_class: ''
|
||||
element_default_classes: true
|
||||
empty: ''
|
||||
hide_empty: false
|
||||
empty_zero: false
|
||||
hide_alter_empty: true
|
||||
click_sort_column: value
|
||||
type: list_default
|
||||
settings: { }
|
||||
group_column: value
|
||||
group_columns: { }
|
||||
group_rows: true
|
||||
delta_limit: 0
|
||||
delta_offset: 0
|
||||
delta_reversed: false
|
||||
delta_first_last: false
|
||||
multi_type: separator
|
||||
separator: ', '
|
||||
field_api_classes: false
|
||||
field_rendering: true
|
||||
fallback_handler: search_api
|
||||
fallback_options:
|
||||
link_to_item: false
|
||||
use_highlighting: false
|
||||
multi_type: separator
|
||||
multi_separator: ', '
|
||||
plugin_id: search_api_field
|
||||
filters: { }
|
||||
sorts: { }
|
||||
title: 'Volunteer Report'
|
||||
header: { }
|
||||
footer: { }
|
||||
empty: { }
|
||||
relationships: { }
|
||||
arguments: { }
|
||||
display_extenders: { }
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_actor.field_languages_spoken'
|
||||
- 'config:field.storage.oc_actor.field_osic_level'
|
||||
data_export_1:
|
||||
display_plugin: data_export
|
||||
id: data_export_1
|
||||
display_title: 'Data export'
|
||||
position: 2
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: opencase/reporting/volunteers
|
||||
filename: '[view:title].csv'
|
||||
cache:
|
||||
type: none
|
||||
defaults:
|
||||
cache: false
|
||||
displays:
|
||||
page_1: page_1
|
||||
default: '0'
|
||||
style:
|
||||
type: data_export
|
||||
options:
|
||||
formats:
|
||||
csv: csv
|
||||
csv_settings:
|
||||
delimiter: ','
|
||||
enclosure: '"'
|
||||
escape_char: \
|
||||
strip_tags: true
|
||||
trim: true
|
||||
encoding: utf8
|
||||
xls_settings:
|
||||
xls_format: Excel2007
|
||||
metadata:
|
||||
creator: ''
|
||||
last_modified_by: ''
|
||||
title: ''
|
||||
description: ''
|
||||
subject: ''
|
||||
keywords: ''
|
||||
category: ''
|
||||
manager: ''
|
||||
company: ''
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- request_format
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_actor.field_languages_spoken'
|
||||
- 'config:field.storage.oc_actor.field_osic_level'
|
||||
page_1:
|
||||
display_plugin: page
|
||||
id: page_1
|
||||
display_title: Page
|
||||
position: 1
|
||||
display_options:
|
||||
display_extenders: { }
|
||||
path: opencase/reporting/volunteers
|
||||
cache:
|
||||
type: none
|
||||
defaults:
|
||||
cache: false
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
contexts:
|
||||
- 'languages:language_content'
|
||||
- 'languages:language_interface'
|
||||
- url.query_args
|
||||
- user.permissions
|
||||
tags:
|
||||
- 'config:field.storage.oc_actor.field_languages_spoken'
|
||||
- 'config:field.storage.oc_actor.field_osic_level'
|
@ -1,9 +0,0 @@
|
||||
name: 'Opencase example reporting'
|
||||
type: module
|
||||
description: 'Reporting on the types of people, cases etc that the Opencase Defaults module provides'
|
||||
core: 8.x
|
||||
package: 'OpenCase'
|
||||
dependencies:
|
||||
- opencase_defaults
|
||||
- opencase_reporting
|
||||
- opencase_cases
|
@ -1,7 +0,0 @@
|
||||
opencase_default_reporting.report_on_status_changes:
|
||||
title: 'Status Changes'
|
||||
description: "Report on changes to people's name, asylum or marital status"
|
||||
parent: opencase_reporting.reporting_menu
|
||||
url: internal:/opencase/reporting/name_and_status_changes
|
||||
weight: 2
|
||||
|
@ -1,43 +0,0 @@
|
||||
<?php
|
||||
|
||||
function opencase_default_reporting_uninstall() {
|
||||
$configs = [
|
||||
'search_api.index.opencase_reporting_cases',
|
||||
'search_api.index.opencase_reporting_clients',
|
||||
'search_api.index.opencase_reporting_volunteers',
|
||||
'block.block.facet_asylum_status',
|
||||
'block.block.facet_created',
|
||||
'block.block.facet_disability',
|
||||
'block.block.facet_gender_identified_with',
|
||||
'block.block.facet_languages',
|
||||
'block.block.nationalities',
|
||||
'block.block.osiclevel',
|
||||
'block.block.outcome',
|
||||
'block.block.involvedparties',
|
||||
'views.view.reporting_clients',
|
||||
'views.view.reporting_volunteers',
|
||||
'views.view.reporting_cases',
|
||||
'views.view.name_and_status_changes',
|
||||
'facets.facet.asylum_status_export',
|
||||
'facets.facet.disability',
|
||||
'facets.facet.nationalities_export',
|
||||
'facets.facet.asylum_status',
|
||||
'facets.facet.gender_identified_with_export',
|
||||
'facets.facet.nationalities',
|
||||
'facets.facet.created_export',
|
||||
'facets.facet.gender_identified_with',
|
||||
'facets.facet.osic_level_export',
|
||||
'facets.facet.created',
|
||||
'facets.facet.languages_export',
|
||||
'facets.facet.osic_level',
|
||||
'facets.facet.disability_export',
|
||||
'facets.facet.languages',
|
||||
'facets.facet.outcome',
|
||||
'facets.facet.outcome_export',
|
||||
'facets.facet.involved_parties',
|
||||
'facets.facet.involved_parties_export',
|
||||
];
|
||||
foreach($configs as $config) {
|
||||
Drupal::configFactory()->getEditable($config)->delete();
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
name: 'Opencase Example Configuration'
|
||||
type: module
|
||||
description: 'Person types, case types, activity types and user roles suited to an asylum advice group'
|
||||
core: 8.x
|
||||
core_version_requirement: "^9"
|
||||
package: 'OpenCase'
|
||||
dependencies:
|
||||
- contact
|
||||
|
@ -10,8 +10,12 @@ use Drupal\Core\Field\BaseFieldDefinition;
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\user\Entity\Role;
|
||||
use Drupal\user\RoleInterface;
|
||||
use Drupal\opencase\EntityTypeRelationsWidget;
|
||||
|
||||
|
||||
|
||||
function opencase_defaults_client_callback():array {
|
||||
return [\Drupal::request()->query->get('client_id')];
|
||||
}
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
@ -28,31 +32,6 @@ function opencase_defaults_help($route_name, RouteMatchInterface $route_match) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_page_title
|
||||
*
|
||||
* Modify the page title to include more information
|
||||
*/
|
||||
function opencase_defaults_preprocess_page_title(&$variables) {
|
||||
|
||||
$route_name = \Drupal::routeMatch()->getRouteName();
|
||||
switch ($route_name) {
|
||||
case 'entity.oc_case.canonical':
|
||||
$case = \Drupal::routeMatch()->getParameter('oc_case');
|
||||
$variables['title'] = $case->getName() . ": Case Details and Files";
|
||||
break;
|
||||
case 'view.cases.page_1':
|
||||
$actor_id = \Drupal::routeMatch()->getParameter('actor_id');
|
||||
$actor = \Drupal::entityTypeManager()->getStorage('oc_actor')->load($actor_id);
|
||||
$variables['title'] = $actor->getName() . ": Cases";
|
||||
break;
|
||||
case 'view.activities.page_1':
|
||||
$case_id = \Drupal::routeMatch()->getParameter('case_id');
|
||||
$case = \Drupal::entityTypeManager()->getStorage('oc_case')->load($case_id);
|
||||
$variables['title'] = $case->getName() . ": Activities";
|
||||
break;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Implements hook_theme().
|
||||
*/
|
||||
@ -64,33 +43,6 @@ function opencase_defaults_theme() {
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_block_access
|
||||
*
|
||||
* Forbids the opencase_contextual_menu block on pages where it has no content.
|
||||
* (Without this, it was displaying an empty sidebar)
|
||||
*/
|
||||
function opencase_defaults_block_access(\Drupal\block\Entity\Block $block, $operation, \Drupal\Core\Session\AccountInterface $account) {
|
||||
if ($operation == 'view' && $block->getPluginId() == 'opencase_contextual_menu') {
|
||||
$route_name = \Drupal::routeMatch()->getRouteName();
|
||||
$routes_where_it_should_be_shown = [
|
||||
'entity.oc_actor.canonical',
|
||||
'entity.oc_actor.edit_form',
|
||||
'view.cases.page_1',
|
||||
'entity.oc_case.canonical',
|
||||
'entity.oc_case.edit_form',
|
||||
'entity.oc_case.add_form',
|
||||
'view.activities.page_1',
|
||||
'entity.oc_activity.canonical',
|
||||
'entity.oc_activity.edit_form',
|
||||
'entity.oc_activity.add_form',
|
||||
];
|
||||
return AccessResult::forbiddenIf(!in_array($route_name, $routes_where_it_should_be_shown))->addCacheableDependency($block);
|
||||
}
|
||||
|
||||
// No opinion.
|
||||
return AccessResult::neutral();
|
||||
}
|
||||
|
||||
function opencase_defaults_entity_base_field_info($entity_type) {
|
||||
$fields = array();
|
||||
@ -108,62 +60,21 @@ function opencase_defaults_entity_base_field_info($entity_type) {
|
||||
'weight' => -6,
|
||||
));
|
||||
}
|
||||
|
||||
// Add Involved Parties field to cases
|
||||
if ($entity_type->id() === 'oc_case') {
|
||||
$fields['actors_involved'] = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Involved Parties'))
|
||||
->setDescription(t('People involved in this case. To add one, start typing their name.'))
|
||||
$fields['client'] = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel('Client')
|
||||
->setSetting('target_type', 'oc_actor')
|
||||
->setSetting('handler', 'default')
|
||||
->setTranslatable(TRUE)
|
||||
->setCardinality(-1)
|
||||
->setDisplayOptions('form', [
|
||||
'label' => 'above',
|
||||
'type' => 'entity_reference_autocomplete',
|
||||
'weight' => -2,
|
||||
'settings' => [
|
||||
'match_operator' => 'CONTAINS',
|
||||
'size' => '60',
|
||||
'autocomplete_type' => 'tags',
|
||||
'placeholder' => '',
|
||||
],
|
||||
->setCardinality(1)
|
||||
->setSetting('handler_settings', [
|
||||
['target_bundles' => ['client' => 'client'] ]
|
||||
])
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
])
|
||||
->setDefaultValueCallback('opencase_defaults_actors_involved_callback')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDefaultValueCallback('opencase_defaults_client_callback')
|
||||
->setRequired(TRUE);
|
||||
}
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* When creating a case, it sets the first involved party to the actor
|
||||
* id from the URL, and the second to the author's linked actor
|
||||
* (if it exists and is different)
|
||||
*/
|
||||
function opencase_defaults_actors_involved_callback() {
|
||||
$author_linked_actor_id = \Drupal\user\Entity\User::load(\Drupal::currentUser()->id())->get('field_linked_opencase_actor')->target_id;
|
||||
$currently_viewed_actor_id = \Drupal::request()->query->get('actor_id');
|
||||
return array_unique([$currently_viewed_actor_id, $author_linked_actor_id]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_ID_alter
|
||||
*/
|
||||
function opencase_defaults_form_oc_case_type_add_form_alter(&$form, $form_state) {
|
||||
$widget = new EntityTypeRelationsWidget();
|
||||
$widget->setup($form);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_form_ID_alter
|
||||
*/
|
||||
function opencase_defaults_form_oc_case_type_edit_form_alter(&$form, $form_state) {
|
||||
$widget = new EntityTypeRelationsWidget();
|
||||
$widget->setup($form);
|
||||
$widget->populate($form);
|
||||
}
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\opencase;
|
||||
|
||||
/**
|
||||
* Stuff to do with the relationship of case types to actor types, and activity types to case types
|
||||
*
|
||||
*/
|
||||
class EntityTypeRelations {
|
||||
|
||||
|
||||
public static function getAllowedActorTypesForCaseType($case_type) {
|
||||
$base_field_override = \Drupal\Core\Field\Entity\BaseFieldOverride::load("oc_case.$case_type.actors_involved");
|
||||
$allowedActorTypes = array();
|
||||
if ($base_field_override) {
|
||||
$allowedActorTypes = $base_field_override->getSettings()['handler_settings']['target_bundles'];
|
||||
}
|
||||
return $allowedActorTypes; // // format: ['volunteer' => 0, 'client' => 'client']
|
||||
}
|
||||
|
||||
public static function getAllowedActivityTypesForCaseType($case_type) {
|
||||
$caseTypeConfig = \Drupal::entityTypeManager()->getStorage('oc_case_type')->load($case_type);
|
||||
$allowedActivityTypes = $caseTypeConfig->get('allowedActivityTypes'); // format: ['application' => 'application', 'interview' => 0]
|
||||
if (!$allowedActivityTypes) $allowedActivityTypes = array();
|
||||
return $allowedActivityTypes;
|
||||
}
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\opencase;
|
||||
|
||||
/**
|
||||
* Manages GUI for configuring relations between case types and actor types, or activity types and case types
|
||||
*
|
||||
*/
|
||||
class EntityTypeRelationsWidget {
|
||||
|
||||
/**
|
||||
* Adds actor type and activity type checkboxes to the case type form, and adds the submit handler
|
||||
*
|
||||
* $form - the form to be modified (reference)
|
||||
*/
|
||||
public function setup(&$form) {
|
||||
$actor_types = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_actor');
|
||||
$options = array();
|
||||
foreach($actor_types as $machine_name => $info) {
|
||||
$options[$machine_name] = $info['label'];
|
||||
}
|
||||
$form['allowed_actor_types'] = array(
|
||||
'#title' => t('Allowed involved parties'),
|
||||
'#description' => t('Types of people that can be involved in this kind of case.'),
|
||||
'#type' => 'checkboxes',
|
||||
'#options' => $options
|
||||
);
|
||||
$activity_types = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_activity');
|
||||
$options = array();
|
||||
foreach($activity_types as $machine_name => $info) {
|
||||
$options[$machine_name] = $info['label'];
|
||||
}
|
||||
$form['allowed_activity_types'] = array(
|
||||
'#title' => t('Activity types'),
|
||||
'#description' => t('Types of activities that can be logged against this case.'),
|
||||
'#type' => 'checkboxes',
|
||||
'#options' => $options
|
||||
);
|
||||
$form['actions']['submit']['#submit'][] = array($this, 'submit');
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the form with actor/activity types that are already set
|
||||
*
|
||||
* $form - the form to be modified (reference)
|
||||
*/
|
||||
public function populate(&$form) {
|
||||
$case_type = $form['id']['#default_value'];
|
||||
$allowedActorTypes = EntityTypeRelations::getAllowedActorTypesForCaseType($case_type);
|
||||
$form['allowed_actor_types']['#default_value'] = $allowedActorTypes;
|
||||
$allowedActivityTypes = EntityTypeRelations::getAllowedActivityTypesForCaseType($case_type);
|
||||
$form['allowed_activity_types']['#default_value'] = $allowedActivityTypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Submit callback which takes the data from the actor types and activity types fields and
|
||||
* creates/edits the relevant config objects
|
||||
*
|
||||
* $form - the form that is being submitted
|
||||
* $form_state - the data in the form
|
||||
*/
|
||||
public function submit($form, $form_state) {
|
||||
$case_type_machine_name = $form['id']['#default_value'] ? $form['id']['#default_value'] : $form_state->getValue('id');
|
||||
$base_field_override = \Drupal\Core\Field\Entity\BaseFieldOverride::load("oc_case.$case_type_machine_name.actors_involved");
|
||||
if (!$base_field_override) {
|
||||
$entity_fields = \Drupal::service('entity_field.manager')->getBaseFieldDefinitions('oc_case');
|
||||
$field_definition = $entity_fields['actors_involved'];
|
||||
$base_field_override = \Drupal\Core\field\Entity\BaseFieldOverride::createFromBaseFieldDefinition($field_definition, $case_type_machine_name);
|
||||
}
|
||||
$base_field_override->setSetting('handler_settings', ['target_bundles' => $form_state->getValue('allowed_actor_types')]);
|
||||
$base_field_override->save();
|
||||
$caseTypeConfig = \Drupal::entityTypeManager()->getStorage('oc_case_type')->load($case_type_machine_name);
|
||||
$caseTypeConfig->set('allowedActivityTypes', $form_state->getValue('allowed_activity_types'));
|
||||
$caseTypeConfig->save();
|
||||
}
|
||||
}
|
@ -1,244 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\opencase\Plugin\Block;
|
||||
|
||||
use Drupal\opencase\EntityTypeRelations;
|
||||
use Drupal\Core\Block\BlockBase;
|
||||
use Drupal\Core\Link;
|
||||
use Drupal\Core\Url;
|
||||
|
||||
/**
|
||||
* Provides a 'ContextualMenu' block.
|
||||
*
|
||||
* Displays contextual links on certain pages.
|
||||
* The block is forbidden by hook_block_access on other pages, so if more are added they need adding there too.
|
||||
*
|
||||
* @Block(
|
||||
* id = "opencase_contextual_menu",
|
||||
* admin_label = @Translation("OpenCase Contextual Menu"),
|
||||
* )
|
||||
*/
|
||||
class ContextualMenu extends BlockBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function build() {
|
||||
|
||||
$route_name = \Drupal::routeMatch()->getRouteName();
|
||||
switch ($route_name) {
|
||||
case 'entity.oc_actor.canonical':
|
||||
case 'entity.oc_actor.edit_form':
|
||||
$markup = $this->actorPage();
|
||||
break;
|
||||
case 'view.cases.page_1':
|
||||
$markup = $this->caseListPageForActor();
|
||||
break;
|
||||
case 'entity.oc_case.canonical':
|
||||
case 'entity.oc_case.edit_form':
|
||||
$markup = $this->casePage();
|
||||
break;
|
||||
case 'entity.oc_case.add_form':
|
||||
$markup = $this->caseAddPage();
|
||||
break;
|
||||
case 'view.activities.page_1':
|
||||
$markup = $this->activityListPage();
|
||||
break;
|
||||
case 'entity.oc_activity.canonical':
|
||||
case 'entity.oc_activity.edit_form':
|
||||
$markup = $this->activityPage();
|
||||
break;
|
||||
case 'entity.oc_activity.add_form':
|
||||
$markup = $this->activityAddPage();
|
||||
break;
|
||||
}
|
||||
|
||||
$build = [];
|
||||
$build['contextual_menu'] = [
|
||||
'#markup' => "<div id='opencase_contextual_menu'>$markup</div",
|
||||
'#cache' => ['max-age' => 0]
|
||||
];
|
||||
return $build;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contextual menu for Actor page
|
||||
* - Link to case list for that actor
|
||||
*/
|
||||
private function actorPage() {
|
||||
$actor_id = \Drupal::routeMatch()->getParameter('oc_actor')->id();
|
||||
$link = $this->getCaseListLink('oc_actor', $actor_id);
|
||||
return $this->asNavLinks([$link]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Contextual menu for Case list page
|
||||
* - Link to actor whose case list this is
|
||||
* - Links to add cases of various types
|
||||
* - Store the actor id in the session, so that the user experiences
|
||||
* a hierachy actor->case->activities which they can navigate
|
||||
*/
|
||||
private function caseListPageForActor() {
|
||||
$actor_id = \Drupal::routeMatch()->getParameter('actor_id');
|
||||
\Drupal::service('user.private_tempstore')->get('opencase')->set('parent_type', 'oc_actor');
|
||||
\Drupal::service('user.private_tempstore')->get('opencase')->set('parent_id', $actor_id);
|
||||
$actor = \Drupal::entityTypeManager()->getStorage('oc_actor')->load($actor_id);
|
||||
$link = $actor->toLink()->toString();
|
||||
$markup = $this->asNavLinks([$link]);
|
||||
$current_path = \Drupal::service('path.current')->getPath();
|
||||
$title = "Add new case";
|
||||
$query = ['actor_id' => $actor_id, 'destination' => $current_path];
|
||||
$markup .= $this->generateLinksForAddingNewCasesForActor($actor, $title, $query);
|
||||
return $markup;
|
||||
}
|
||||
|
||||
/**
|
||||
* Contextual menu for Case page
|
||||
* - Link either the case list for the actor stored in the session (because their case list page was previously loaded)
|
||||
* or the home page
|
||||
* - Link to Activity list for that case
|
||||
*/
|
||||
private function casePage() {
|
||||
$case = \Drupal::routeMatch()->getParameter('oc_case');
|
||||
$links = [$this->getCaseListLinkForParentEntity(), $this->getActivityListLink($case)];
|
||||
return $this->asNavLinks($links);
|
||||
}
|
||||
|
||||
/**
|
||||
* Contextual menu for Add-New-Case page
|
||||
* - Link to Case list for the parent entity (actor by default but plugins can change the type)
|
||||
* that is stored in the session
|
||||
*/
|
||||
private function caseAddPage() {
|
||||
$link = $this->getCaseListLinkForParentEntity();
|
||||
return $this->asNavLinks([$link]);
|
||||
}
|
||||
|
||||
private function getCaseListLinkForParentEntity() {
|
||||
$parent_type = \Drupal::service('user.private_tempstore')->get('opencase')->get('parent_type');
|
||||
$parent_id = \Drupal::service('user.private_tempstore')->get('opencase')->get('parent_id');
|
||||
return $this->getCaseListLink($parent_type, $parent_id);
|
||||
}
|
||||
private function getCaseListLink($entity_type, $entity_id) {
|
||||
$url = "/opencase/$entity_type/$entity_id/case_list";
|
||||
$entity = \Drupal::entityTypeManager()->getStorage($entity_type)->load($entity_id);
|
||||
$link_text = $entity->getName(). ": Cases";
|
||||
return "<a href=$url>$link_text</a>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a link to the list of all cases
|
||||
*/
|
||||
private function getCaseListLinkAll() {
|
||||
$url = Url::fromRoute('view.cases.page_2');
|
||||
return Link::fromTextAndUrl(t("All cases"), $url)->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Contextual menu for Activity list page
|
||||
* - Link to the case that the activity list is for
|
||||
* - Links to add activities of various types
|
||||
*/
|
||||
private function activityListPage() {
|
||||
$case_id = \Drupal::routeMatch()->getParameter('case_id');
|
||||
$case = \Drupal::entityTypeManager()->getStorage('oc_case')->load($case_id);
|
||||
$url = $case->toUrl();
|
||||
$link = Link::fromTextAndUrl(t($case->getName() .": Case Details and Files"), $url)->toString();
|
||||
$markup = $this->asNavLinks([$link]);
|
||||
$current_path = \Drupal::service('path.current')->getPath();
|
||||
return $markup . $this->generateLinksForAddingNewActivities($case, "Add activity", ['case_id' => $case_id, 'destination' => $current_path]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Contextual menu for Activity page
|
||||
* - Link to the activity list for the case
|
||||
*/
|
||||
private function activityPage() {
|
||||
$activity = \Drupal::routeMatch()->getParameter('oc_activity');
|
||||
$case = $activity->oc_case->entity;
|
||||
$link = $this->getActivityListLink($case);
|
||||
return $this->asNavLinks([$link]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Contextual menu for Add-New-Activity page
|
||||
* - Link to the activity list for the case
|
||||
*/
|
||||
private function activityAddPage() {
|
||||
$case_id = \Drupal::request()->query->get('case_id');
|
||||
$case = \Drupal::entityTypeManager()->getStorage('oc_case')->load($case_id);
|
||||
$link = $this->getActivityListLink($case);
|
||||
return $this->asNavLinks([$link]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Given an case entity, returns a link to the activity list
|
||||
*/
|
||||
private function getActivityListLink($case) {
|
||||
$url = Url::fromRoute('view.activities.page_1', ['case_id' => $case->id()]);
|
||||
return Link::fromTextAndUrl(t($case->getName() .": Activities"), $url)->toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Render given links as nav links div with heading
|
||||
*/
|
||||
private function asNavLinks(array $links) {
|
||||
$markup = '';
|
||||
foreach($links as $link) {
|
||||
$markup .= "<p>$link</p>";
|
||||
}
|
||||
$title = t("Go to:");
|
||||
return "<div class='opencase_nav_links'><h1>$title</h1>$markup</div>";
|
||||
}
|
||||
|
||||
/**
|
||||
* returns html markup.
|
||||
*/
|
||||
private function generateLinksForAddingNewCasesForActor($actor, $title, $query = []) {
|
||||
$actor_type = $actor->bundle();
|
||||
$allCaseTypes = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_case');
|
||||
// $allCaseTypes is array where the key is the machine name and the value is array containing label
|
||||
// Now we pick just the allowed ones and produced an array of labels keyed by machine name
|
||||
$allowedCaseTypes = array();
|
||||
foreach(array_keys($allCaseTypes) as $caseType) {
|
||||
if (in_array($actor_type, EntityTypeRelations::getAllowedActorTypesForCaseType($caseType))) {
|
||||
$allowedCaseTypes[$caseType] = $allCaseTypes[$caseType]['label'];
|
||||
}
|
||||
}
|
||||
$title = t($title);
|
||||
$markup = "<h1>$title: </h1>";
|
||||
foreach($allowedCaseTypes as $machine_name => $label) {
|
||||
$url = \Drupal\Core\Url::fromRoute("entity.oc_case.add_form", ['oc_case_type' => $machine_name]);
|
||||
$url->setOption('query', $query);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($label, $url)->toString();
|
||||
$markup .= "<p>$link</p>";
|
||||
}
|
||||
return "<div class='opencase_add_links'>$markup</div>";
|
||||
}
|
||||
|
||||
/**
|
||||
* returns html markup.
|
||||
*/
|
||||
private function generateLinksForAddingNewActivities($case, $title, $query = []) {
|
||||
$title = t($title);
|
||||
$markup = "<h1>$title: </h1>";
|
||||
$caseType = $case->bundle();
|
||||
$allActivityTypes = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_activity');
|
||||
// $allActivityTypes is array where the key is the machine name and the value is array containing label
|
||||
// Now we pick just the allowed ones and produced an array of labels keyed by machine name
|
||||
$allowedActivityTypes = EntityTypeRelations::getAllowedActivityTypesForCaseType($caseType);
|
||||
foreach($allowedActivityTypes as $machine_name => $is_allowed) {
|
||||
if ($is_allowed) {
|
||||
$label = $allActivityTypes[$machine_name]['label'];
|
||||
$url = \Drupal\Core\Url::fromRoute("entity.oc_activity.add_form", ['oc_activity_type' => $machine_name]);
|
||||
$url->setOption('query', $query);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($label, $url)->toString();
|
||||
$markup .= "<p>$link</p>";
|
||||
}
|
||||
}
|
||||
return "<div class='opencase_add_links'>$markup</div>";
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
name: 'OpenCase Entities'
|
||||
type: module
|
||||
description: 'Entity Types for OpenCase'
|
||||
core: 8.x
|
||||
core_version_requirement: 9.x
|
||||
package: 'OpenCase'
|
||||
|
@ -4,6 +4,36 @@
|
||||
use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
|
||||
use \Drupal\Core\Field\BaseFieldDefinition;
|
||||
|
||||
|
||||
function opencase_entities_update_90002() {
|
||||
$field_storage_definition = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Target'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSetting('target_type', 'oc_actor')
|
||||
->setSetting('handler', 'default')
|
||||
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::defaultTarget')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installFieldStorageDefinition('oc_target', 'oc_activity', 'opencase_entities', $field_storage_definition);
|
||||
}
|
||||
|
||||
|
||||
function opencase_entities_update_90001() {
|
||||
$storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Provider'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSetting('target_type', 'oc_actor')
|
||||
->setSetting('handler', 'default')
|
||||
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::loggedInActorId')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installFieldStorageDefinition('oc_provider', 'oc_activity', 'oc_activity', $storage_definition);
|
||||
}
|
||||
|
||||
function opencase_entities_update_80202() {
|
||||
\Drupal::entityTypeManager()->clearCachedDefinitions();
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
@ -100,15 +130,10 @@ function opencase_entities_update_80198() {
|
||||
|
||||
function opencase_entities_update_80197() {
|
||||
//check if the table exists first. If not, then create the entity.
|
||||
if(!db_table_exists('oc_organisation')) {
|
||||
\Drupal::entityTypeManager()->clearCachedDefinitions();
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installEntityType(\Drupal::entityTypeManager()->getDefinition('oc_organisation'));
|
||||
}
|
||||
else {
|
||||
return 'Organisation entity already exists';
|
||||
}
|
||||
}
|
||||
|
||||
function opencase_entities_update_80192(&$sandbox) {
|
||||
$schema_converter = new SqlContentEntityStorageSchemaConverter(
|
||||
@ -154,3 +179,5 @@ function opencase_entities_update_8003() {
|
||||
\Drupal::entityDefinitionUpdateManager()
|
||||
->installFieldStorageDefinition('activity_date_time', 'oc_activity', 'oc_activity', $storage_definition);
|
||||
}
|
||||
|
||||
|
||||
|
@ -86,6 +86,14 @@ function opencase_entities_theme() {
|
||||
return $theme;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value of a url parameter and return it in a array
|
||||
* so that it can be used as a default callback for an entity reference field.
|
||||
*/
|
||||
function opencase_entities_get($key) {
|
||||
return \Drupal::request()->query->get($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_theme_suggestions_HOOK().
|
||||
*/
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
permission_callbacks:
|
||||
- \Drupal\opencase_entities\OCOrganisationPermissions::generatePermissions
|
||||
- \Drupal\opencase_entities\OCEventPermissions::generatePermissions
|
||||
- Drupal\opencase_entities\OpenCaseEntityPermissions::permissions
|
||||
|
||||
|
@ -5,6 +5,7 @@ namespace Drupal\opencase_entities\Controller;
|
||||
use Drupal\Component\Utility\Xss;
|
||||
use Drupal\Core\Controller\ControllerBase;
|
||||
use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
|
||||
use Drupal\Core\Link;
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\opencase_entities\Entity\OCActivityInterface;
|
||||
|
||||
@ -25,8 +26,8 @@ class OCActivityController extends ControllerBase implements ContainerInjectionI
|
||||
* An array suitable for drupal_render().
|
||||
*/
|
||||
public function revisionShow($oc_activity_revision) {
|
||||
$oc_activity = $this->entityManager()->getStorage('oc_activity')->loadRevision($oc_activity_revision);
|
||||
$view_builder = $this->entityManager()->getViewBuilder('oc_activity');
|
||||
$oc_activity = $this->entityTypeManager()->getStorage('oc_activity')->loadRevision($oc_activity_revision);
|
||||
$view_builder = $this->entityTypeManager()->getViewBuilder('oc_activity');
|
||||
|
||||
return $view_builder->view($oc_activity);
|
||||
}
|
||||
@ -41,8 +42,9 @@ class OCActivityController extends ControllerBase implements ContainerInjectionI
|
||||
* The page title.
|
||||
*/
|
||||
public function revisionPageTitle($oc_activity_revision) {
|
||||
$oc_activity = $this->entityManager()->getStorage('oc_activity')->loadRevision($oc_activity_revision);
|
||||
return $this->t('Revision of %title from %date', ['%title' => $oc_activity->label(), '%date' => format_date($oc_activity->getRevisionCreationTime())]);
|
||||
$oc_activity = $this->entityTypeManager()->getStorage('oc_activity')->loadRevision($oc_activity_revision);
|
||||
$date = \Drupal::service('date.formatter')->format($oc_activity->getRevisionCreationTime());
|
||||
return $this->t('Revision of %title from %date', ['%title' => $oc_activity->label(), '%date' => $date]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -60,7 +62,7 @@ class OCActivityController extends ControllerBase implements ContainerInjectionI
|
||||
$langname = $oc_activity->language()->getName();
|
||||
$languages = $oc_activity->getTranslationLanguages();
|
||||
$has_translations = (count($languages) > 1);
|
||||
$oc_activity_storage = $this->entityManager()->getStorage('oc_activity');
|
||||
$oc_activity_storage = $this->entityTypeManager()->getStorage('oc_activity');
|
||||
|
||||
$build['#title'] = $has_translations ? $this->t('@langname revisions for %title', ['@langname' => $langname, '%title' => $oc_activity->label()]) : $this->t('Revisions for %title', ['%title' => $oc_activity->label()]);
|
||||
$header = [$this->t('Revision'), $this->t('Operations')];
|
||||
@ -88,10 +90,11 @@ class OCActivityController extends ControllerBase implements ContainerInjectionI
|
||||
// Use revision link to link to revisions that are not active.
|
||||
$date = \Drupal::service('date.formatter')->format($revision->getRevisionCreationTime(), 'short');
|
||||
if ($vid != $oc_activity->getRevisionId()) {
|
||||
$link = $this->l($date, new Url('entity.oc_activity.revision', ['oc_activity' => $oc_activity->id(), 'oc_activity_revision' => $vid]));
|
||||
$url = new Url('entity.oc_activity.revision', ['oc_activity' => $oc_activity->id(), 'oc_activity_revision' => $vid]);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($date, $url)->toString();
|
||||
}
|
||||
else {
|
||||
$link = $oc_activity->link($date);
|
||||
$link = $oc_activity->toLink($date)->toString();
|
||||
}
|
||||
|
||||
$row = [];
|
||||
|
@ -25,8 +25,8 @@ class OCActorController extends ControllerBase implements ContainerInjectionInte
|
||||
* An array suitable for drupal_render().
|
||||
*/
|
||||
public function revisionShow($oc_actor_revision) {
|
||||
$oc_actor = $this->entityManager()->getStorage('oc_actor')->loadRevision($oc_actor_revision);
|
||||
$view_builder = $this->entityManager()->getViewBuilder('oc_actor');
|
||||
$oc_actor = $this->entityTypeManager()->getStorage('oc_actor')->loadRevision($oc_actor_revision);
|
||||
$view_builder = $this->entityTypeManager()->getViewBuilder('oc_actor');
|
||||
|
||||
return $view_builder->view($oc_actor);
|
||||
}
|
||||
@ -41,8 +41,9 @@ class OCActorController extends ControllerBase implements ContainerInjectionInte
|
||||
* The page title.
|
||||
*/
|
||||
public function revisionPageTitle($oc_actor_revision) {
|
||||
$oc_actor = $this->entityManager()->getStorage('oc_actor')->loadRevision($oc_actor_revision);
|
||||
return $this->t('Revision of %title from %date', ['%title' => $oc_actor->label(), '%date' => format_date($oc_actor->getRevisionCreationTime())]);
|
||||
$oc_actor = $this->entityTypeManager()->getStorage('oc_actor')->loadRevision($oc_actor_revision);
|
||||
$date = \Drupal::service('date.formatter')->format($oc_actor->getRevisionCreationTime());
|
||||
return $this->t('Revision of %title from %date', ['%title' => $oc_actor->label(), '%date' => $date]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -60,7 +61,7 @@ class OCActorController extends ControllerBase implements ContainerInjectionInte
|
||||
$langname = $oc_actor->language()->getName();
|
||||
$languages = $oc_actor->getTranslationLanguages();
|
||||
$has_translations = (count($languages) > 1);
|
||||
$oc_actor_storage = $this->entityManager()->getStorage('oc_actor');
|
||||
$oc_actor_storage = $this->entityTypeManager()->getStorage('oc_actor');
|
||||
|
||||
$build['#title'] = $has_translations ? $this->t('@langname revisions for %title', ['@langname' => $langname, '%title' => $oc_actor->label()]) : $this->t('Revisions for %title', ['%title' => $oc_actor->label()]);
|
||||
$header = [$this->t('Revision'), $this->t('Operations')];
|
||||
@ -88,10 +89,11 @@ class OCActorController extends ControllerBase implements ContainerInjectionInte
|
||||
// Use revision link to link to revisions that are not active.
|
||||
$date = \Drupal::service('date.formatter')->format($revision->getRevisionCreationTime(), 'short');
|
||||
if ($vid != $oc_actor->getRevisionId()) {
|
||||
$link = $this->l($date, new Url('entity.oc_actor.revision', ['oc_actor' => $oc_actor->id(), 'oc_actor_revision' => $vid]));
|
||||
$url = new Url('entity.oc_actor.revision', ['oc_actor' => $oc_actor->id(), 'oc_actor_revision' => $vid]);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($date, $url)->toString();
|
||||
}
|
||||
else {
|
||||
$link = $oc_actor->link($date);
|
||||
$link = $oc_actor->toLink($date)->toString();
|
||||
}
|
||||
|
||||
$row = [];
|
||||
|
@ -118,13 +118,14 @@ class OCOrganisationController extends ControllerBase implements ContainerInject
|
||||
// Use revision link to link to revisions that are not active.
|
||||
$date = $this->dateFormatter->format($revision->getRevisionCreationTime(), 'short');
|
||||
if ($vid != $oc_organisation->getRevisionId()) {
|
||||
$link = $this->l($date, new Url('entity.oc_organisation.revision', [
|
||||
$url = new Url('entity.oc_organisation.revision', [
|
||||
'oc_organisation' => $oc_organisation->id(),
|
||||
'oc_organisation_revision' => $vid,
|
||||
]));
|
||||
]);
|
||||
$link = \Drupal\Core\Link::fromTextAndUrl($date,$url)->toString();
|
||||
}
|
||||
else {
|
||||
$link = $oc_organisation->link($date);
|
||||
$link = $oc_organisation->toLink($date)->toString();
|
||||
}
|
||||
|
||||
$row = [];
|
||||
|
@ -93,6 +93,18 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
||||
$formatted = $current_time->format('Y-m-d');
|
||||
return $formatted;
|
||||
}
|
||||
public static function loggedInActorId() {
|
||||
$linked_actor = \Drupal\user\Entity\User::load(\Drupal::currentUser()->id())->field_linked_opencase_actor;
|
||||
if (empty($linked_actor)) return [];
|
||||
else return $linked_actor->target_id ;
|
||||
|
||||
}
|
||||
|
||||
public static function defaultTarget() {
|
||||
if (opencase_entities_get('target_id')) return [opencase_entities_get('target_id')];
|
||||
else return [];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@ -223,22 +235,39 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
||||
$fields = parent::baseFieldDefinitions($entity_type);
|
||||
|
||||
$fields['activity_date_time'] = BaseFieldDefinition::create('datetime')
|
||||
->setLabel(t('Date and time'))
|
||||
->setLabel(t('Date'))
|
||||
->setRevisionable(TRUE)
|
||||
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setSettings([
|
||||
'datetime_type' => 'date'
|
||||
])
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE);
|
||||
]);
|
||||
$fields['oc_provider'] = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Provider'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSetting('target_type', 'oc_actor')
|
||||
->setSetting('handler', 'default')
|
||||
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::loggedInActorId')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
|
||||
$fields['oc_target'] = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Target'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSetting('target_type', 'oc_actor')
|
||||
->setSetting('handler', 'default')
|
||||
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::defaultTarget')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Publishing status'))
|
||||
->setLabel(t('Visible'))
|
||||
->setDescription('If this box is not ticked this record will be hidden from view for most users. Users with access to unpublished entities will be able to restore it if needed.')
|
||||
->setRevisionable(TRUE)
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDefaultValue(TRUE);
|
||||
|
||||
$fields['user_id'] = BaseFieldDefinition::create('entity_reference')
|
||||
@ -248,11 +277,8 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
||||
->setSetting('target_type', 'user')
|
||||
->setSetting('handler', 'default')
|
||||
->setTranslatable(TRUE)
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'inline',
|
||||
'type' => 'author',
|
||||
'weight' => -4,
|
||||
]);
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDisplayConfigurable('form', TRUE);
|
||||
|
||||
$fields['name'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Subject'))
|
||||
@ -264,15 +290,6 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
||||
->setDefaultValue('')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'hidden',
|
||||
'type' => 'string',
|
||||
'weight' => -3,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -3,
|
||||
])
|
||||
->setRequired(TRUE);
|
||||
|
||||
$fields['description'] = BaseFieldDefinition::create('string_long')
|
||||
@ -282,16 +299,8 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
||||
'max_length' => 50,
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'basic_string',
|
||||
'weight' => -1,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textarea',
|
||||
'weight' => -1,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(FALSE);
|
||||
|
||||
$fields['time_taken'] = BaseFieldDefinition::create('decimal')
|
||||
@ -301,15 +310,7 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
|
||||
'suffix' => 'minutes',
|
||||
])
|
||||
->SetDisplayConfigurable("form", true)
|
||||
->SetDisplayConfigurable("view", true)
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'weight' => -3,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'weight' => -3,
|
||||
]);
|
||||
->SetDisplayConfigurable("view", true);
|
||||
|
||||
$fields['created'] = BaseFieldDefinition::create('created')
|
||||
->setLabel(t('Created'))
|
||||
|
@ -31,6 +31,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* config_export = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/admin/opencase/oc_activity_type/{oc_activity_type}",
|
||||
* "add-form" = "/admin/opencase/oc_activity_type/add",
|
||||
|
@ -119,14 +119,9 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
$translation->setOwnerId(0);
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->get('full_name')->value) {
|
||||
$name = $this->get('full_name')->value . ' ';
|
||||
} else {
|
||||
$name = $this->get('first_name')->value . ' ';
|
||||
if ($this->get('middle_names')->value) $name .= $this->get('middle_names')->value . ' ';
|
||||
$name .= $this->get('last_name')->value . ' ';
|
||||
}
|
||||
|
||||
$this->setName($name);
|
||||
|
||||
@ -219,10 +214,11 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
$fields = parent::baseFieldDefinitions($entity_type);
|
||||
|
||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Publishing status'))
|
||||
->setLabel(t('Visible'))
|
||||
->setDescription('If this box is not ticked this record will be hidden from view for most users. Users with access to unpublished entities will be able to restore it if needed.')
|
||||
->setRevisionable(TRUE)
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDefaultValue(TRUE);
|
||||
|
||||
// The name gets set on preSave, from the first middle and last
|
||||
@ -239,25 +235,9 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
->setRevisionable(TRUE)
|
||||
->setSetting('target_type', 'user')
|
||||
->setSetting('handler', 'default')
|
||||
->setTranslatable(TRUE);
|
||||
|
||||
// When configuring a person type, you will need to choose whether to have full name or first and last name fields displayed.
|
||||
$fields['full_name'] = BaseFieldDefinition::create('string')
|
||||
->setDescription(t('The person\'s name.'))
|
||||
->setLabel(t('Name'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSettings([
|
||||
'max_length' => 100,
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -50,
|
||||
])
|
||||
->setRequired(TRUE);
|
||||
->setTranslatable(TRUE);
|
||||
|
||||
$fields['first_name'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('First Name'))
|
||||
@ -270,10 +250,6 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -100,
|
||||
])
|
||||
->setRequired(TRUE);
|
||||
|
||||
$fields['middle_names'] = BaseFieldDefinition::create('string')
|
||||
@ -287,10 +263,6 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -99,
|
||||
])
|
||||
->setRequired(FALSE);
|
||||
|
||||
$fields['last_name'] = BaseFieldDefinition::create('string')
|
||||
@ -304,10 +276,6 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -98,
|
||||
])
|
||||
->setRequired(TRUE);
|
||||
|
||||
// Contact details.
|
||||
@ -320,16 +288,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -5,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -5,
|
||||
));
|
||||
->setDisplayConfigurable("view", true);
|
||||
$fields['phone'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Main Phone Number'))
|
||||
->setRevisionable(TRUE)
|
||||
@ -339,16 +298,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -4,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -4,
|
||||
));
|
||||
->setDisplayConfigurable("view", true);
|
||||
$fields['phone2'] = BaseFieldDefinition::create('string')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Alternative Phone Number'))
|
||||
@ -358,16 +308,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -3,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -3,
|
||||
));
|
||||
->setDisplayConfigurable("view", true);
|
||||
$fields['postal_address'] = BaseFieldDefinition::create('string_long')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Postal Address'))
|
||||
@ -378,16 +319,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'basic_string',
|
||||
'weight' => -2,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textarea',
|
||||
'weight' => -2,
|
||||
));
|
||||
->setDisplayConfigurable("view", true);
|
||||
$fields['post_code'] = BaseFieldDefinition::create('string')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Post Code'))
|
||||
@ -397,16 +329,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -1,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -1,
|
||||
));
|
||||
->setDisplayConfigurable("view", true);
|
||||
|
||||
$fields['created'] = BaseFieldDefinition::create('created')
|
||||
->setLabel(t('Created'))
|
||||
@ -423,13 +346,6 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
|
||||
->setRevisionable(TRUE)
|
||||
->setTranslatable(TRUE);
|
||||
|
||||
$fields['user_login'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Login Access'))
|
||||
->setDescription(t('Whether this person should be able to log into the system.'))
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('display', true)
|
||||
->setDefaultValue(FALSE);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* config_export = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/admin/opencase/oc_actor_type/{oc_actor_type}",
|
||||
* "add-form" = "/admin/opencase/oc_actor_type/add",
|
||||
|
@ -112,7 +112,9 @@ class OCEqualOpps extends ContentEntityBase implements OCEqualOppsInterface {
|
||||
->setSettings([
|
||||
'max_length' => 50,
|
||||
'text_processing' => 0,
|
||||
]);
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['oc_actor'] = \Drupal\Core\Field\BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Person'))
|
||||
@ -120,14 +122,8 @@ class OCEqualOpps extends ContentEntityBase implements OCEqualOppsInterface {
|
||||
->setSetting('target_type', 'oc_actor')
|
||||
->setSetting('handler', 'default')
|
||||
->setCardinality(1)
|
||||
->setDisplayOptions('view', [
|
||||
'type' => 'string',
|
||||
'weight' => -100,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'entity_reference_autocomplete_tags',
|
||||
'weight' => -100,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(TRUE);
|
||||
|
||||
$fields['age'] = BaseFieldDefinition::create('list_string')
|
||||
@ -144,27 +140,13 @@ class OCEqualOpps extends ContentEntityBase implements OCEqualOppsInterface {
|
||||
],
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -5,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'options_select',
|
||||
'weight' => -5,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['access_needs'] = BaseFieldDefinition::create('string_long')
|
||||
->setLabel(t('Access Needs'))
|
||||
->setRevisionable(TRUE)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -4,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_long',
|
||||
'weight' => -4,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['gender'] = BaseFieldDefinition::create('list_string')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Gender'))
|
||||
@ -180,15 +162,7 @@ class OCEqualOpps extends ContentEntityBase implements OCEqualOppsInterface {
|
||||
],
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -5,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'options_select',
|
||||
'weight' => -5,
|
||||
));
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['race_ethnicity'] = BaseFieldDefinition::create('list_string')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Race/Ethnicity'))
|
||||
@ -215,15 +189,7 @@ class OCEqualOpps extends ContentEntityBase implements OCEqualOppsInterface {
|
||||
],
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -5,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'options_select',
|
||||
'weight' => -5,
|
||||
));
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['sexuality'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Sexuality'))
|
||||
->setRevisionable(TRUE)
|
||||
@ -231,18 +197,9 @@ class OCEqualOpps extends ContentEntityBase implements OCEqualOppsInterface {
|
||||
'max_length' => 20,
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable("view", true)
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => -1,
|
||||
))
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -1,
|
||||
]);
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['status']->setDescription(t('A boolean indicating whether the Equal Opps is published.'));
|
||||
|
||||
|
@ -149,7 +149,9 @@ class OCEvent extends ContentEntityBase implements OCEventInterface {
|
||||
->setDescription(t('The user ID of author of the Event entity.'))
|
||||
->setRevisionable(TRUE)
|
||||
->setSetting('target_type', 'user')
|
||||
->setSetting('handler', 'default');
|
||||
->setSetting('handler', 'default')
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['name'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Name'))
|
||||
@ -163,15 +165,16 @@ class OCEvent extends ContentEntityBase implements OCEventInterface {
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -4,
|
||||
])
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE)
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(TRUE);
|
||||
|
||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Publishing status'))
|
||||
->setLabel(t('Visible'))
|
||||
->setDescription('If this box is not ticked this record will be hidden from view for most users. Users with access to unpublished entities will be able to restore it if needed.')
|
||||
->setRevisionable(TRUE)
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDefaultValue(TRUE);
|
||||
|
||||
|
||||
@ -190,18 +193,8 @@ class OCEvent extends ContentEntityBase implements OCEventInterface {
|
||||
->setRequired(TRUE)
|
||||
// Uses the currentDateTime function from the Activity entity
|
||||
->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'datetime_default',
|
||||
'settings' => [
|
||||
'format_type' => 'medium',
|
||||
],
|
||||
'weight' => -3,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'datetime_default',
|
||||
'weight' => -3,
|
||||
]);
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['description'] = BaseFieldDefinition::create('string_long')
|
||||
->setLabel(t('Description'))
|
||||
@ -211,15 +204,8 @@ class OCEvent extends ContentEntityBase implements OCEventInterface {
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'basic_string',
|
||||
'weight' => -1,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textarea',
|
||||
'weight' => -1,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(FALSE);
|
||||
|
||||
$fields['attendees'] = BaseFieldDefinition::create('entity_reference')
|
||||
@ -229,14 +215,8 @@ class OCEvent extends ContentEntityBase implements OCEventInterface {
|
||||
->setSetting('handler', 'default')
|
||||
->setTranslatable(TRUE)
|
||||
->setCardinality(BaseFieldDefinition::CARDINALITY_UNLIMITED)
|
||||
->setDisplayOptions('view', [
|
||||
'type' => 'string',
|
||||
'weight' => 50,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'entity_reference_autocomplete_tags',
|
||||
'weight' => 50,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(FALSE);
|
||||
|
||||
|
||||
|
@ -30,6 +30,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* config_export = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/admin/opencase/oc_event_type/{oc_event_type}",
|
||||
* "add-form" = "/admin/opencase/oc_event_type/add",
|
||||
|
@ -9,6 +9,7 @@ use Drupal\Core\Entity\RevisionableInterface;
|
||||
use Drupal\Core\Entity\EntityChangedTrait;
|
||||
use Drupal\Core\Entity\EntityPublishedTrait;
|
||||
use Drupal\Core\Entity\EntityTypeInterface;
|
||||
use Drupal\Core\Entity\RevisionLogEntityTrait;
|
||||
use Drupal\user\UserInterface;
|
||||
|
||||
/**
|
||||
@ -81,6 +82,7 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
|
||||
use EntityChangedTrait;
|
||||
use EntityPublishedTrait;
|
||||
use RevisionLogEntityTrait;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
@ -202,19 +204,12 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
$fields['notes'] = BaseFieldDefinition::create('string_long')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Notes'))
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setSettings(array(
|
||||
'default_value' => '',
|
||||
'max_length' => 255,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'basic_string',
|
||||
'weight' => 50,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textarea',
|
||||
'weight' => 50,
|
||||
));
|
||||
$fields['website'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Website'))
|
||||
@ -224,15 +219,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 49,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 49,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(FALSE);
|
||||
$fields['contact_name'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Contact Name'))
|
||||
@ -243,15 +231,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 51,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 51,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(FALSE);
|
||||
|
||||
$fields['contact_role'] = BaseFieldDefinition::create('string')
|
||||
@ -263,15 +244,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 52,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 52,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(FALSE);
|
||||
$fields['email'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Email Address'))
|
||||
@ -281,15 +255,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'max_length' => 100,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 52,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 52,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['phone'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Phone Number'))
|
||||
@ -299,15 +266,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'max_length' => 20,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 53,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 53,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['postal_address'] = BaseFieldDefinition::create('string_long')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Postal Address'))
|
||||
@ -317,15 +277,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'max_length' => 255,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'basic_string',
|
||||
'weight' => 54,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textarea',
|
||||
'weight' => 54,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['post_code'] = BaseFieldDefinition::create('string')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Post Code'))
|
||||
@ -334,15 +287,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'max_length' => 10,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 55,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 55,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['billing_contact_name'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Billing Contact Name'))
|
||||
->setDescription(t('Name of the main contact for this client.'))
|
||||
@ -352,15 +298,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 56,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 56,
|
||||
])
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(FALSE);
|
||||
|
||||
$fields['billing_email'] = BaseFieldDefinition::create('string')
|
||||
@ -371,15 +310,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'max_length' => 100,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 57,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 57,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
|
||||
$fields['billing_phone'] = BaseFieldDefinition::create('string')
|
||||
->setLabel(t('Billing Phone Number'))
|
||||
@ -389,15 +321,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'max_length' => 20,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 58,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 58,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['billing_postal_address'] = BaseFieldDefinition::create('string_long')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Billing Postal Address'))
|
||||
@ -407,15 +332,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'max_length' => 255,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'basic_string',
|
||||
'weight' => 59,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textarea',
|
||||
'weight' => 59,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['billing_post_code'] = BaseFieldDefinition::create('string')
|
||||
->setRevisionable(TRUE)
|
||||
->setLabel(t('Billing Post Code'))
|
||||
@ -424,15 +342,8 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'max_length' => 10,
|
||||
'text_processing' => 0,
|
||||
))
|
||||
->setDisplayOptions('view', array(
|
||||
'label' => 'above',
|
||||
'type' => 'string',
|
||||
'weight' => 60,
|
||||
))
|
||||
->setDisplayOptions('form', array(
|
||||
'type' => 'string_textfield',
|
||||
'weight' => 60,
|
||||
));
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true);
|
||||
$fields['user_id'] = BaseFieldDefinition::create('entity_reference')
|
||||
->setLabel(t('Added by'))
|
||||
->setRevisionable(TRUE)
|
||||
@ -448,24 +359,16 @@ class OCOrganisation extends EditorialContentEntityBase implements OCOrganisatio
|
||||
'text_processing' => 0,
|
||||
])
|
||||
->setDefaultValue('')
|
||||
->setDisplayOptions('view', [
|
||||
'label' => 'hidden',
|
||||
'type' => 'string',
|
||||
'weight' => -100,
|
||||
])
|
||||
->setDisplayOptions('form', [
|
||||
'type' => 'string_textfield',
|
||||
'weight' => -100,
|
||||
])
|
||||
->setDisplayConfigurable('form', TRUE)
|
||||
->setDisplayConfigurable('view', TRUE)
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setRequired(TRUE);
|
||||
|
||||
$fields['status'] = BaseFieldDefinition::create('boolean')
|
||||
->setLabel(t('Published'))
|
||||
->setLabel(t('Visible'))
|
||||
->setDescription('If this box is not ticked this record will be hidden from view for most users. Users with access to unpublished entities will be able to restore it if needed.')
|
||||
->setRevisionable(TRUE)
|
||||
->setDisplayConfigurable("form", true)
|
||||
->setDisplayConfigurable('form', true)
|
||||
->setDisplayConfigurable('view', true)
|
||||
->setDefaultValue(TRUE);
|
||||
|
||||
|
||||
|
@ -30,6 +30,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* config_export = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/admin/opencase/oc_organisation_relation_type/{oc_organisation_relation_type}",
|
||||
* "add-form" = "/admin/opencase/oc_organisation_relation_type/add",
|
||||
|
@ -30,6 +30,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* config_export = {
|
||||
* "id" = "id",
|
||||
* "label" = "label",
|
||||
* "uuid" = "uuid"
|
||||
* },
|
||||
* links = {
|
||||
* "canonical" = "/admin/opencase/oc_organisation_type/{oc_organisation_type}",
|
||||
* "add-form" = "/admin/opencase/oc_organisation_type/add",
|
||||
|
@ -38,36 +38,27 @@ class OCActivityForm extends ContentEntityForm {
|
||||
*/
|
||||
public function save(array $form, FormStateInterface $form_state) {
|
||||
$entity = $this->entity;
|
||||
|
||||
// Save as a new revision if requested to do so.
|
||||
if (!$form_state->isValueEmpty('new_revision') && $form_state->getValue('new_revision') != FALSE) {
|
||||
$entity->setNewRevision();
|
||||
|
||||
// If a new revision is created, save the current user as revision author.
|
||||
$entity->setRevisionCreationTime(REQUEST_TIME);
|
||||
$entity->setRevisionUserId(\Drupal::currentUser()->id());
|
||||
}
|
||||
else {
|
||||
$entity->setNewRevision(FALSE);
|
||||
}
|
||||
|
||||
$status = parent::save($form, $form_state);
|
||||
|
||||
switch ($status) {
|
||||
case SAVED_NEW:
|
||||
drupal_set_message($this->t('Created the %bundle.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Created the %bundle.', [
|
||||
'%bundle' => $entity->bundle(),
|
||||
]));
|
||||
break;
|
||||
|
||||
default:
|
||||
drupal_set_message($this->t('Saved the %bundle.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Saved the %bundle.', [
|
||||
'%bundle' => $entity->bundle(),
|
||||
]));
|
||||
}
|
||||
// If you have unpublished the entity and you can't see unpublished entities, redirect to a more informative message than just "Access Denied".
|
||||
if (!$form_state->getValue('status')['value'] && !\Drupal::currentUser()->hasPermission('view unpublished activity entities')) {
|
||||
drupal_set_message($this->t('The %bundle is now unpublished & hidden from you.', [
|
||||
if (is_array($form_state->getValue('status')) && $form_state->getValue('status')['value'] == false && !\Drupal::currentUser()->hasPermission('view unpublished actor entities')) {
|
||||
\Drupal::messenger()->addMessage($this->t('The %bundle is now unpublished & hidden from you.', [
|
||||
'%bundle' => $entity->bundle(),
|
||||
]));
|
||||
$form_state->setRedirect('<front>');
|
||||
|
@ -107,7 +107,7 @@ class OCActivityRevisionDeleteForm extends ConfirmFormBase {
|
||||
$this->OCActivityStorage->deleteRevision($this->revision->getRevisionId());
|
||||
|
||||
$this->logger('content')->notice('Activity: deleted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
|
||||
drupal_set_message(t('Revision from %revision-date of Activity %title has been deleted.', ['%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
|
||||
\Drupal::messenger()->addMessage(t('Revision from %revision-date of Activity %title has been deleted.', ['%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
|
||||
$form_state->setRedirect(
|
||||
'entity.oc_activity.canonical',
|
||||
['oc_activity' => $this->revision->id()]
|
||||
|
@ -120,7 +120,7 @@ class OCActivityRevisionRevertForm extends ConfirmFormBase {
|
||||
$this->revision->save();
|
||||
|
||||
$this->logger('content')->notice('Activity: reverted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
|
||||
drupal_set_message(t('Activity %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
|
||||
\Drupal::messenger()->addMessage(t('Activity %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
|
||||
$form_state->setRedirect(
|
||||
'entity.oc_activity.version_history',
|
||||
['oc_activity' => $this->revision->id()]
|
||||
|
@ -38,7 +38,7 @@ class OCActivityTypeDeleteForm extends EntityConfirmFormBase {
|
||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||
$this->entity->delete();
|
||||
|
||||
drupal_set_message(
|
||||
\Drupal::messenger()->addMessage(
|
||||
$this->t('content @type: deleted @label.',
|
||||
[
|
||||
'@type' => $this->entity->bundle(),
|
||||
|
@ -49,13 +49,13 @@ class OCActivityTypeForm extends EntityForm {
|
||||
|
||||
switch ($status) {
|
||||
case SAVED_NEW:
|
||||
drupal_set_message($this->t('Created the %label Activity type.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Created the %label Activity type.', [
|
||||
'%label' => $oc_activity_type->label(),
|
||||
]));
|
||||
break;
|
||||
|
||||
default:
|
||||
drupal_set_message($this->t('Saved the %label Activity type.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Saved the %label Activity type.', [
|
||||
'%label' => $oc_activity_type->label(),
|
||||
]));
|
||||
}
|
||||
|
@ -38,8 +38,6 @@ class OCActorForm extends ContentEntityForm {
|
||||
*/
|
||||
public function save(array $form, FormStateInterface $form_state) {
|
||||
$entity = $this->entity;
|
||||
// Always make a new revision for a person. They are not changed often and people are likely to
|
||||
// want to know what has happened to them over time.
|
||||
$entity->setNewRevision();
|
||||
$entity->setRevisionCreationTime(REQUEST_TIME);
|
||||
$entity->setRevisionUserId(\Drupal::currentUser()->id());
|
||||
@ -48,19 +46,19 @@ class OCActorForm extends ContentEntityForm {
|
||||
|
||||
switch ($status) {
|
||||
case SAVED_NEW:
|
||||
drupal_set_message($this->t('Created %label.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Created %label.', [
|
||||
'%label' => $entity->label(),
|
||||
]));
|
||||
break;
|
||||
|
||||
default:
|
||||
drupal_set_message($this->t('Saved %label.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Saved %label.', [
|
||||
'%label' => $entity->label(),
|
||||
]));
|
||||
}
|
||||
// If you have unpublished the entity and you can't see unpublished entities, redirect to a more informative message than just "Access Denied".
|
||||
if (!$form_state->getValue('status')['value'] && !\Drupal::currentUser()->hasPermission('view unpublished actor entities')) {
|
||||
drupal_set_message($this->t('The record for "%label" is now unpublished & hidden from you.', [
|
||||
if (is_array($form_state->getValue('status')) && $form_state->getValue('status')['value'] == false && !\Drupal::currentUser()->hasPermission('view unpublished actor entities')) {
|
||||
\Drupal::messenger()->addMessage($this->t('The record for "%label" is now unpublished & hidden from you.', [
|
||||
'%label' => $entity->label(),
|
||||
]));
|
||||
$form_state->setRedirect('<front>');
|
||||
|
@ -107,7 +107,7 @@ class OCActorRevisionDeleteForm extends ConfirmFormBase {
|
||||
$this->OCActorStorage->deleteRevision($this->revision->getRevisionId());
|
||||
|
||||
$this->logger('content')->notice('Actor: deleted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
|
||||
drupal_set_message(t('Revision from %revision-date of Actor %title has been deleted.', ['%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
|
||||
\Drupal::messenger()->addMessage(t('Revision from %revision-date of Actor %title has been deleted.', ['%revision-date' => format_date($this->revision->getRevisionCreationTime()), '%title' => $this->revision->label()]));
|
||||
$form_state->setRedirect(
|
||||
'entity.oc_actor.canonical',
|
||||
['oc_actor' => $this->revision->id()]
|
||||
|
@ -120,7 +120,7 @@ class OCActorRevisionRevertForm extends ConfirmFormBase {
|
||||
$this->revision->save();
|
||||
|
||||
$this->logger('content')->notice('Actor: reverted %title revision %revision.', ['%title' => $this->revision->label(), '%revision' => $this->revision->getRevisionId()]);
|
||||
drupal_set_message(t('Actor %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
|
||||
\Drupal::messenger()->addMessage(t('Actor %title has been reverted to the revision from %revision-date.', ['%title' => $this->revision->label(), '%revision-date' => $this->dateFormatter->format($original_revision_timestamp)]));
|
||||
$form_state->setRedirect(
|
||||
'entity.oc_actor.version_history',
|
||||
['oc_actor' => $this->revision->id()]
|
||||
|
@ -38,7 +38,7 @@ class OCActorTypeDeleteForm extends EntityConfirmFormBase {
|
||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||
$this->entity->delete();
|
||||
|
||||
drupal_set_message(
|
||||
\Drupal::messenger()->addMessage(
|
||||
$this->t('content @type: deleted @label.',
|
||||
[
|
||||
'@type' => $this->entity->bundle(),
|
||||
|
@ -49,13 +49,13 @@ class OCActorTypeForm extends EntityForm {
|
||||
|
||||
switch ($status) {
|
||||
case SAVED_NEW:
|
||||
drupal_set_message($this->t('Created the %label Person type.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Created the %label Person type.', [
|
||||
'%label' => $oc_actor_type->label(),
|
||||
]));
|
||||
break;
|
||||
|
||||
default:
|
||||
drupal_set_message($this->t('Saved the %label Person type.', [
|
||||
\Drupal::messenger()->addMessage($this->t('Saved the %label Person type.', [
|
||||
'%label' => $oc_actor_type->label(),
|
||||
]));
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class OCEventForm extends ContentEntityForm {
|
||||
}
|
||||
// If you have unpublished the entity and you can't see unpublished entities, redirect to a more informative message than just "Access Denied".
|
||||
if (!$form_state->getValue('status')['value'] && !\Drupal::currentUser()->hasPermission('view unpublished event entities')) {
|
||||
drupal_set_message($this->t('The record for "%label" is now unpublished & hidden from you.', [
|
||||
\Drupal::messenger()->addMessage($this->t('The record for "%label" is now unpublished & hidden from you.', [
|
||||
'%label' => $entity->label(),
|
||||
]));
|
||||
$form_state->setRedirect('<front>');
|
||||
|
@ -54,18 +54,9 @@ class OCOrganisationForm extends ContentEntityForm {
|
||||
*/
|
||||
public function save(array $form, FormStateInterface $form_state) {
|
||||
$entity = $this->entity;
|
||||
|
||||
// Save as a new revision if requested to do so.
|
||||
if (!$form_state->isValueEmpty('new_revision') && $form_state->getValue('new_revision') != FALSE) {
|
||||
$entity->setNewRevision();
|
||||
|
||||
// If a new revision is created, save the current user as revision author.
|
||||
$entity->setRevisionCreationTime($this->time->getRequestTime());
|
||||
$entity->setRevisionUserId($this->account->id());
|
||||
}
|
||||
else {
|
||||
$entity->setNewRevision(FALSE);
|
||||
}
|
||||
$entity->setRevisionCreationTime(REQUEST_TIME);
|
||||
$entity->setRevisionUserId(\Drupal::currentUser()->id());
|
||||
|
||||
$status = parent::save($form, $form_state);
|
||||
|
||||
@ -83,7 +74,7 @@ class OCOrganisationForm extends ContentEntityForm {
|
||||
}
|
||||
// If you have unpublished the entity and you can't see unpublished entities, redirect to a more informative message than just "Access Denied".
|
||||
if (!$form_state->getValue('status')['value'] && !\Drupal::currentUser()->hasPermission('view unpublished organisation entities')) {
|
||||
drupal_set_message($this->t('The record for "%label" is now unpublished & hidden from you.', [
|
||||
\Drupal::messenger()->addMessage($this->t('The record for "%label" is now unpublished & hidden from you.', [
|
||||
'%label' => $entity->label(),
|
||||
]));
|
||||
$form_state->setRedirect('<front>');
|
||||
|
@ -26,27 +26,18 @@ class OCActivityAccessControlHandler extends EntityAccessControlHandler {
|
||||
}
|
||||
return AccessResult::allowedIf(
|
||||
$account->hasPermission('view published case entities') // activity permissions are inherited from case
|
||||
|| CaseInvolvement::userIsInvolved_activity($account, $entity)
|
||||
|| $entity->getOwner()->id() == $account->id()
|
||||
);
|
||||
case 'update': // allowed only if a) they can see the case the activity is on and b) they can edit activities
|
||||
if (!$account->hasPermission('edit activity entities')) {
|
||||
return AccessResult::forbidden();
|
||||
} else {
|
||||
return AccessResult::allowedIf(
|
||||
$account->hasPermission('view published case entities')
|
||||
|| CaseInvolvement::userIsInvolved_activity($account, $entity)
|
||||
$account->hasPermission('edit activity entities') // activity permissions are inherited from case
|
||||
|| $entity->getOwner()->id() == $account->id()
|
||||
);
|
||||
}
|
||||
case 'delete': // allowed only if a) they can see the case the activity is on and b) they can delete activities
|
||||
if (!$account->hasPermission('delete activity entities')) {
|
||||
return AccessResult::forbidden();
|
||||
} else {
|
||||
return AccessResult::allowedIf(
|
||||
$account->hasPermission('view published case entities')
|
||||
|| CaseInvolvement::userIsInvolved_activity($account, $entity)
|
||||
$account->hasPermission('delete case entities')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Unknown operation, no opinion.
|
||||
return AccessResult::neutral();
|
||||
|
@ -16,19 +16,7 @@
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes.addClass('oc_activity') }}>
|
||||
<h2>{{ title }}</h2>
|
||||
<div class="oc_entity">
|
||||
<div class="left">
|
||||
{{ base_fields.actors_involved }}
|
||||
{{ base_fields.activity_date_time }}
|
||||
{{ base_fields.description }}
|
||||
{{ base_fields.time_taken }}
|
||||
{{ base_fields.user_id }}
|
||||
</div>
|
||||
<div class="right">
|
||||
{% for field in other_fields %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% if content %}
|
||||
{{- content -}}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
@ -16,20 +16,7 @@
|
||||
*/
|
||||
#}
|
||||
<div{{ attributes.addClass('oc_actor') }}>
|
||||
<div class="oc_entity">
|
||||
<div class="left">
|
||||
{% for field in fields_other_than_contact_details %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="right">
|
||||
<div id ="contact_details">
|
||||
<h2>Contact Details</h2>
|
||||
<a class="field" href="/web/opencase/oc_actor/{{ id }}/contact_details_history">See history</a>
|
||||
{% for field in contact_details %}
|
||||
{{ field }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if content %}
|
||||
{{- content -}}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user