Compare commits

...

6 Commits
1.9 ... 1.9.4

9 changed files with 188 additions and 15 deletions

View File

@ -1,5 +1,5 @@
# OpenCase
A simple case-management system for small altruistic organisations.
A simple case-management system
## The Plan
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.
## 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.

View File

@ -78,3 +78,10 @@ table.views-table.views-view-table caption {
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

@ -10,3 +10,15 @@ opencase_defaults.report_on_volunteers:
parent: opencase_reporting.reporting_menu
url: internal:/opencase/reporting/volunteers
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

@ -1,5 +1,22 @@
<?php
use \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchemaConverter;
function opencase_entities_update_80192(&$sandbox) {
$schema_converter = new SqlContentEntityStorageSchemaConverter(
'oc_actor',
\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');

View File

@ -272,6 +272,7 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface {
->setDisplayOptions('view', [
'label' => 'above',
])
->setDisplayConfigurable('form', true)
->setDefaultValueCallback('Drupal\opencase_entities\Entity\OCCase::defaultVal')
->setRequired(TRUE);

View File

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

View File

@ -12,18 +12,6 @@ opencase.opencase_all_cases:
url: internal:/opencase/all-cases
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:
title: 'Administration'
description: 'Management and Configuration'