PHRAS-3022 Prod editing #comment Clean PR with translation

This commit is contained in:
Harrys Ravalomanana
2020-04-14 20:37:59 +04:00
parent 024b750539
commit 27fc361342
13 changed files with 2127 additions and 2066 deletions

View File

@@ -47,7 +47,9 @@ class RecordsRequest extends ArrayCollection
$this->received = $received;
$this->rejected = $rejected;
$this->basket = $basket;
$this->isSingleStory = ($flatten !== self::FLATTEN_YES && count($this) === 1 && $this->first()->isStory());
// since stories are already flattened by "fromRequest" (to apply rights on children),
// flagging "isSingleStory" is a bit more difficult than checking the first item...
// $this->isSingleStory = ($flatten !== self::FLATTEN_YES && count($this) === 1 && $this->first()->isStory());
if ($flatten !== self::FLATTEN_NO) {
$to_remove = [];
@@ -74,11 +76,39 @@ class RecordsRequest extends ArrayCollection
}
}
// We check that the list contains only one story, and that every other items (records) are children of this story
// Too bad : there is no "isChildOf" method :(
$rec = [];
$children = [];
$this->isSingleStory = false;
$i = 0;
$records = $this->toArray();
array_walk($records, function (\record_adapter $record) use (&$i) {
foreach ($this as $key => $record) {
if($record->isStory()) {
if($this->isSingleStory) {
// we already found a story, we cannot have 2, game over
$this->isSingleStory = false;
break;
}
$this->isSingleStory = true;
foreach ($record->getChildren() as $child) {
$children[$child->getId()] = 1; // to later find by key
}
}
else {
$rec[] = $record->getId();
}
$record->setNumber($i++);
});
}
if($this->isSingleStory) {
foreach ($rec as $rid) {
if(!array_key_exists($rid, $children)) {
// one record is not a child, game over
$this->isSingleStory = false;
break;
}
}
}
}
/**

View File

@@ -65,7 +65,7 @@
"normalize-css": "^2.1.0",
"npm": "^6.0.0",
"npm-modernizr": "^2.8.3",
"phraseanet-production-client": "0.34.171-d",
"phraseanet-production-client": "0.34.172-d",
"requirejs": "^2.3.5",
"tinymce": "^4.0.28",
"underscore": "^1.8.3",

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2020-04-10T07:24:22Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<file date="2020-04-14T16:33:28Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
@@ -10,8 +10,8 @@
<source>Please provide the same passwords.</source>
<target state="translated">Bitte geben Sie diesselbe Passwörter ein.</target>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
</trans-unit>
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">
<source>The token provided is not valid anymore</source>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2020-04-10T07:24:44Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<file date="2020-04-14T16:33:52Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
@@ -10,8 +10,8 @@
<source>Please provide the same passwords.</source>
<target state="translated">Please provide the same passwords.</target>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
</trans-unit>
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">
<source>The token provided is not valid anymore</source>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2020-04-10T07:25:09Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<file date="2020-04-14T16:34:20Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
@@ -10,8 +10,8 @@
<source>Please provide the same passwords.</source>
<target state="translated">Veuillez indiquer des mots de passe identiques.</target>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
</trans-unit>
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore" approved="yes">
<source>The token provided is not valid anymore</source>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2020-04-10T07:25:36Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<file date="2020-04-14T16:34:50Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/>
<note>The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message.</note>
@@ -10,8 +10,8 @@
<source>Please provide the same passwords.</source>
<target state="new">Please provide the same passwords.</target>
<jms:reference-file line="44">Form/Login/PhraseaRecoverPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
<jms:reference-file line="36">Form/Login/PhraseaRenewPasswordForm.php</jms:reference-file>
<jms:reference-file line="49">Form/Login/PhraseaRegisterForm.php</jms:reference-file>
</trans-unit>
<trans-unit id="90b8c9717bb7ed061dbf20fe1986c8b8593d43d4" resname="The token provided is not valid anymore">
<source>The token provided is not valid anymore</source>

View File

@@ -64,10 +64,10 @@ class WebhookEvent extends \Alchemy\Phrasea\Model\Entities\WebhookEvent implemen
public function __sleep()
{
if ($this->__isInitialized__) {
return ['__isInitialized__', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'id', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'name', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'type', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'data', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'processed', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'created'];
return ['__isInitialized__', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'id', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'name', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'type', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'data', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'processed', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'created', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'collectionBaseIds'];
}
return ['__isInitialized__', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'id', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'name', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'type', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'data', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'processed', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'created'];
return ['__isInitialized__', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'id', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'name', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'type', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'data', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'processed', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'created', '' . "\0" . 'Alchemy\\Phrasea\\Model\\Entities\\WebhookEvent' . "\0" . 'collectionBaseIds'];
}
/**
@@ -298,4 +298,26 @@ class WebhookEvent extends \Alchemy\Phrasea\Model\Entities\WebhookEvent implemen
return parent::setType($type);
}
/**
* {@inheritDoc}
*/
public function setCollectionBaseIds(array $collectionBaseIds)
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'setCollectionBaseIds', [$collectionBaseIds]);
return parent::setCollectionBaseIds($collectionBaseIds);
}
/**
* {@inheritDoc}
*/
public function getCollectionBaseIds()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getCollectionBaseIds', []);
return parent::getCollectionBaseIds();
}
}

