Added some docs

This commit is contained in:
Naomi 2020-11-09 12:36:08 +00:00
parent 011029d3b3
commit af3b4727f1
4 changed files with 165 additions and 2 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.

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://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": [
"<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"
]
}
}
}

78
docs/install.txt Normal file
View File

@ -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

View File

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