--- a/cms/corpus_module/README.md Fri Nov 13 11:04:04 2015 +0100
+++ b/cms/corpus_module/README.md Fri Nov 13 16:45:27 2015 +0100
@@ -11,10 +11,12 @@
## Installation
* Place this module into the modules/ folder of your Drupal project.
+* In the Drupal's administration page of the modules, enable the new Corpus Client module
+* Run the 'Update Script'
+* Check the installation by visiting the url of the module ('corpus' by default)
### Configuration
You can setting up the module by changing the following variable in the corpus.module file:
-* define('CORPUS_URL', 'corpus'); - The url to access to your module
-* define('CORPUS_APP', 'app-client'); - The name of the folder the module look into to find the ember app to embed
-* define('MODULE_NAME', 'corpus'); - The name of the module. It must match the name of the module folder.
+* define('CORPUS_URL', 'corpus'); - The relative url to access your module
+(Don't forget to run again the 'Update Script' in Drupal once the module has been changed)
--- a/cms/corpus_module/corpus.module Fri Nov 13 11:04:04 2015 +0100
+++ b/cms/corpus_module/corpus.module Fri Nov 13 16:45:27 2015 +0100
@@ -1,7 +1,7 @@
<?php
define('CORPUS_URL', 'corpus');
+
define('CORPUS_APP', 'app-client');
-define('MODULE_NAME', 'corpus');
/**
* Implements hook_menu().
@@ -24,12 +24,12 @@
function corpus_page() {
$app = CORPUS_APP;
- $path = drupal_get_path('module', MODULE_NAME) . '/' . $app;
+ $path = drupal_get_path('module', 'corpus') . '/' . $app;
$element = array(
'#tag' => 'base', // The #tag is the html tag - <link />
'#attributes' => array( // Set up an array of attributes inside the tag
- 'href' => '/corpus/',
+ 'href' => '/'.CORPUS_URL.'/',
),
);
drupal_add_html_head($element, 'ember_init_base');
@@ -38,7 +38,7 @@
'#tag' => 'meta', // The #tag is the html tag - <link />
'#attributes' => array( // Set up an array of attributes inside the tag
'name' => 'app-client/config/environment',
- 'content' => '%7B%22rootElement%22%3A%22%23corpus-app%22%2C%22modulePrefix%22%3A%22app-client%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3A%22/corpus%22%2C%22locationType%22%3A%22auto%22%2C%22APP%22%3A%7B%22baseStatic%22%3A%22/'.drupal_get_path('module', MODULE_NAME).'/app-client/%22%2C%22name%22%3A%22app-client%22%2C%22version%22%3A%220.0.0+%22%7D%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy-Report-Only%22%2C%22contentSecurityPolicy%22%3A%7B%22default-src%22%3A%22%27none%27%22%2C%22script-src%22%3A%22%27self%27%22%2C%22font-src%22%3A%22%27self%27%22%2C%22connect-src%22%3A%22%27self%27%22%2C%22img-src%22%3A%22%27self%27%22%2C%22style-src%22%3A%22%27self%27%22%2C%22media-src%22%3A%22%27self%27%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D'
+ 'content' => '%7B%22rootElement%22%3A%22%23corpus-app%22%2C%22modulePrefix%22%3A%22app-client%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3A%22/corpus%22%2C%22locationType%22%3A%22auto%22%2C%22APP%22%3A%7B%22baseStatic%22%3A%22/'.drupal_get_path('module', 'corpus').'/app-client/%22%2C%22name%22%3A%22app-client%22%2C%22version%22%3A%220.0.0+%22%7D%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy-Report-Only%22%2C%22contentSecurityPolicy%22%3A%7B%22default-src%22%3A%22%27none%27%22%2C%22script-src%22%3A%22%27self%27%22%2C%22font-src%22%3A%22%27self%27%22%2C%22connect-src%22%3A%22%27self%27%22%2C%22img-src%22%3A%22%27self%27%22%2C%22style-src%22%3A%22%27self%27%22%2C%22media-src%22%3A%22%27self%27%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D'
),
);