From 05572885ce077e9b83b0b8155dc9b40675ceb4df Mon Sep 17 00:00:00 2001 From: Guillaume Lesniak Date: Fri, 16 Dec 2016 17:17:56 +0100 Subject: [PATCH 1/5] ExtractTranslations: Use grunt from PATH or from node_modules, whichever is available --- scripts/extract_translations.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/extract_translations.sh b/scripts/extract_translations.sh index 6ba7dfc..b3949f3 100755 --- a/scripts/extract_translations.sh +++ b/scripts/extract_translations.sh @@ -2,11 +2,21 @@ if [ -d node_modules/ng_backoffice ]; then pushd node_modules/ng_backoffice - node_modules/.bin/grunt extract_translations + + if [ -f node_modules/.bin/grunt ]; then + node_modules/.bin/grunt extract_translations + else + grunt extract_translations + fi fi if [ -d node_modules/ng_client ]; then pushd node_modules/ng_client - node_modules/.bin/grunt extract_translations + + if [ -f node_modules/.bin/grunt ]; then + node_modules/.bin/grunt extract_translations + else + grunt extract_translations + fi fi From 33a66a4c4b4c28d94b53b2dacc5ed259d748ca2d Mon Sep 17 00:00:00 2001 From: Guillaume Lesniak Date: Fri, 16 Dec 2016 17:18:57 +0100 Subject: [PATCH 2/5] Scripts: Add get deliverable script to test deliverables --- scripts/get_deliverable.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/get_deliverable.sh diff --git a/scripts/get_deliverable.sh b/scripts/get_deliverable.sh new file mode 100755 index 0000000..09d7920 --- /dev/null +++ b/scripts/get_deliverable.sh @@ -0,0 +1,13 @@ +# ./get_deliverable.sh +clear +echo "======" +echo http://monarcfo/api/client-anr/$2/deliverable?model=$3 +echo "======" + +curl -H "Token: $1" http://monarcfo/api/client-anr/$2/deliverable?model=$3 > /tmp/exported.docx 2>/dev/null + +if grep "errors" /tmp/exported.docx; then + cat /tmp/exported.docx +fi + +echo "" From 0401bc972275c372ffc0b84bdcc5a7d11f74a359 Mon Sep 17 00:00:00 2001 From: Guillaume Lesniak Date: Fri, 16 Dec 2016 17:19:14 +0100 Subject: [PATCH 3/5] composer: Add PHPWord --- composer.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2b5a7e4..ea1d7dd 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,8 @@ "monarc/core": "dev-master", "monarc/frontoffice": "dev-master", "phing/phing": "~2.0", - "beberlei/DoctrineExtensions": "^1.0" + "beberlei/DoctrineExtensions": "^1.0", + "phpoffice/phpword": "dev-master" }, "config": { "bin-dir": "bin/" @@ -29,6 +30,10 @@ { "type": "vcs", "url": "git+ssh://gogs@rhea.netlor.fr:2222/monarc/zm_client" + }, + { + "type": "vcs", + "url": "git+ssh://gogs@rhea.netlor.fr:2222/libs/PHPWord" } ] } From bb6935ad966398e6d3cd0669f65fc64890066e77 Mon Sep 17 00:00:00 2001 From: Guillaume Lesniak Date: Sat, 17 Dec 2016 02:41:02 +0100 Subject: [PATCH 4/5] local.php.dist: add cliModel config --- config/autoload/local.php.dist | 1 + 1 file changed, 1 insertion(+) diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index 603ffb0..d5b3a75 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -63,5 +63,6 @@ return array( 'monarc' => array( 'ttl' => 20, // timeout 'salt' => '', // salt privé pour chiffrement pwd + 'cliModel' => 'generic', // modèle à afficher pour le client, soit un ID de modèle spéc, soit 'generic' (vide pour tout) ), ); From faba1386c87438d8de2366e5d6dd5f7c0c74d4ef Mon Sep 17 00:00:00 2001 From: Majdi SFAXI Date: Wed, 21 Dec 2016 13:23:32 +0100 Subject: [PATCH 5/5] modif config files --- config/autoload/config.local.php.dist | 15 ++++++++++++--- config/autoload/local.php.dist | 15 ++++++++++++--- config/autoload/smtp.local.php.dist | 13 ------------- 3 files changed, 24 insertions(+), 19 deletions(-) delete mode 100755 config/autoload/smtp.local.php.dist diff --git a/config/autoload/config.local.php.dist b/config/autoload/config.local.php.dist index ea39bdf..70630ba 100755 --- a/config/autoload/config.local.php.dist +++ b/config/autoload/config.local.php.dist @@ -2,9 +2,18 @@ return [ 'languages' => [ - 1 => 'Français', - 2 => 'English', - 3 => 'Deutsch' + 'fr' => [ + 'index' => 1, + 'label' => 'Français', + ], + 'en' => [ + 'index' => 2, + 'label' => 'English', + ], + 'de' => [ + 'index' => 3, + 'label' => 'Deutsch', + ], ], 'defaultLanguageIndex' => 2 ]; diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist index d5b3a75..96f349a 100644 --- a/config/autoload/local.php.dist +++ b/config/autoload/local.php.dist @@ -35,9 +35,18 @@ return array( 'languages' => [ - 1 => 'Français', - 2 => 'English', - 3 => 'Deutsch' + 'fr' => [ + 'index' => 1, + 'label' => 'Français', + ], + 'en' => [ + 'index' => 2, + 'label' => 'English', + ], + 'de' => [ + 'index' => 3, + 'label' => 'Deutsch', + ], ], 'defaultLanguageIndex' => 1, diff --git a/config/autoload/smtp.local.php.dist b/config/autoload/smtp.local.php.dist deleted file mode 100755 index 649db5f..0000000 --- a/config/autoload/smtp.local.php.dist +++ /dev/null @@ -1,13 +0,0 @@ - [ - 'name' => 'mailtrap.io', - 'host' => 'mailtrap.io', - 'connection_class' => 'crammd5', - 'connection_config' => [ - 'username' => '******', - 'password' => '******', - ], - ] -];