Compare commits

...

18 Commits
1.6.2 ... 1.9.4

Author SHA1 Message Date
c47df855bc Docs 2020-11-09 12:43:53 +00:00
af3b4727f1 Added some docs 2020-11-09 12:36:08 +00:00
011029d3b3 moved some menu code around for better modularisation 2020-11-08 18:05:24 +00:00
9af1d58de8 removed "details", see `https://drupal.stackexchange.com/questions/294312/why-has-this-details-accordion-appeared-in-this-view 2020-06-08 20:43:51 +01:00
6d93242fa9 v1.9.2 2020-06-08 14:22:04 +01:00
c9a843a35f (Re-)Added update hook to make contact details revisionable 2020-06-08 14:21:16 +01:00
c46bbc6ffd v1.9 2020-06-05 19:34:44 +01:00
5d1844304a templating for activities 2020-06-05 19:26:59 +01:00
be45fd2d42 sorting by date-and-time in activities view
Also removed date format thing from hook_update_n as not needed
2020-06-05 18:41:46 +01:00
18a0846348 Added name and status changes view
and did some other things, can't remember what
2020-06-05 18:36:14 +01:00
18e32335f5 In progress of adding revision views & making entity displays nicer 2020-05-13 15:41:59 +01:00
b83f0b44b4 v1.7 - Removed seconds from date and time field
Also altered activities view to show this field instead of created date.
2020-03-01 09:45:10 +00:00
7f88d409f0 1.6.5 more git mixup 2020-02-24 17:17:53 +00:00
8841fd4d25 v1.6.4 - more git mixup 2020-02-24 17:09:57 +00:00
87241c1f87 v1.6.3 due to git mixup 2020-02-24 16:59:43 +00:00
2a1607c6d9 Merge branch 'master' of github.com:hoegrammer/opencase 2020-02-24 16:27:37 +00:00
e4a04a254d v1.6.1 2020-02-24 16:26:04 +00:00
f47ded38fa v1.7 - adding datetime field with correct datepicker type & default datetime 2020-02-24 10:57:06 +00:00
28 changed files with 2600 additions and 85 deletions

View File

@ -1,5 +1,5 @@
# OpenCase # OpenCase
A simple case-management system for small altruistic organisations. A simple case-management system
## The Plan ## The Plan
OpenCase will be available as: OpenCase will be available as:
@ -28,7 +28,7 @@ If you want to install OpenCase for yourself, please get in touch via Issues. It
A demo site, with basic functionality is available at demo.opencase.org.uk. If you are interested, raise an issue and I will get the login to you somehow. A demo site, with basic functionality is available at demo.opencase.org.uk. If you are interested, raise an issue and I will get the login to you somehow.
## Find out more ## Find out more
* More details, including user stories for future development, can be found in the [OpenCase Gitbook](https://hoegrammer.gitbooks.io/zen-crm/content/) * More details, including user stories for future development, can be found in the [OpenCase Gitbook](https://hoegrammer.gitbooks.io/opencase/content/)
* Raise an issue to contact the developer. * Raise an issue to contact the developer.

View File

@ -0,0 +1,5 @@
ciac_grouped_views:
version: 1.x
css:
layout:
css/grouped_views.css: {}

View File

@ -384,7 +384,21 @@ display:
entity_type: oc_activity entity_type: oc_activity
plugin_id: entity_link plugin_id: entity_link
filters: { } filters: { }
sorts: { } sorts:
activity_date_time:
id: activity_date_time
table: oc_activity_field_data
field: activity_date_time
relationship: none
group_type: group
admin_label: ''
order: DESC
exposed: false
expose:
label: ''
entity_type: oc_activity
entity_field: activity_date_time
plugin_id: standard
title: 'Activity List' title: 'Activity List'
header: { } header: { }
footer: { } footer: { }

View File

@ -477,7 +477,7 @@ display:
admin_label: '' admin_label: ''
empty: true empty: true
tokenize: false tokenize: false
content: "<p>Either there are no cases involving this person, or you do not have access to them.</p> <p>To create a case, use the sidebar menu to the right</p>" content: "<p>Either there are no cases involving this person, or you do not have access to them.</p>\n"
plugin_id: text_custom plugin_id: text_custom
relationships: { } relationships: { }
arguments: arguments:
@ -584,7 +584,7 @@ display:
admin_label: '' admin_label: ''
empty: true empty: true
tokenize: false tokenize: false
content: "<h1>No cases found</h1>\n<p>You do not have access to any existing cases.</p>\n<p>To <b>add a new case</b>, first search for the person you want to create a case for, using the search bar at the top right of the screen. If they are not on the system yet, add them using the <b>Add People</b> tab.</p>\n" content: "<h1>No cases found</h1>\n<p>You do not have access to any existing cases.</p>\n<p>To <b>add a new case</b>, first search for the person you want to add a case to. If they are not on the system yet you can add them using the <b>Add actors</b> menu in the left sidebar.</p>\n"
plugin_id: text_custom plugin_id: text_custom
cache_metadata: cache_metadata:
max-age: -1 max-age: -1

View File

@ -0,0 +1,852 @@
langcode: en
status: true
dependencies:
module:
- opencase_entities
- user
id: contact_details_changes
label: 'Contact Details History'
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 client 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: 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: none
options:
offset: 0
style:
type: table
options:
grouping:
1:
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
id: id
revision_created: revision_created
view_oc_actor: view_oc_actor
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: ''
id:
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: ''
view_oc_actor:
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
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
email:
id: email
table: oc_actor_field_revision
field: email
relationship: none
group_type: group
admin_label: ''
label: 'Email Address'
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: email
plugin_id: field
phone:
id: phone
table: oc_actor_field_revision
field: phone
relationship: none
group_type: group
admin_label: ''
label: 'Main Phone Number'
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: phone
plugin_id: field
phone2:
id: phone2
table: oc_actor_field_revision
field: phone2
relationship: none
group_type: group
admin_label: ''
label: 'Alternative Phone Number'
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: phone2
plugin_id: field
postal_address:
id: postal_address
table: oc_actor_field_revision
field: postal_address
relationship: none
group_type: group
admin_label: ''
label: 'Postal Address'
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: basic_string
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
entity_type: oc_actor
entity_field: postal_address
plugin_id: field
post_code:
id: post_code
table: oc_actor_field_revision
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
entity_type: oc_actor
entity_field: post_code
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: "&#9664;\tBack to current record"
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
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: { }
sorts:
revision_created:
id: revision_created
table: oc_actor_revision
field: revision_created
relationship: none
group_type: min
admin_label: ''
order: DESC
exposed: false
expose:
label: ''
granularity: second
entity_type: oc_actor
entity_field: revision_created
plugin_id: date
header: { }
footer: { }
empty: { }
relationships: { }
arguments:
id:
id: id
table: oc_actor_field_revision
field: id
relationship: none
group_type: group
admin_label: ''
default_action: 'not found'
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: fixed
default_argument_options:
argument: ''
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
break_phrase: false
not: false
entity_type: oc_actor
entity_field: id
plugin_id: numeric
display_extenders: { }
group_by: true
title: 'Contact Details History'
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- user.permissions
tags: { }
page_1:
display_plugin: page
id: page_1
display_title: Page
position: 1
display_options:
path: opencase/oc_actor/%/contact_details_history
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- user.permissions
tags: { }

View File

@ -46,3 +46,42 @@ body {
td.views-field { td.views-field {
vertical-align: top; vertical-align: top;
} }
/* Entity displays */
.oc_entity .left {
display: inline-block;
width: 45%;
padding: 1em;
}
.oc_entity .right {
display: inline-block;
width: 45%;
padding: 1em;
float: right;
}
.oc_entity .field {
margin-top: 1em;
}
/* Make entity reference field labels match normal field labels */
.field--type-entity-reference .field__label {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 1em !important;
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;
}

84
docs/composer.json Normal file
View File

@ -0,0 +1,84 @@
{
"name": "drupal/recommended-project",
"description": "Project template for Drupal 8 projects with a relocated document root",
"type": "project",
"license": "GPL-2.0-or-later",
"homepage": "https://www.drupal.org/project/drupal",
"support": {
"docs": "https://www.drupal.org/docs/user_guide/en/index.html",
"chat": "https://www.drupal.org/node/314178"
},
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
},{
"type": "vcs",
"url": "https://git.autonomic.zone/autonomic-cooperative/opencase.git"
}
],
"require": {
"composer/installers": "^1.2",
"drupal/admin_toolbar": "^2.0",
"drupal/console": "*",
"drupal/core-composer-scaffold": "^8.8",
"drupal/core-project-message": "^8.8",
"drupal/core-recommended": "^8.8",
"drupal/datetimehideseconds": "1.x-dev",
"drupal/devel": "^2.1",
"drupal/facets": "^1.4",
"drupal/opencase": "^1.7",
"drupal/search_api": "^1.15",
"drupal/search_api_db": "^1.15",
"drupal/security_review": "1.x-dev",
"drupal/smtp": "^1.0@beta",
"drupal/superfish": "^1.3",
"drupal/views_aggregator": "^1.0@beta",
"drupal/views_data_export": "^1.0@beta",
"drush/drush": "^10.2"
},
"require-dev": {
},
"conflict": {
"drupal/drupal": "*"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"sort-packages": true
},
"extra": {
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
},
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/{$name}": ["type:drupal-library"],
"web/modules/contrib/{$name}": ["type:drupal-module"],
"web/profiles/contrib/{$name}": ["type:drupal-profile"],
"web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/{$name}": ["type:drupal-drush"]
},
"drupal-core-project-message": {
"include-keys": ["homepage", "support"],
"post-create-project-cmd-message": [
"<bg=blue;fg=white> </>",
"<bg=blue;fg=white> Congratulations, youve installed the Drupal codebase </>",
"<bg=blue;fg=white> from the drupal/recommended-project template! </>",
"<bg=blue;fg=white> </>",
"",
"<bg=yellow;fg=black>Next steps</>:",
" * Install the site: https://www.drupal.org/docs/8/install",
" * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
" * Get support: https://www.drupal.org/support",
" * Get involved with the Drupal community:",
" https://www.drupal.org/getting-involved",
" * Remove the plugin that prints this message:",
" composer remove drupal/core-project-message"
]
}
}
}

64
docs/install.txt Normal file
View File

@ -0,0 +1,64 @@
SYSTEM
===========
apt install php-gd php-mbstring php-xml php-curl composer
a2enmod rewrite
SITE
====
#TODO make the vhost
#TODO in apache2.conf set Override All on the directory
DRUPAL
======
composer create-project drupal/recommended-project drupal
mysql -uroot -p
drop database ...;
create database ...;
cd drupal
mkdir -p config/sync
mkdir private
# if web server user =/= deployment user:
sudo chgrp www-data config/sync
cd web
sudo chgrp www-data . -R
sudo chmod g+w sites/default/files -R
sudo find -type d -exec chmod g+s {} \;
# TODO run the installer
drush pm-uninstall search
drush en superfish admin_toolbar smtp superfish security_review opencase -y
# if web server user =/= deployment user:
sudo chmod g-w sites/default/
sudo chmod a-w sites/default/settings.php
sudo chmod g-w sites
sudo chmod g-w sites ./sites/example.settings.local.php ./sites/development.services.yml ./sites/example.sites.php ./sites/default/default.services.yml ./sites/default/default.settings.php ./autoload.php
sudo chmod g-w -R modules/
sudo chmod g-w -R core
sudo chmod g-w profiles index.php update.php
sudo chmod g-w themes -R
sudo chmod g-w web.config robots.txt
cd ../
sudo chmod g-w -R web/modules
sudo chgrp www-data private
sudo chmod g+w,o-r,o-x private
# TODO set $trusted_host_patterns (in settings.php)
# TODO private files (/home/foo/drupal/private) (in settings.php)
# TODO Set all the HTML roles to admin only - /admin/config/content/formats
# TODO run security review (make eveything untrusted except CRM Admin and Admin) - /admin/config/security-review
# TODO homepage -> /opencase/all-cases, 403 - /user/login - /admin/config/system/site-information
# TODO disable blocks: tools, main navigation, footer menu - /admin/structure/block
# TODO logo & colours - admin/appearance/settings/bartik
# TODO disallow registering an account & turn off personal contact forms - /admin/config/people/accounts
# TODO add linked actor field to form display and display display - top of both
# TODO change which contact form is the default - /admin/structure/contact
# TODO change "short" date formate to d/m/Y - /admin/config/regional/date-time

View File

@ -0,0 +1,728 @@
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 &#9660;'
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_'

View File

@ -0,0 +1,7 @@
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

View File

@ -17,6 +17,7 @@ function opencase_default_reporting_uninstall() {
'views.view.reporting_clients', 'views.view.reporting_clients',
'views.view.reporting_volunteers', 'views.view.reporting_volunteers',
'views.view.reporting_cases', 'views.view.reporting_cases',
'views.view.name_and_status_changes',
'facets.facet.asylum_status_export', 'facets.facet.asylum_status_export',
'facets.facet.disability', 'facets.facet.disability',
'facets.facet.nationalities_export', 'facets.facet.nationalities_export',

View File

@ -0,0 +1,633 @@
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: 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: 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 the current record for this person &#9660;'
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
text: ''
output_url_as_text: false
absolute: false
entity_type: oc_actor
plugin_id: entity_link
filters: { }
sorts:
revision_created:
id: revision_created
table: oc_actor_revision
field: revision_created
relationship: none
group_type: min
admin_label: ''
order: DESC
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
title: 'Name, Asylum and Marital Status Report'
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- 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:
display_extenders:
library_in_views_display_extender:
attach_library:
attach_library: opencase/opencase-grouped-views
path: opencase/reporting/name_and_status_changes
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- user.permissions
tags:
- 'config:field.storage.oc_actor.field_asylum_status'
- 'config:field.storage.oc_actor.field_marital_'

View File

@ -10,3 +10,15 @@ opencase_defaults.report_on_volunteers:
parent: opencase_reporting.reporting_menu parent: opencase_reporting.reporting_menu
url: internal:/opencase/reporting/volunteers url: internal:/opencase/reporting/volunteers
weight: 1 weight: 1
opencase.opencase_add_people_menu:
title: 'Add people'
description: 'Add new people'
menu_name: opencase
route_name: opencase.opencase_people_menu
weight: 1
opencase.add_people_links:
class: Drupal\opencase\Plugin\Menu\AddActorsMenuLink
deriver: Drupal\opencase\Plugin\Derivative\AddActorsMenuLink
menu_name: opencase
parent: opencase.opencase_add_people_menu

View File

@ -22,9 +22,23 @@ use Drupal\Core\Render\Element;
function template_preprocess_oc_activity(array &$variables) { function template_preprocess_oc_activity(array &$variables) {
// Fetch OCActivity Entity Object. // Fetch OCActivity Entity Object.
$oc_activity = $variables['elements']['#oc_activity']; $oc_activity = $variables['elements']['#oc_activity'];
$variables['id'] = $oc_activity->get('id')[0]->get('value')->getValue();
// Helpful $content variable for templates. // Helpful $content variable for templates.
foreach (Element::children($variables['elements']) as $key) { foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key]; $variables['content'][$key] = $variables['elements'][$key];
} }
// Separate the fields into two sections to be displayed in two columns.
// Remove the name (title) field as this is displayed anyway.
$variables['base_fields'] = array();
$variables['other_fields'] = array();
foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key];
if (in_array($key, ['activity_date_time', 'time_taken', 'description', 'user_id'])) {
$variables['base_fields'][$key] = $variables['elements'][$key];
} else {
$variables['other_fields'][$key] = $variables['elements'][$key];
unset($variables['other_fields']['name']);
}
}
} }

View File

@ -20,11 +20,17 @@ use Drupal\Core\Render\Element;
* - attributes: HTML attributes for the containing element. * - attributes: HTML attributes for the containing element.
*/ */
function template_preprocess_oc_actor(array &$variables) { function template_preprocess_oc_actor(array &$variables) {
// Fetch OCActor Entity Object. // Make the id available to the template and also separate the fields
$oc_actor = $variables['elements']['#oc_actor']; // into two sections to be displayed in two columns.
$variables['id'] = $variables['elements']['#oc_actor']->get('id')[0]->get('value')->getValue();
// Helpful $content variable for templates. $variables['contact_details'] = array();
$variables['fields_other_than_contact_details'] = array();
foreach (Element::children($variables['elements']) as $key) { foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key]; $variables['content'][$key] = $variables['elements'][$key];
if (in_array($key, ['email', 'phone', 'phone2', 'postal_address', 'post_code'])) {
$variables['contact_details'][$key] = $variables['elements'][$key];
} else {
$variables['fields_other_than_contact_details'][$key] = $variables['elements'][$key];
}
} }
} }

View File

@ -20,11 +20,18 @@ use Drupal\Core\Render\Element;
* - attributes: HTML attributes for the containing element. * - attributes: HTML attributes for the containing element.
*/ */
function template_preprocess_oc_case(array &$variables) { function template_preprocess_oc_case(array &$variables) {
// Fetch OCCase Entity Object. // Separate the fields into two sections to be displayed in two columns.
$oc_case = $variables['elements']['#oc_case']; // Remove the name (title) field as this is displayed anyway.
$variables['id'] = $variables['elements']['#oc_case']->get('id')[0]->get('value')->getValue();
// Helpful $content variable for templates. $variables['base_fields'] = array();
$variables['other_fields'] = array();
foreach (Element::children($variables['elements']) as $key) { foreach (Element::children($variables['elements']) as $key) {
$variables['content'][$key] = $variables['elements'][$key]; $variables['content'][$key] = $variables['elements'][$key];
if (in_array($key, ['created', 'changed', 'files', 'actors_involved', 'status', 'user_id'])) {
$variables['base_fields'][$key] = $variables['elements'][$key];
} else {
$variables['other_fields'][$key] = $variables['elements'][$key];
unset($variables['other_fields']['name']);
}
} }
} }

View File

@ -1,14 +1,27 @@
<?php <?php
function opencase_entities_update_8013() {
$update_manager = \Drupal::entityDefinitionUpdateManager(); use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
$definition = $update_manager->getFieldStorageDefinition('activity_date_time', 'oc_activity');
// $definition->setDescription(''); function opencase_entities_update_80192(&$sandbox) {
// $definition->setRequired(''); $schema_converter = new SqlContentEntityStorageSchemaConverter(
//->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCActivity::currentDateTime') 'oc_actor',
$update_manager->updateFieldStorageDefinition($definition); \Drupal::entityTypeManager(),
\Drupal::entityDefinitionUpdateManager(),
\Drupal::service('entity.last_installed_schema.repository'),
\Drupal::keyValue('entity.storage_schema.sql'),
\Drupal::database()
);
$contact_details_fields = ['email', 'phone', 'phone2', 'postal_address', 'post_code'];
$schema_converter->convertToRevisionable($sandbox, $contact_details_fields);
} }
function opencase_entities_update_8016() {
$update_manager = \Drupal::entityDefinitionUpdateManager();
$definition = $update_manager->getFieldStorageDefinition('activity_date_time', 'oc_activity');
$update_manager->updateFieldStorageDefinition($definition);
}
/** /**
* Add 'activity_date_time' field to 'oc_activity' entities. * Add 'activity_date_time' field to 'oc_activity' entities.
@ -16,9 +29,8 @@ function opencase_entities_update_8013() {
function opencase_entities_update_8003() { function opencase_entities_update_8003() {
$storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('datetime') $storage_definition = \Drupal\Core\Field\BaseFieldDefinition::create('datetime')
->setLabel(t('Date and time')) ->setLabel(t('Date and time'))
->setDescription(t('When the activity started.'))
->setRevisionable(TRUE) ->setRevisionable(TRUE)
->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCActivity::currentDateTime') ->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
->setDisplayOptions('view', [ ->setDisplayOptions('view', [
'type' => 'datetime_default', 'type' => 'datetime_default',
'settings' => [ 'settings' => [
@ -35,4 +47,3 @@ function opencase_entities_update_8003() {
\Drupal::entityDefinitionUpdateManager() \Drupal::entityDefinitionUpdateManager()
->installFieldStorageDefinition('activity_date_time', 'oc_activity', 'oc_activity', $storage_definition); ->installFieldStorageDefinition('activity_date_time', 'oc_activity', 'oc_activity', $storage_definition);
} }

View File

@ -219,10 +219,9 @@ class OCActivity extends RevisionableContentEntityBase implements OCActivityInte
$fields['activity_date_time'] = BaseFieldDefinition::create('datetime') $fields['activity_date_time'] = BaseFieldDefinition::create('datetime')
->setLabel(t('Date and time')) ->setLabel(t('Date and time'))
->setDescription('')
->setRevisionable(TRUE) ->setRevisionable(TRUE)
->setRequired(TRUE) ->setRequired(TRUE)
->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCActivity::currentDateTime') ->setDefaultValueCallback('\Drupal\opencase_entities\Entity\OCActivity::currentDateTime')
->setDisplayOptions('view', [ ->setDisplayOptions('view', [
'label' => 'above', 'label' => 'above',
'type' => 'datetime_default', 'type' => 'datetime_default',

View File

@ -247,11 +247,6 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
'text_processing' => 0, 'text_processing' => 0,
]) ])
->setDefaultValue('') ->setDefaultValue('')
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'string',
'weight' => -9,
])
->setDisplayOptions('form', [ ->setDisplayOptions('form', [
'type' => 'string_textfield', 'type' => 'string_textfield',
'weight' => -9, 'weight' => -9,
@ -267,11 +262,6 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
'text_processing' => 0, 'text_processing' => 0,
]) ])
->setDefaultValue('') ->setDefaultValue('')
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'string',
'weight' => -8,
])
->setDisplayOptions('form', [ ->setDisplayOptions('form', [
'type' => 'string_textfield', 'type' => 'string_textfield',
'weight' => -8, 'weight' => -8,
@ -287,11 +277,6 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
'text_processing' => 0, 'text_processing' => 0,
]) ])
->setDefaultValue('') ->setDefaultValue('')
->setDisplayOptions('view', [
'label' => 'above',
'type' => 'string',
'weight' => -7,
])
->setDisplayOptions('form', [ ->setDisplayOptions('form', [
'type' => 'string_textfield', 'type' => 'string_textfield',
'weight' => -7, 'weight' => -7,
@ -313,6 +298,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
// so it is not exposed to user configuration. // so it is not exposed to user configuration.
$fields['email'] = BaseFieldDefinition::create('string') $fields['email'] = BaseFieldDefinition::create('string')
->setLabel(t('Email Address')) ->setLabel(t('Email Address'))
->setRevisionable(TRUE)
->setSettings(array( ->setSettings(array(
'default_value' => '', 'default_value' => '',
'max_length' => 30, 'max_length' => 30,
@ -329,6 +315,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
)); ));
$fields['phone'] = BaseFieldDefinition::create('string') $fields['phone'] = BaseFieldDefinition::create('string')
->setLabel(t('Main Phone Number')) ->setLabel(t('Main Phone Number'))
->setRevisionable(TRUE)
->setSettings(array( ->setSettings(array(
'default_value' => '', 'default_value' => '',
'max_length' => 20, 'max_length' => 20,
@ -344,6 +331,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
'weight' => -4, 'weight' => -4,
)); ));
$fields['phone2'] = BaseFieldDefinition::create('string') $fields['phone2'] = BaseFieldDefinition::create('string')
->setRevisionable(TRUE)
->setLabel(t('Alternative Phone Number')) ->setLabel(t('Alternative Phone Number'))
->setSettings(array( ->setSettings(array(
'default_value' => '', 'default_value' => '',
@ -360,6 +348,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
'weight' => -3, 'weight' => -3,
)); ));
$fields['postal_address'] = BaseFieldDefinition::create('string_long') $fields['postal_address'] = BaseFieldDefinition::create('string_long')
->setRevisionable(TRUE)
->setLabel(t('Postal Address')) ->setLabel(t('Postal Address'))
->setDescription(t('Full address, apart from post code.')) ->setDescription(t('Full address, apart from post code.'))
->setSettings(array( ->setSettings(array(
@ -377,6 +366,7 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
'weight' => -2, 'weight' => -2,
)); ));
$fields['post_code'] = BaseFieldDefinition::create('string') $fields['post_code'] = BaseFieldDefinition::create('string')
->setRevisionable(TRUE)
->setLabel(t('Post Code')) ->setLabel(t('Post Code'))
->setSettings(array( ->setSettings(array(
'default_value' => '', 'default_value' => '',

View File

@ -222,16 +222,15 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
->setDefaultValue(TRUE); ->setDefaultValue(TRUE);
$fields['user_id'] = BaseFieldDefinition::create('entity_reference') $fields['user_id'] = BaseFieldDefinition::create('entity_reference')
->setLabel(t('Entered by')) ->setLabel(t('Created by'))
->setDescription(t('The user ID of author of the Case entity.')) ->setDescription(t('The user ID of author of the Case entity.'))
->setRevisionable(TRUE) ->setRevisionable(TRUE)
->setSetting('target_type', 'user') ->setSetting('target_type', 'user')
->setSetting('handler', 'default') ->setSetting('handler', 'default')
->setTranslatable(TRUE) ->setTranslatable(TRUE)
->setDisplayOptions('view', [ ->setDisplayOptions('view', [
'label' => 'inline', 'label' => 'above',
'type' => 'author', 'type' => 'author',
'weight' => -4,
]); ]);
$fields['name'] = BaseFieldDefinition::create('string') $fields['name'] = BaseFieldDefinition::create('string')
->setLabel(t('Case Title')) ->setLabel(t('Case Title'))
@ -245,7 +244,6 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
->setDisplayOptions('view', [ ->setDisplayOptions('view', [
'label' => 'hidden', 'label' => 'hidden',
'type' => 'string', 'type' => 'string',
'weight' => -3,
]) ])
->setDisplayOptions('form', [ ->setDisplayOptions('form', [
'type' => 'string_textfield', 'type' => 'string_textfield',
@ -261,6 +259,7 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
->setTranslatable(TRUE) ->setTranslatable(TRUE)
->setCardinality(-1) ->setCardinality(-1)
->setDisplayOptions('form', [ ->setDisplayOptions('form', [
'label' => 'above',
'type' => 'entity_reference_autocomplete', 'type' => 'entity_reference_autocomplete',
'weight' => -2, 'weight' => -2,
'settings' => [ 'settings' => [
@ -272,8 +271,8 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
]) ])
->setDisplayOptions('view', [ ->setDisplayOptions('view', [
'label' => 'above', 'label' => 'above',
'weight' => -2
]) ])
->setDisplayConfigurable('form', true)
->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCCase::defaultVal') ->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCCase::defaultVal')
->setRequired(TRUE); ->setRequired(TRUE);
@ -295,17 +294,22 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
]) ])
->setDisplayOptions('view', [ ->setDisplayOptions('view', [
'label' => 'above', 'label' => 'above',
'weight' => -1,
'settings' => ['use_description_as_link_text' => 'true'] 'settings' => ['use_description_as_link_text' => 'true']
]); ]);
$fields['created'] = BaseFieldDefinition::create('created') $fields['created'] = BaseFieldDefinition::create('created')
->setLabel(t('Created')) ->setLabel(t('Created on'))
->setDescription(t('The time that the entity was created.')); ->setDescription(t('When the case was created.'))
->setDisplayOptions('view', [
'label' => 'above',
]);
$fields['changed'] = BaseFieldDefinition::create('changed') $fields['changed'] = BaseFieldDefinition::create('changed')
->setLabel(t('Changed')) ->setLabel(t('Last updated'))
->setDescription(t('The time that the entity was last edited.')); ->setDescription(t('When the case was last edited.'))
->setDisplayOptions('view', [
'label' => 'above',
]);
$fields['revision_translation_affected'] = BaseFieldDefinition::create('boolean') $fields['revision_translation_affected'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Revision translation affected')) ->setLabel(t('Revision translation affected'))

View File

@ -38,18 +38,11 @@ class OCActorForm extends ContentEntityForm {
*/ */
public function save(array $form, FormStateInterface $form_state) { public function save(array $form, FormStateInterface $form_state) {
$entity = $this->entity; $entity = $this->entity;
// Always make a new revision for a person. They are not changed often and people are likely to
// Save as a new revision if requested to do so. // want to know what has happened to them over time.
if (!$form_state->isValueEmpty('new_revision') && $form_state->getValue('new_revision') != FALSE) { $entity->setNewRevision();
$entity->setNewRevision(); $entity->setRevisionCreationTime(REQUEST_TIME);
$entity->setRevisionUserId(\Drupal::currentUser()->id());
// 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); $status = parent::save($form, $form_state);

View File

@ -16,7 +16,18 @@
*/ */
#} #}
<div{{ attributes.addClass('oc_activity') }}> <div{{ attributes.addClass('oc_activity') }}>
{% if content %} <h2>{{ title }}</h2>
{{- content -}} <div class="oc_entity">
{% endif %} <div class="left">
{{ 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>
</div> </div>

View File

@ -16,7 +16,20 @@
*/ */
#} #}
<div{{ attributes.addClass('oc_actor') }}> <div{{ attributes.addClass('oc_actor') }}>
{% if content %} <div class="oc_entity">
{{- content -}} <div class="left">
{% endif %} {% 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="/opencase/oc_actor/{{ id }}/contact_details_history">See history</a>
{% for field in contact_details %}
{{ field }}
{% endfor %}
</div>
</div>
</div>
</div> </div>

View File

@ -16,7 +16,18 @@
*/ */
#} #}
<div{{ attributes.addClass('oc_case') }}> <div{{ attributes.addClass('oc_case') }}>
{% if content %} <h2>{{ title }}</h2>
{{- content -}} <div class="oc_entity">
{% endif %} <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>
</div> </div>

View File

@ -2,7 +2,7 @@ name: 'OpenCase'
type: module type: module
description: 'Simple Case Management' description: 'Simple Case Management'
core: 8.x core: 8.x
version: 8.x-1.6.1 version: 8.x-1.9.2
package: 'OpenCase' package: 'OpenCase'
dependencies: dependencies:
- opencase_entities - opencase_entities

View File

@ -5,3 +5,8 @@ opencase-lib:
css/opencase.css: {} css/opencase.css: {}
js: js:
js/opencase.js: {} js/opencase.js: {}
opencase-grouped-views:
version: 1.x
css:
layout:
css/grouped_views.css: {}

View File

@ -12,18 +12,6 @@ opencase.opencase_all_cases:
url: internal:/opencase/all-cases url: internal:/opencase/all-cases
weight: 1 weight: 1
opencase.opencase_add_people_menu:
title: 'Add people'
description: 'Add new people'
menu_name: opencase
route_name: opencase.opencase_people_menu
weight: 1
opencase.add_people_links:
class: Drupal\opencase\Plugin\Menu\AddActorsMenuLink
deriver: Drupal\opencase\Plugin\Derivative\AddActorsMenuLink
menu_name: opencase
parent: opencase.opencase_add_people_menu
opencase.opencase_admin_menu: opencase.opencase_admin_menu:
title: 'Administration' title: 'Administration'
description: 'Management and Configuration' description: 'Management and Configuration'

View File

@ -9,6 +9,29 @@ use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Access\AccessResult; use Drupal\Core\Access\AccessResult;
use Drupal\opencase\EntityTypeRelationsWidget; use Drupal\opencase\EntityTypeRelationsWidget;
/**
* Implements hook_element_info_alter().
*/
function opencase_element_info_alter(array &$types) {
$types['datetime']['#process'][] = 'opencase_process_element';
}
/**
* Element process callback for datetime fields. Removes the seconds part.
*/
function opencase_process_element($element) {
if ($element['#date_time_element'] !== 'none') {
$element['#date_time_format'] = 'H:i';
}
if (!empty($element['time']['#value'])) {
$parts = explode(':', $element['time']['#value']);
$parts = array_splice($parts, 0, 2);
$element['time']['#value'] = implode(':', $parts);
}
// Remove seconds in browsers that support HTML5 type=date.
$element['time']['#attributes']['step'] = 60;
return $element;
}
/** /**
* Implements hook_block_access * Implements hook_block_access
@ -141,7 +164,8 @@ function opencase_uninstall() {
'block.block.opencase', 'block.block.opencase',
'system.menu.opencase', 'system.menu.opencase',
'views.view.cases', 'views.view.cases',
'views.view.activities' 'views.view.activities',
'views.view.contact_details_changes'
]; ];
foreach($configs as $config) { foreach($configs as $config) {
Drupal::configFactory()->getEditable($config)->delete(); Drupal::configFactory()->getEditable($config)->delete();