diff --git a/composer.json b/composer.json index cd5a27d..aedd9d8 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "robmorgan/phinx": "0.5.*", "monarc/core": "dev-master", "monarc/frontoffice": "dev-master", - "phing/phing": "~2.0" + "phing/phing": "~2.0", + "phpoffice/phpword": "dev-master" }, "config": { "bin-dir": "bin/" @@ -28,6 +29,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" } ] } 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 603ffb0..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, @@ -63,5 +72,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) ), ); 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' => '******', - ], - ] -]; 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 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 ""