View File

@@ -138,13 +138,19 @@
</div>
<div id="EDIT_TOP" style="height:{{editing_top_box_height}}%; min-height: {{ editing_top_box_height }}">
<div id="EDIT_MENU">
<i class="fa fa-image fa-stack-1x zoom-menu-icon zoom-menu-left" aria-hidden="true"></i>
<div id="EDIT_ZOOMSLIDER" >
</div>
<i class="fa fa-image fa-stack-1x zoom-menu-icon zoom-menu-right" aria-hidden="true" style="left: 98%;top: 4px"></i>
</div>
{% if recordsRequest.isSingleStory() %}
<div class="GRP_IMAGE_REP">
<div id="EDIT_GRPDIAPO">
{{_self.format_diapo(recordsRequest.singleStory(), false)}}
<div class="story-select-all-block">
<input class="styled-checkbox" id="select-all-diapo" type="checkbox" value="" checked="" >
<label for="select-all-diapo">{{ 'prod::edit:story select all' | trans }}</label>
</div>
</div>
</div>
<div id="EDIT_FILM2" style="left:170px;">
@@ -415,7 +421,6 @@
</div>
<input type="hidden" id="dialog-edit-yes" value="{{ 'prod::edit:confirm: Yes' | trans }}" />
<input type="hidden" id="dialog-edit-no" value="{{ 'prod::edit:confirm: No' | trans }}" />
<input type="hidden" id="dialog-edit-cancel" value="{{ 'prod::edit:confirm: Cancel' | trans }}" />
<script type="text/javascript">
{% if multipleDataboxes == 1 %}

View File

@@ -5305,10 +5305,14 @@ jquery-simplecolorpicker@^0.3.1:
resolved "https://registry.yarnpkg.com/jquery-simplecolorpicker/-/jquery-simplecolorpicker-0.3.1.tgz#4f6befd380ab05470f585d5482e5180556e460eb"
integrity sha1-T2vv04CrBUcPWF1UguUYBVbkYOs=
"jquery-treeview@git+https://github.com/alchemy-fr/jquery-treeview.git", "jquery-treeview@git+https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e":
"jquery-treeview@git+https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e":
version "1.4.2"
resolved "git+https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e"
"jquery-treeview@https://github.com/alchemy-fr/jquery-treeview.git":
version "1.4.2"
uid "1e9e5a49d2875b878801e904cd08c2d25e85af1e"
resolved "git+https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e"
resolved "https://github.com/alchemy-fr/jquery-treeview.git#1e9e5a49d2875b878801e904cd08c2d25e85af1e"
jquery-ui-datepicker-with-i18n@^1.10.4:
version "1.10.4"
@@ -7577,10 +7581,10 @@ phraseanet-common@^0.4.5-d:
js-cookie "^2.1.0"
pym.js "^1.3.1"
phraseanet-production-client@0.34.171-d:
version "0.34.171-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.171-d.tgz#d217328afe93648b2984de2a6225d6abad4f0324"
integrity sha512-tgqGzeOZrI/4DuNoQOWteN63bdqm+ihdlFsB/ZwILAGJ5ECnX4kxZ1872SjlwVOKzPPlWsNn3KjUFnoVLrUE+g==
phraseanet-production-client@0.34.172-d:
version "0.34.172-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.172-d.tgz#b83b1fdd1f94bf867cc2fba7712666ed36412026"
integrity sha512-B16poOa4nE0Bwb8HwZNlV4O6QvK9mFb6FBStLGmH+26oCEys2eKKGZzBKLwJP5Rnp+o9ajeCNng/Gen/+vX01A==
dependencies:
"@mapbox/mapbox-gl-language" "^0.9.2"
"@turf/turf" "^5.1.6"