Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
ab2662195b | |||
b81d6b5f31 | |||
ad6811b5e9 | |||
da0c0ff1b5 | |||
3e6011a359 | |||
7e28f88b86 | |||
0efab1af06 | |||
4b14537dc4 | |||
52eb5898e3 |
@ -2,22 +2,68 @@ langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.opencase-admin
|
||||
- system.menu.opencase
|
||||
module:
|
||||
- system
|
||||
- superfish
|
||||
theme:
|
||||
- bartik
|
||||
id: opencase
|
||||
theme: bartik
|
||||
region: sidebar_first
|
||||
weight: -8
|
||||
region: primary_menu
|
||||
weight: 0
|
||||
provider: null
|
||||
plugin: 'system_menu_block:opencase-admin'
|
||||
plugin: 'superfish:opencase'
|
||||
settings:
|
||||
id: 'system_menu_block:opencase-admin'
|
||||
label: 'OpenCase Admin'
|
||||
provider: system
|
||||
label_display: visible
|
||||
level: 1
|
||||
depth: 0
|
||||
id: 'superfish:opencase'
|
||||
label: OpenCase
|
||||
provider: superfish
|
||||
label_display: '0'
|
||||
level: '1'
|
||||
depth: '0'
|
||||
menu_type: horizontal
|
||||
style: none
|
||||
arrow: 0
|
||||
shadow: 1
|
||||
speed: fast
|
||||
delay: '800'
|
||||
slide: vertical
|
||||
supposition: 1
|
||||
hoverintent: 1
|
||||
touch: '0'
|
||||
touchbh: '2'
|
||||
touchbp: '768'
|
||||
touchua: '0'
|
||||
touchual: ''
|
||||
touchuam: '0'
|
||||
small: '2'
|
||||
smallbp: '768'
|
||||
smallua: '0'
|
||||
smallual: ''
|
||||
smalluam: '0'
|
||||
smallact: '1'
|
||||
smallset: ''
|
||||
smallasa: 0
|
||||
smallcmc: 0
|
||||
smallecm: ''
|
||||
smallchc: 0
|
||||
smallech: ''
|
||||
smallicm: ''
|
||||
smallich: ''
|
||||
smallamt: ''
|
||||
smallabt: '1'
|
||||
supersubs: 1
|
||||
minwidth: '12'
|
||||
maxwidth: '27'
|
||||
multicolumn: 0
|
||||
multicolumn_depth: '1'
|
||||
multicolumn_levels: '1'
|
||||
pathlevels: '1'
|
||||
expanded: 0
|
||||
clone_parent: 0
|
||||
hide_linkdescription: 0
|
||||
add_linkdescription: 0
|
||||
link_depth_class: 1
|
||||
custom_list_class: ''
|
||||
custom_item_class: ''
|
||||
custom_link_class: ''
|
||||
visibility: { }
|
||||
|
@ -1,31 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.opencase-add-actors
|
||||
module:
|
||||
- system
|
||||
- user
|
||||
theme:
|
||||
- bartik
|
||||
id: opencaseaddactors
|
||||
theme: bartik
|
||||
region: sidebar_first
|
||||
weight: -8
|
||||
provider: null
|
||||
plugin: 'system_menu_block:opencase-add-actors'
|
||||
settings:
|
||||
id: 'system_menu_block:opencase-add-actors'
|
||||
label: 'Add Actors'
|
||||
provider: system
|
||||
label_display: visible
|
||||
level: 1
|
||||
depth: 0
|
||||
visibility:
|
||||
user_role:
|
||||
id: user_role
|
||||
roles:
|
||||
authenticated: authenticated
|
||||
negate: false
|
||||
context_mapping:
|
||||
user: '@user.current_user_context:current_user'
|
@ -1,31 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.openc
|
||||
module:
|
||||
- system
|
||||
- user
|
||||
theme:
|
||||
- bartik
|
||||
id: opencaseglobal
|
||||
theme: bartik
|
||||
region: sidebar_first
|
||||
weight: -7
|
||||
provider: null
|
||||
plugin: 'system_menu_block:openc'
|
||||
settings:
|
||||
id: 'system_menu_block:openc'
|
||||
label: 'OpenCase Global'
|
||||
provider: system
|
||||
label_display: '0'
|
||||
level: 1
|
||||
depth: 0
|
||||
visibility:
|
||||
user_role:
|
||||
id: user_role
|
||||
roles:
|
||||
authenticated: authenticated
|
||||
negate: false
|
||||
context_mapping:
|
||||
user: '@user.current_user_context:current_user'
|
@ -1,7 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: openc
|
||||
label: 'OpenCase Global'
|
||||
description: ''
|
||||
locked: false
|
@ -1,7 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: opencase-add-actors
|
||||
label: 'OpenCase Add Actors'
|
||||
description: ''
|
||||
locked: false
|
@ -1,7 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: opencase-admin
|
||||
label: 'OpenCase Admin'
|
||||
description: 'Administer OpenCase '
|
||||
locked: false
|
@ -584,7 +584,7 @@ display:
|
||||
admin_label: ''
|
||||
empty: true
|
||||
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 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"
|
||||
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 People.</b> menu.</p>\n"
|
||||
plugin_id: text_custom
|
||||
cache_metadata:
|
||||
max-age: -1
|
||||
|
@ -16,3 +16,16 @@ body {
|
||||
.js-form-item.form-item.js-form-type-checkbox.form-type-checkbox.js-form-item-new-revision.form-item-new-revision {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Style the search box in header bar. */
|
||||
#block-exposedformactor-searchpage-1 {
|
||||
top: -20px;
|
||||
}
|
||||
|
||||
#block-exposedformactor-searchpage-1 #edit-actions {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#block-exposedformactor-searchpage-1 .form-text {
|
||||
width: 200px;
|
||||
}
|
||||
|
@ -1,31 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.opencase-add-actors
|
||||
module:
|
||||
- system
|
||||
- user
|
||||
theme:
|
||||
- bartik
|
||||
id: opencaseaddactors
|
||||
theme: bartik
|
||||
region: sidebar_first
|
||||
weight: -8
|
||||
provider: null
|
||||
plugin: 'system_menu_block:opencase-add-actors'
|
||||
settings:
|
||||
id: 'system_menu_block:opencase-add-actors'
|
||||
label: 'Add Records'
|
||||
provider: system
|
||||
label_display: visible
|
||||
level: 1
|
||||
depth: 0
|
||||
visibility:
|
||||
user_role:
|
||||
id: user_role
|
||||
roles:
|
||||
authenticated: authenticated
|
||||
negate: false
|
||||
context_mapping:
|
||||
user: '@user.current_user_context:current_user'
|
@ -1,7 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: opencase-add-actors
|
||||
label: 'OpenCase Add Actors'
|
||||
description: ''
|
||||
locked: false
|
@ -1,10 +1,11 @@
|
||||
name: 'Opencase Example Configuration'
|
||||
type: module
|
||||
description: 'Actor types, case types, activity types and user roles suited to an asylum advice group'
|
||||
description: 'Person types, case types, activity types and user roles suited to an asylum advice group'
|
||||
core: 8.x
|
||||
package: 'OpenCase'
|
||||
dependencies:
|
||||
- contact
|
||||
- field
|
||||
- opencase_entities
|
||||
- opencase_reporting
|
||||
- options
|
||||
|
@ -1,12 +1,12 @@
|
||||
opencase_reporting.clients:
|
||||
opencase_defaults.report_on_clients:
|
||||
title: 'Clients'
|
||||
description: 'Report on clients'
|
||||
menu_name: opencase_reporting
|
||||
parent: opencase_defaults.reporting_menu
|
||||
url: internal:/opencase/reporting/clients
|
||||
weight: 0
|
||||
opencase_reporting.volunteers:
|
||||
opencase_defaults.report_on_volunteers:
|
||||
title: 'Volunteers'
|
||||
description: 'Report on volunteers'
|
||||
menu_name: opencase_reporting
|
||||
parent: opencase_defaults.reporting_menu
|
||||
url: internal:/opencase/reporting/volunteers
|
||||
weight: 1
|
||||
|
@ -1,11 +1,11 @@
|
||||
entity.oc_actor.add_form:
|
||||
route_name: entity.oc_actor.add_page
|
||||
title: 'Add Actor'
|
||||
title: 'Add Person'
|
||||
appears_on:
|
||||
- entity.oc_actor.collection
|
||||
entity.oc_actor_type.add_form:
|
||||
route_name: entity.oc_actor_type.add_form
|
||||
title: 'Add Actor type'
|
||||
title: 'Add Person type'
|
||||
appears_on:
|
||||
- entity.oc_actor_type.collection
|
||||
|
||||
|
@ -17,8 +17,8 @@ use Drupal\user\UserInterface;
|
||||
*
|
||||
* @ContentEntityType(
|
||||
* id = "oc_actor",
|
||||
* label = @Translation("Actor"),
|
||||
* bundle_label = @Translation("Actor type"),
|
||||
* label = @Translation("Person"),
|
||||
* bundle_label = @Translation("Person type"),
|
||||
* handlers = {
|
||||
* "storage" = "Drupal\opencase_entities\OCActorStorage",
|
||||
* "view_builder" = "Drupal\Core\Entity\EntityViewBuilder",
|
||||
|
@ -55,13 +55,13 @@ class OCActorForm extends ContentEntityForm {
|
||||
|
||||
switch ($status) {
|
||||
case SAVED_NEW:
|
||||
drupal_set_message($this->t('Created the %label Actor.', [
|
||||
drupal_set_message($this->t('Created %label.', [
|
||||
'%label' => $entity->label(),
|
||||
]));
|
||||
break;
|
||||
|
||||
default:
|
||||
drupal_set_message($this->t('Saved the %label Actor.', [
|
||||
drupal_set_message($this->t('Saved %label.', [
|
||||
'%label' => $entity->label(),
|
||||
]));
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
config:
|
||||
- system.menu.opencase_reporting
|
||||
module:
|
||||
- system
|
||||
theme:
|
||||
- bartik
|
||||
id: opencase_reporting_menu
|
||||
theme: bartik
|
||||
region: sidebar_first
|
||||
weight: -8
|
||||
provider: null
|
||||
plugin: 'system_menu_block:opencase_reporting'
|
||||
settings:
|
||||
id: 'system_menu_block:opencase_reporting'
|
||||
label: 'Reporting'
|
||||
provider: system
|
||||
label_display: visible
|
||||
level: 1
|
||||
depth: 0
|
||||
visibility: { }
|
@ -1,7 +0,0 @@
|
||||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: opencase_reporting
|
||||
label: 'OpenCase Reporting'
|
||||
description: ''
|
||||
locked: false
|
@ -0,0 +1,6 @@
|
||||
opencase_defaults.reporting_menu:
|
||||
title: 'Reporting'
|
||||
description: 'Report on clients'
|
||||
menu_name: opencase
|
||||
url: internal:#
|
||||
weight: 10
|
@ -9,7 +9,7 @@ dependencies:
|
||||
- bartik
|
||||
id: exposedformactor_searchpage_1
|
||||
theme: bartik
|
||||
region: sidebar_first
|
||||
region: header
|
||||
weight: -9
|
||||
provider: null
|
||||
plugin: 'views_exposed_filter_block:actor_search-page_1'
|
||||
|
@ -8,7 +8,7 @@ dependencies:
|
||||
- search_api
|
||||
- user
|
||||
id: actor_search
|
||||
label: 'Actor Search'
|
||||
label: 'Person Search'
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
@ -554,7 +554,7 @@ display:
|
||||
expose:
|
||||
operator_id: search_api_fulltext_op
|
||||
label: 'Search by Name'
|
||||
description: 'Type at least 3 letters of a first or last name and press enter.'
|
||||
description: 'Type at least 3 letters and press enter.'
|
||||
use_operator: false
|
||||
operator: search_api_fulltext_op
|
||||
identifier: search_api_fulltext
|
||||
|
@ -5,5 +5,6 @@ core: 8.x
|
||||
package: 'OpenCase'
|
||||
dependencies:
|
||||
- opencase_entities
|
||||
- opencase_search
|
||||
libraries:
|
||||
- opencase/opencase-lib
|
||||
|
@ -1,40 +1,82 @@
|
||||
opencase.cases:
|
||||
title: 'Cases'
|
||||
description: 'View cases'
|
||||
menu_name: opencase
|
||||
url: internal:#
|
||||
weight: 0
|
||||
opencase.opencase_all_cases:
|
||||
title: 'All Cases'
|
||||
description: 'All cases I have access to'
|
||||
menu_name: opencase
|
||||
parent: opencase.cases
|
||||
url: internal:/opencase/all-cases
|
||||
weight: 1
|
||||
|
||||
opencase.opencase_add_people_menu:
|
||||
title: 'Add people'
|
||||
description: 'Add new people'
|
||||
menu_name: opencase
|
||||
url: internal:#
|
||||
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:
|
||||
title: 'Administration'
|
||||
description: 'Management and Configuration'
|
||||
route_name: opencase.opencase_admin_menu
|
||||
menu_name: opencase
|
||||
weight: 100
|
||||
opencase.manage_user_logins:
|
||||
title: 'Manage user logins'
|
||||
description: 'Manage who can access the system'
|
||||
menu_name: opencase-admin
|
||||
menu_name: opencase
|
||||
parent: opencase.opencase_admin_menu
|
||||
url: internal:/admin/people
|
||||
weight: 0
|
||||
opencase.manage_actor_types:
|
||||
title: 'Manage actor types'
|
||||
description: 'Configure types of actors and their fields'
|
||||
menu_name: opencase-admin
|
||||
opencase.manage_person_types:
|
||||
title: 'Manage person types'
|
||||
description: 'Configure types of people and their fields'
|
||||
menu_name: opencase
|
||||
parent: opencase.opencase_admin_menu
|
||||
url: internal:/admin/opencase/oc_actor_type
|
||||
weight: 1
|
||||
opencase.manage_case_types:
|
||||
title: 'Manage case types'
|
||||
description: 'Configure types of cases and their fields'
|
||||
menu_name: opencase-admin
|
||||
menu_name: opencase
|
||||
parent: opencase.opencase_admin_menu
|
||||
url: internal:/admin/opencase/oc_case_type
|
||||
weight: 2
|
||||
opencase.manage_activity_types:
|
||||
title: 'Manage activity types'
|
||||
description: 'Configure types of activities and their fields'
|
||||
menu_name: opencase-admin
|
||||
menu_name: opencase
|
||||
parent: opencase.opencase_admin_menu
|
||||
url: internal:/admin/opencase/oc_activity_type
|
||||
weight: 3
|
||||
|
||||
opencase.opencase_support_menu:
|
||||
title: 'Support'
|
||||
description: 'Get help and advice'
|
||||
menu_name: opencase
|
||||
url: internal:#
|
||||
weight: 101
|
||||
opencase.view_documentation:
|
||||
title: 'Read documentation'
|
||||
description: 'Find out about OpenCase and how it works'
|
||||
menu_name: openc
|
||||
menu_name: opencase
|
||||
parent: opencase.opencase_support_menu
|
||||
url: https://hoegrammer.gitbooks.io/opencase/content/
|
||||
weight: 0
|
||||
opencase.send_feedback:
|
||||
title: 'Send feedback'
|
||||
opencase.contact_developers:
|
||||
title: 'Contact OpenCase'
|
||||
description: 'Contact the OpenCase developers'
|
||||
menu_name: openc
|
||||
menu_name: opencase
|
||||
parent: opencase.opencase_support_menu
|
||||
url: internal:/contact
|
||||
weight: 1
|
||||
opencase.add_actors_links:
|
||||
class: Drupal\opencase\Plugin\Menu\AddActorsMenuLink
|
||||
deriver: Drupal\opencase\Plugin\Derivative\AddActorsMenuLink
|
||||
menu_name: opencase-add-actors
|
||||
|
||||
|
@ -30,8 +30,6 @@ function opencase_block_access(\Drupal\block\Entity\Block $block, $operation, \D
|
||||
'entity.oc_activity.canonical',
|
||||
'entity.oc_activity.edit_form',
|
||||
'entity.oc_activity.add_form',
|
||||
'system.menu.opencase-add-actors',
|
||||
'block.block.opencaseaddactors',
|
||||
];
|
||||
return AccessResult::forbiddenIf(!in_array($route_name, $routes_where_it_should_be_shown))->addCacheableDependency($block);
|
||||
}
|
||||
@ -140,13 +138,7 @@ function opencase_form_oc_case_type_edit_form_alter(&$form, $form_state) {
|
||||
function opencase_uninstall() {
|
||||
$configs = [
|
||||
'block.block.opencasecontextualmenu',
|
||||
'block.block.opencase',
|
||||
'block.block.opencaseaddactors',
|
||||
'system.menu.opencase-add-actors',
|
||||
'system.menu.openc',
|
||||
'views.view.cases',
|
||||
'block.block.opencaseglobal',
|
||||
'system.menu.opencase-admin',
|
||||
'views.view.activities'
|
||||
];
|
||||
foreach($configs as $config) {
|
||||
|
8
opencase.routing.yml
Normal file
8
opencase.routing.yml
Normal file
@ -0,0 +1,8 @@
|
||||
opencase.opencase_admin_menu:
|
||||
path: '#'
|
||||
requirements:
|
||||
_permission: 'administer users'
|
||||
opencase.opencase_admin_menu:
|
||||
path: '#'
|
||||
requirements:
|
||||
_permission: 'administer users'
|
@ -20,7 +20,7 @@ class EntityTypeRelationsWidget {
|
||||
$options[$machine_name] = $info['label'];
|
||||
}
|
||||
$form['allowed_actor_types'] = array(
|
||||
'#title' => t('Actor types'),
|
||||
'#title' => t('Allowed involved parties'),
|
||||
'#description' => t('Types of people that can be involved in this kind of case.'),
|
||||
'#type' => 'checkboxes',
|
||||
'#options' => $options
|
||||
|
@ -21,7 +21,7 @@ class ActorTypeHelp extends BlockBase {
|
||||
public function build() {
|
||||
return array(
|
||||
'#markup' => "
|
||||
<h3>All actor types have contact details fields by default. Other fields can be added and managed here.</h3>
|
||||
<h3>All person types have contact details fields by default. Other fields can be added and managed here.</h3>
|
||||
|
||||
"
|
||||
);
|
||||
|
Reference in New Issue
Block a user