From af3b4727f1948a6dec0f26a76df53741b830c575 Mon Sep 17 00:00:00 2001 From: Naomi Date: Mon, 9 Nov 2020 12:36:08 +0000 Subject: [PATCH] Added some docs --- README.md | 4 +- docs/composer.json | 84 +++++++++++++++++++ docs/install.txt | 78 +++++++++++++++++ .../opencase_entities/src/Entity/OCCase.php | 1 + 4 files changed, 165 insertions(+), 2 deletions(-) create mode 100644 docs/composer.json create mode 100644 docs/install.txt diff --git a/README.md b/README.md index 7295198..68d88a3 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/docs/composer.json b/docs/composer.json new file mode 100644 index 0000000..88b78c8 --- /dev/null +++ b/docs/composer.json @@ -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://github.com/hoegrammer/opencase" + } + ], + "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": [ + " ", + " Congratulations, you’ve installed the Drupal codebase ", + " from the drupal/recommended-project template! ", + " ", + "", + "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" + ] + } + } +} diff --git a/docs/install.txt b/docs/install.txt new file mode 100644 index 0000000..a0ba341 --- /dev/null +++ b/docs/install.txt @@ -0,0 +1,78 @@ +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 + +# TODO add opencase repo to composer.json + +composer require drupal/admin_toolbar +composer require drupal/facets +composer require drupal/search_api +composer require drupal/search_api_db +composer require drupal/security_review +composer require drupal/smtp +composer require drupal/superfish +composer require drupal/views_data_export +composer require drush/drush +composer require drupal/opencase + + +# 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 opencase_defaults opencase_search opencase_reporting -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 diff --git a/modules/opencase_entities/src/Entity/OCCase.php b/modules/opencase_entities/src/Entity/OCCase.php index b6526fc..e4902cc 100644 --- a/modules/opencase_entities/src/Entity/OCCase.php +++ b/modules/opencase_entities/src/Entity/OCCase.php @@ -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);