diff --git a/composer.json b/composer.json index e6775c2e8c..87eaa4dde5 100644 --- a/composer.json +++ b/composer.json @@ -21,13 +21,17 @@ { "type": "vcs", "url": "https://github.com/nlegoff/Media-Alchemyst" + }, + { + "type": "vcs", + "url": "https://github.com/nlegoff/Imagine" } ], "minimum-stability" : "dev", "require": { "php" : ">=5.3.3", "alchemy/oauth2php" : "1.0.0", - "alchemy/phlickr" : "0.2.7", + "alchemy/phlickr" : "0.2.8", "dailymotion/sdk" : "~1.5", "data-uri/data-uri" : "~0.1.0", "doctrine/orm" : "~2.3.0", @@ -37,7 +41,7 @@ "alchemy/geonames-api-consumer" : "~0.1.0", "goodby/csv" : "~1.0", "guzzle/guzzle" : "~3.0", - "imagine/imagine" : "0.6.x-dev@dev", + "imagine/imagine" : "dev-flatten-layer as 0.6.1", "jms/serializer" : "~0.10", "justinrainbow/json-schema" : "~1.3", "mediavorus/mediavorus" : "dev-fix-video-dim as 0.4.3", diff --git a/composer.lock b/composer.lock index 18db6dd1a7..13b332a281 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "6dbba3e72a44255a6292ee8fedbce88e", + "hash": "748dacbcdc2199ab5eed1a237bf4fd17", "packages": [ { "name": "alchemy-fr/tcpdf-clone", @@ -272,16 +272,16 @@ }, { "name": "alchemy/phlickr", - "version": "0.2.7", + "version": "0.2.8", "source": { "type": "git", "url": "https://github.com/alchemy-fr/Phlickr.git", - "reference": "9f228cabf924bdd5913fdb59514904d0d4c8e40a" + "reference": "26b7764fd45c15062cb1b21c9389aff919e8c2bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/alchemy-fr/Phlickr/zipball/9f228cabf924bdd5913fdb59514904d0d4c8e40a", - "reference": "9f228cabf924bdd5913fdb59514904d0d4c8e40a", + "url": "https://api.github.com/repos/alchemy-fr/Phlickr/zipball/26b7764fd45c15062cb1b21c9389aff919e8c2bd", + "reference": "26b7764fd45c15062cb1b21c9389aff919e8c2bd", "shasum": "" }, "type": "library", @@ -291,7 +291,7 @@ } }, "notification-url": "https://packagist.org/downloads/", - "time": "2013-07-01 09:47:54" + "time": "2014-07-07 14:01:51" }, { "name": "dailymotion/sdk", @@ -1214,16 +1214,16 @@ }, { "name": "imagine/imagine", - "version": "dev-develop", + "version": "dev-flatten-layer", "source": { "type": "git", - "url": "https://github.com/avalanche123/Imagine.git", - "reference": "237ccf205dd5ece7a00a574b4f18bd118aa08a5d" + "url": "https://github.com/nlegoff/Imagine.git", + "reference": "df2d9d8834d32943082fc52b89c5b11fde279b5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/avalanche123/Imagine/zipball/237ccf205dd5ece7a00a574b4f18bd118aa08a5d", - "reference": "237ccf205dd5ece7a00a574b4f18bd118aa08a5d", + "url": "https://api.github.com/repos/nlegoff/Imagine/zipball/df2d9d8834d32943082fc52b89c5b11fde279b5a", + "reference": "df2d9d8834d32943082fc52b89c5b11fde279b5a", "shasum": "" }, "require": { @@ -1240,7 +1240,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-develop": "0.6-dev" + "dev-develop": "0.7-dev" } }, "autoload": { @@ -1248,7 +1248,6 @@ "Imagine": "lib/" } }, - "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], @@ -1267,7 +1266,10 @@ "image manipulation", "image processing" ], - "time": "2013-10-26 10:53:02" + "support": { + "source": "https://github.com/nlegoff/Imagine/tree/flatten-layer" + }, + "time": "2014-07-07 17:04:15" }, { "name": "jms/metadata", @@ -1496,12 +1498,12 @@ "source": { "type": "git", "url": "https://github.com/nlegoff/Media-Alchemyst.git", - "reference": "e812e631b74ebb0c7b3dd5f4e981d84a7b3c4029" + "reference": "be5c7cd4e207c469fb88d88397bd220c4db323d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nlegoff/Media-Alchemyst/zipball/e812e631b74ebb0c7b3dd5f4e981d84a7b3c4029", - "reference": "e812e631b74ebb0c7b3dd5f4e981d84a7b3c4029", + "url": "https://api.github.com/repos/nlegoff/Media-Alchemyst/zipball/be5c7cd4e207c469fb88d88397bd220c4db323d8", + "reference": "be5c7cd4e207c469fb88d88397bd220c4db323d8", "shasum": "" }, "require": { @@ -1563,7 +1565,7 @@ "support": { "source": "https://github.com/nlegoff/Media-Alchemyst/tree/master" }, - "time": "2014-06-10 13:51:13" + "time": "2014-07-07 16:54:32" }, { "name": "mediavorus/mediavorus", @@ -4014,6 +4016,12 @@ } ], "aliases": [ + { + "alias": "0.6.1", + "alias_normalized": "0.6.1.0", + "version": "dev-flatten-layer", + "package": "imagine/imagine" + }, { "alias": "0.4.3", "alias_normalized": "0.4.3.0", diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Edit.php b/lib/Alchemy/Phrasea/Controller/Prod/Edit.php index 0140782220..76e35fa3b0 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Edit.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Edit.php @@ -285,14 +285,14 @@ class Edit implements ControllerProviderInterface $newsubdef_reg = new \record_adapter($app, $reg_record->get_sbas_id(), $request->request->get('newrepresent')); - if ($newsubdef_reg->get_type() !== 'image') { - throw new \Exception('A reg image must come from image data'); - } - foreach ($newsubdef_reg->get_subdefs() as $name => $value) { if (!in_array($name, array('thumbnail', 'preview'))) { continue; } + if ($value->get_type() !== \media_subdef::TYPE_IMAGE) { + continue; + } + $media = $app['mediavorus']->guess($value->get_pathfile()); $reg_record->substitute_subdef($name, $media, $app); $app['phraseanet.logger']($reg_record->get_databox())->log( diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Push.php b/lib/Alchemy/Phrasea/Controller/Prod/Push.php index dff75932e9..77c2bcda54 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Push.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Push.php @@ -416,15 +416,18 @@ class Push implements ControllerProviderInterface $app['EM']->flush(); - $url = $app->url('lightbox_validation', array( - 'ssel_id' => $Basket->getId(), - 'LOG' => $app['tokens']->getUrlToken( + $arguments = array('ssel_id' => $Basket->getId()); + + if (!$app['phraseanet.registry']->get('GV_enable_push_authentication') || !$request->get('force_authentication')) { + $arguments['LOG'] = $app['tokens']->getUrlToken( \random::TYPE_VALIDATE, $participant_user->get_id(), null, $Basket->getId() - ) - )); + ); + } + + $url = $app->url('lightbox_validation', $arguments); $receipt = $request->get('recept') ? $app['authentication']->getUser()->get_email() : ''; diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Records.php b/lib/Alchemy/Phrasea/Controller/Prod/Records.php index 0fa37b5080..dd0cc71fed 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Records.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Records.php @@ -191,7 +191,7 @@ class Records implements ControllerProviderInterface 'record' => $record )), "pos" => $record->get_number(), - "title" => $record->get_title($query, $searchEngine) + "title" => str_replace(array('[[em]]', '[[/em]]'), array('', ''), $record->get_title($query, $searchEngine)) )); } diff --git a/lib/Alchemy/Phrasea/Media/Subdef/Image.php b/lib/Alchemy/Phrasea/Media/Subdef/Image.php index 17c03951a1..58d81a630f 100644 --- a/lib/Alchemy/Phrasea/Media/Subdef/Image.php +++ b/lib/Alchemy/Phrasea/Media/Subdef/Image.php @@ -25,6 +25,7 @@ class Image extends Provider const OPTION_RESOLUTION = 'resolution'; const OPTION_STRIP = 'strip'; const OPTION_QUALITY = 'quality'; + const OPTION_FLATTEN = 'flatten'; protected $options = array(); @@ -33,6 +34,7 @@ class Image extends Provider $this->registerOption(new OptionType\Range(_('Dimension'), self::OPTION_SIZE, 20, 3000, 800)); $this->registerOption(new OptionType\Range(_('Resolution'), self::OPTION_RESOLUTION, 50, 300, 72)); $this->registerOption(new OptionType\Boolean(_('Remove ICC Profile'), self::OPTION_STRIP, false)); + $this->registerOption(new OptionType\Boolean(_('Flatten layers'), self::OPTION_FLATTEN, false)); $this->registerOption(new OptionType\Range(_('Quality'), self::OPTION_QUALITY, 0, 100, 75)); } @@ -59,6 +61,7 @@ class Image extends Provider $this->spec->setDimensions($size, $size); $this->spec->setQuality($this->getOption(self::OPTION_QUALITY)->getValue()); $this->spec->setStrip($this->getOption(self::OPTION_STRIP)->getValue()); + $this->spec->setFlatten($this->getOption(self::OPTION_FLATTEN)->getValue()); $this->spec->setResolution($resolution, $resolution); return $this->spec; diff --git a/lib/classes/databox/subdef.php b/lib/classes/databox/subdef.php index 1aba8d1623..04daf18695 100644 --- a/lib/classes/databox/subdef.php +++ b/lib/classes/databox/subdef.php @@ -305,6 +305,9 @@ class databox_subdef if ($sd->dpi) { $image->setOptionValue(Image::OPTION_RESOLUTION, (int) $sd->dpi); } + if ($sd->flatten) { + $image->setOptionValue(Image::OPTION_FLATTEN, p4field::isyes($sd->flatten)); + } return $image; } diff --git a/locale/en_GB/LC_MESSAGES/phraseanet.mo b/locale/en_GB/LC_MESSAGES/phraseanet.mo index f06e8df489..4fd32e34b2 100644 Binary files a/locale/en_GB/LC_MESSAGES/phraseanet.mo and b/locale/en_GB/LC_MESSAGES/phraseanet.mo differ diff --git a/locale/en_GB/LC_MESSAGES/phraseanet.po b/locale/en_GB/LC_MESSAGES/phraseanet.po index c81789bdaf..28585e73cf 100644 --- a/locale/en_GB/LC_MESSAGES/phraseanet.po +++ b/locale/en_GB/LC_MESSAGES/phraseanet.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-11-14 14:10+0100\n" -"PO-Revision-Date: 2014-06-25 12:08+0100\n" +"PO-Revision-Date: 2014-07-07 15:36+0100\n" "Last-Translator: Anthony \n" "Language-Team: \n" "Language: en_GB\n" @@ -16,7 +16,7 @@ msgstr "" "X-Poedit-SourceCharset: utf-8\n" "X-Poedit-Basepath: /Users/romain/Documents/workspace/Phraseanet\n" "X-Poedit-KeywordsList: _e;__\n" -"X-POOTLE-MTIME: 1401802195.000000\n" +"X-POOTLE-MTIME: 1404404647.000000\n" "X-Poedit-SearchPath-0: config\n" "X-Poedit-SearchPath-1: lib/classes\n" "X-Poedit-SearchPath-2: lib/conf.d\n" @@ -5624,7 +5624,7 @@ msgstr "Records statut" #: tmp/cache_twig/74/3d/4b2851d1f18c8ae4b91891284ae6d293c84c4718d08f94fe9a506e8ba6d7.php:45 msgid "Records type" -msgstr "Records type" +msgstr "Type of documents" #: tmp/cache_twig/74/3d/4b2851d1f18c8ae4b91891284ae6d293c84c4718d08f94fe9a506e8ba6d7.php:57 msgid "You have selected one record." @@ -11331,9 +11331,7 @@ msgstr "Enable the force authentication option for Push and Feedbacks sessions" msgid "" "Adds an option to the push form submission to restrict push recipient(s) to " "Phraseanet users only." -msgstr "" -"Adds an option for Push and Feedbacks submission forms to limit recipients " -"to trusted Phraseanet users only." +msgstr "Force authentication for Push and Feedbacks recipients." #: ../lib/classes/task/period/apiwebhooks.php:18 msgid "Api Webhook" @@ -11501,9 +11499,6 @@ msgstr "Unable to create template, its given name is already used." msgid "Unable to create the user." msgstr "Unable to create the user." -msgid "Set force authentication option to see push content as mandatory" -msgstr "Set 'force authentication option' for push as mandatory" - #~ msgid "Enable H264 stream mode" #~ msgstr "Enable H264 stream mode" diff --git a/locale/fr_FR/LC_MESSAGES/phraseanet.mo b/locale/fr_FR/LC_MESSAGES/phraseanet.mo index c377564d9f..3258755dd1 100644 Binary files a/locale/fr_FR/LC_MESSAGES/phraseanet.mo and b/locale/fr_FR/LC_MESSAGES/phraseanet.mo differ diff --git a/locale/fr_FR/LC_MESSAGES/phraseanet.po b/locale/fr_FR/LC_MESSAGES/phraseanet.po index 5b181475f7..50fc5c1acc 100644 --- a/locale/fr_FR/LC_MESSAGES/phraseanet.po +++ b/locale/fr_FR/LC_MESSAGES/phraseanet.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2013-11-14 14:10+0100\n" -"PO-Revision-Date: 2014-06-25 12:07+0100\n" +"PO-Revision-Date: 2014-07-07 15:36+0100\n" "Last-Translator: Anthony \n" "Language-Team: \n" "Language: fr_FR\n" @@ -16,7 +16,7 @@ msgstr "" "X-Poedit-SourceCharset: utf-8\n" "X-Poedit-Basepath: /Users/romain/Documents/workspace/Phraseanet\n" "X-Poedit-KeywordsList: _e;__\n" -"X-POOTLE-MTIME: 1401802000.000000\n" +"X-POOTLE-MTIME: 1404404560.000000\n" "X-Poedit-SearchPath-0: config\n" "X-Poedit-SearchPath-1: lib/classes\n" "X-Poedit-SearchPath-2: lib/conf.d\n" @@ -5678,7 +5678,7 @@ msgstr "Statut des enregistrements" #: tmp/cache_twig/74/3d/4b2851d1f18c8ae4b91891284ae6d293c84c4718d08f94fe9a506e8ba6d7.php:45 msgid "Records type" -msgstr "Type des enregistrements" +msgstr "Type des documents" #: tmp/cache_twig/74/3d/4b2851d1f18c8ae4b91891284ae6d293c84c4718d08f94fe9a506e8ba6d7.php:57 msgid "You have selected one record." @@ -8797,7 +8797,7 @@ msgstr "Message automatique de Phraseanet" #: tmp/cache_twig/e9/1a/9e2396dbfd0df38fa3c35df138bcc0606bacbbd117d37b40fb246fa6aaf6.php:228 msgid "Pour gérer l'envoi d'email automatique, connectez-vous à %link%" msgstr "" -"Pour régler les préférences de reception d'e-mails automatiques, connectez-" +"Pour régler les préférences de réception d'e-mails automatiques, connectez-" "vous à %link%." #: tmp/cache_twig/e9/49/406e6d61efed296d58e5356a77a622909c068b709020709aa697c9fd4c69.php:59 @@ -11508,8 +11508,8 @@ msgid "" "Adds an option to the push form submission to restrict push recipient(s) to " "Phraseanet users only." msgstr "" -"Ajoute une option permettant de limiter la diffusion des Push et Validations " -"auprès d'utilisateurs Phraseanet dans les formulaires d'envoi." +"Force les utilisateurs destinataires d'un Push et d'une validation à " +"s'authentifier." #: ../lib/classes/task/period/apiwebhooks.php:18 msgid "Api Webhook" @@ -11678,9 +11678,6 @@ msgstr "Impossible le créer ce modèle, le nom donné est déjà utilisé." msgid "Unable to create the user." msgstr "Impossible de créer cet utilisateur." -msgid "Set force authentication option to see push content as mandatory" -msgstr "Rendre obligatoire l'option d'authentification forcée" - #~ msgid "Enable H264 stream mode" #~ msgstr "Activer H264 en mode flux continu (lecture en streaming)" diff --git a/templates/web/prod/WorkZone/Macros.html.twig b/templates/web/prod/WorkZone/Macros.html.twig index 33a231dc53..d428aa3ecf 100644 --- a/templates/web/prod/WorkZone/Macros.html.twig +++ b/templates/web/prod/WorkZone/Macros.html.twig @@ -7,10 +7,7 @@
{% set content = WorkZone.getContent(srt) %} - {% for basket in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::VALIDATIONS')) %} - -
{% trans 'action::exporter' %}
- + {% if app['authentication'].getUser().ACL().has_right('modifyrecord') %} + + {% endif %}
Lightbox @@ -75,17 +74,10 @@
-
- -
- +
{% endfor %} - - {% for basket in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::BASKETS')) %} - -
- -
- +
{% endfor %} {% for story in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::STORIES')) %} - -
{% trans 'action::exporter' %}
+ {% if app['authentication'].getUser().ACL().has_right('modifyrecord') %} - + {% endif %} -
- -
- - - - +
{% endfor %} - {% endmacro %} diff --git a/www/skins/report/report.js b/www/skins/report/report.js index c7e94df4e9..640ebe37f9 100644 --- a/www/skins/report/report.js +++ b/www/skins/report/report.js @@ -184,7 +184,7 @@ function submiterAction(domSubmiter) { request = $.ajax({ type: "POST", - url: "/index_dev.php/report/init", + url: "/report/init", data: data, beforeSend: function () { container.find('.content').empty();