Merge branch 'master' into PHRDPL-86_xdebug

This commit is contained in:
jygaulier
2020-01-30 12:01:00 +01:00
committed by GitHub
16 changed files with 2891 additions and 2621 deletions

View File

@@ -21,6 +21,7 @@ class PDF
protected $pdf; protected $pdf;
const LAYOUT_FEEDBACK = 'feedback'; const LAYOUT_FEEDBACK = 'feedback';
const LAYOUT_FEEDBACKONLY = 'feedbackOnly';
const LAYOUT_PREVIEW = 'preview'; const LAYOUT_PREVIEW = 'preview';
const LAYOUT_PREVIEWCAPTION = 'previewCaption'; const LAYOUT_PREVIEWCAPTION = 'previewCaption';
const LAYOUT_PREVIEWCAPTIONTDM = 'previewCaptionTdm'; const LAYOUT_PREVIEWCAPTIONTDM = 'previewCaptionTdm';

View File

@@ -15,6 +15,7 @@ use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Out\Tool\PhraseaPDF; use Alchemy\Phrasea\Out\Tool\PhraseaPDF;
use Alchemy\Phrasea\Helper\Record\Printer; use Alchemy\Phrasea\Helper\Record\Printer;
use Alchemy\Phrasea\Model\Entities\ValidationParticipant; use Alchemy\Phrasea\Model\Entities\ValidationParticipant;
use \IntlDateFormatter as DateFormatter;
class PDFRecords extends PDF class PDFRecords extends PDF
{ {
@@ -36,6 +37,7 @@ class PDFRecords extends PDF
throw new \Exception('Unknown layout'); throw new \Exception('Unknown layout');
break; break;
case self::LAYOUT_FEEDBACK: case self::LAYOUT_FEEDBACK:
case self::LAYOUT_FEEDBACKONLY:
case self::LAYOUT_PREVIEW: case self::LAYOUT_PREVIEW:
case self::LAYOUT_PREVIEWCAPTION: case self::LAYOUT_PREVIEWCAPTION:
case self::LAYOUT_PREVIEWCAPTIONTDM: case self::LAYOUT_PREVIEWCAPTIONTDM:
@@ -87,6 +89,9 @@ class PDFRecords extends PDF
case self::LAYOUT_FEEDBACK: case self::LAYOUT_FEEDBACK:
$this->print_preview(false, true, true); $this->print_preview(false, true, true);
break; break;
case self::LAYOUT_FEEDBACKONLY:
$this->print_preview(false, false, true);
break;
case self::LAYOUT_PREVIEW: case self::LAYOUT_PREVIEW:
$this->print_preview(false, false, false); $this->print_preview(false, false, false);
break; break;
@@ -349,18 +354,20 @@ class PDFRecords extends PDF
$this->pdf->SetY($y + 2); $this->pdf->SetY($y + 2);
foreach ($rec->get_caption()->get_fields() as $field) { foreach ($rec->get_caption()->get_fields() as $field) {
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); if ($field->get_databox_field()->get_gui_visible()) {
$this->pdf->Write(5, $field->get_name() . " : "); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $field->get_name() . " : ");
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12); $this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$t = str_replace( $t = str_replace(
["<", ">", "&"] ["<", ">", "&"]
, ["<", ">", "&"] , ["<", ">", "&"]
, strip_tags($field->get_serialized_values()) , strip_tags($field->get_serialized_values())
); );
$this->pdf->Write(5, $t); $this->pdf->Write(5, $t);
$this->pdf->Write(6, "\n"); $this->pdf->Write(6, "\n");
}
} }
$this->pdf->SetY($this->pdf->GetY() + 10); $this->pdf->SetY($this->pdf->GetY() + 10);
} }
@@ -389,38 +396,38 @@ class PDFRecords extends PDF
$this->pdf->SetY($this->pdf->GetY()+10); $this->pdf->SetY($this->pdf->GetY()+10);
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: Document generated on : ")); $this->pdf->Write(5, $this->app->trans("print_feedback:: Document generated on : " . " "));
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12); $this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $this->app['date-formatter']->getDate(new \DateTime('now'))); $this->pdf->Write(5, $this->formatDate(new \DateTime('now')));
$this->pdf->Write(12, "\n"); $this->pdf->Write(12, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback initiated by : ")); $this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback initiated by : " . " "));
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12); $this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $validation->getInitiator()->getLogin()); $this->pdf->Write(5, $this->getDisplayName($validation->getInitiator()));
$this->pdf->Write(6, "\n"); $this->pdf->Write(6, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback initiated on : ")); $this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback initiated on : " . " "));
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12); $this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $this->app['date-formatter']->getDate($validation->getCreated())); $this->pdf->Write(5, $this->formatDate($validation->getCreated()));
$this->pdf->Write(6, "\n"); $this->pdf->Write(6, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback expiring on : ")); $this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback expiring on : " . " "));
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12); $this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $this->app['date-formatter']->getDate($validation->getExpires())); $this->pdf->Write(5, $this->formatDate($validation->getExpires()));
$this->pdf->Write(12, "\n"); $this->pdf->Write(12, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback " . ($validation->isFinished() ? "expired" : "active"))); $validation->isFinished() ? $this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback expired")) : $this->pdf->Write(5, $this->app->trans("print_feedback:: Feedback active"));
$this->pdf->Write(12, "\n"); $this->pdf->Write(12, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: Participants : ")); $this->pdf->Write(5, $this->app->trans("print_feedback:: Participants : "));
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12); $this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
foreach ($validation->getParticipants() as $participant) { foreach ($validation->getParticipants() as $participant) {
$this->pdf->Write(5, "\n - " . $participant->getUser()->getLogin()); $this->pdf->Write(5, "\n - " . $this->getDisplayName($participant->getUser()));
} }
} }
} }
@@ -488,7 +495,7 @@ class PDFRecords extends PDF
$ord = $basket->getElementByRecord($this->app, $rec)->getOrd(); $ord = $basket->getElementByRecord($this->app, $rec)->getOrd();
$this->pdf->SetY($y); $this->pdf->SetY($y);
$this->pdf->SetX(10); $this->pdf->SetX(10);
$this->pdf->Cell(190, $h, '#' . $ord, "", 1, "C", 0); $this->pdf->Cell(190, $h, $ord, "", 1, "C", 0);
} }
if ($LEFT__TEXT == "" && is_file($LEFT__IMG)) { if ($LEFT__TEXT == "" && is_file($LEFT__IMG)) {
@@ -586,37 +593,44 @@ class PDFRecords extends PDF
} }
$this->pdf->SetXY($lmargin, $y += ( $finalHeight + 5)); $this->pdf->SetXY($lmargin, $y += ( $finalHeight + 5));
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: record title: ") . " ");
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $rec->get_title());
$this->pdf->Write(6, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: record id: ") . " ");
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $rec->getRecordId());
$this->pdf->Write(6, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: base name: ") . " ");
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $rec->getDatabox()->get_label($this->app['locale']));
$this->pdf->Write(6, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: originale filename: ") . " ");
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $rec->get_original_name());
$this->pdf->Write(6, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: document Uuid: ") . " ");
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$this->pdf->Write(5, $rec->getUUID());
$this->pdf->Write(6, "\n");
$nf = 0; $nf = 0;
if ($write_caption) {
foreach ($rec->get_caption()->get_fields() as $field) {
/* @var $field caption_field */
if ($nf > 0) {
$this->pdf->Write(6, "\n");
}
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $field->get_name() . " : ");
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$t = str_replace(
["&lt;", "&gt;", "&amp;"]
, ["<", ">", "&"]
, strip_tags($field->get_serialized_values())
);
$this->pdf->Write(5, $t);
$nf++;
}
}
if($basket && $validation) { if($basket && $validation) {
/** @var ValidationParticipant $participant */ /** @var ValidationParticipant $participant */
if ($nf > 0) { if ($nf > 0) {
$this->pdf->Write(6, "\n"); $this->pdf->Write(6, "\n");
} }
$this->pdf->Write(12, "\n");
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12); $this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $this->app->trans("print_feedback:: Votes :")); $this->pdf->Write(5, $this->app->trans("print_feedback:: Votes :"));
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12); $this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
@@ -631,7 +645,7 @@ class PDFRecords extends PDF
} }
$validationData = $basketElement->getUserValidationDatas($participant->getUser()); $validationData = $basketElement->getUserValidationDatas($participant->getUser());
$this->pdf->Write(5, '- ' . $participant->getUser()->getLogin() . " : "); $this->pdf->Write(5, '- ' . $this->getDisplayName($participant->getUser(), true). " : ");
$r = $validationData->getAgreement(); $r = $validationData->getAgreement();
$this->pdf->SetX(100); $this->pdf->SetX(100);
@@ -648,7 +662,7 @@ class PDFRecords extends PDF
$this->pdf->Write(0, $this->app->trans("print_feedback:: Non")); $this->pdf->Write(0, $this->app->trans("print_feedback:: Non"));
} }
$this->pdf->SetTextColor(0); $this->pdf->SetTextColor(0);
$this->pdf->Write(0, " (" . $this->app['date-formatter']->getDate($validationData->getUpdated()) . ")"); $this->pdf->Write(0, " (" . $this->formatDate($validationData->getUpdated()) . ")");
} }
if (($note = (string)($validationData->getNote())) !== '') { if (($note = (string)($validationData->getNote())) !== '') {
@@ -662,14 +676,114 @@ class PDFRecords extends PDF
$nf++; $nf++;
} }
} }
if ($write_caption) {
$this->pdf->Write(12, "\n");
foreach ($rec->get_caption()->get_fields() as $field) {
/* @var $field caption_field */
if ($field->get_databox_field()->get_gui_visible()) {
if ($nf > 0) {
$this->pdf->Write(6, "\n");
}
$this->pdf->SetFont(PhraseaPDF::FONT, 'B', 12);
$this->pdf->Write(5, $field->get_name() . " : ");
$this->pdf->SetFont(PhraseaPDF::FONT, '', 12);
$t = str_replace(
["&lt;", "&gt;", "&amp;"]
, ["<", ">", "&"]
, strip_tags($field->get_serialized_values())
);
$this->pdf->Write(5, $t);
$nf++;
}
}
}
} }
return; return;
} }
private function formatDate(DateTime $d) private function formatDate(\DateTime $date)
{ {
// todo $locale = $this->app['locale'];
switch ($locale) {
case 'fr':
$fmt = new DateFormatter(
'fr_FR',
DateFormatter::LONG,
DateFormatter::NONE
);
$date_formated = $fmt->format($date);
break;
case 'en':
$fmt = new DateFormatter(
'en_EN',
DateFormatter::LONG,
DateFormatter::NONE
);
$date_formated = $fmt->format($date);
break;
case 'de':
$fmt = new DateFormatter(
'de_DE',
DateFormatter::LONG,
DateFormatter::NONE
);
$date_formated = $fmt->format($date);
break;
default:
$fmt = new DateFormatter(
'en_EN',
DateFormatter::LONG,
DateFormatter::NONE ,
null,
null,
'yyyy/mm/dd'
);
$date_formated = $fmt->format($date);
break;
}
return $date_formated;
}
private function getDisplayName($user, $short = false)
{
$displayName = '';
if (trim($user->getLastName()) !== '' || trim($user->getFirstName()) !== '') {
$displayName = $user->getFirstName() . ('' !== $user->getFirstName() && '' !== $user->getLastName() ? ' ' : '') . $user->getLastName() ;
if ($short) {
return $displayName;
}
}
$email = trim($user->getEmail());
if ($email === '') {
$email = $user->getLogin();
}
if ($displayName !== '') {
return $displayName . ", " . $email;
} else {
return $email;
}
} }
} }

View File

@@ -65,7 +65,7 @@
"normalize-css": "^2.1.0", "normalize-css": "^2.1.0",
"npm": "^6.0.0", "npm": "^6.0.0",
"npm-modernizr": "^2.8.3", "npm-modernizr": "^2.8.3",
"phraseanet-production-client": "0.34.106-d", "phraseanet-production-client": "0.34.116-d",
"requirejs": "^2.3.5", "requirejs": "^2.3.5",
"tinymce": "^4.0.28", "tinymce": "^4.0.28",
"underscore": "^1.8.3", "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"?> <?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"> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2020-01-15T09:38:21Z" source-language="en" target-language="de" datatype="plaintext" original="not.available"> <file date="2020-01-29T14:29:07Z" source-language="en" target-language="de" datatype="plaintext" original="not.available">
<header> <header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/> <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> <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>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2020-01-15T09:38:50Z" source-language="en" target-language="en" datatype="plaintext" original="not.available"> <file date="2020-01-29T14:29:20Z" source-language="en" target-language="en" datatype="plaintext" original="not.available">
<header> <header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/> <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> <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>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2020-01-15T09:39:45Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available"> <file date="2020-01-29T14:29:36Z" source-language="en" target-language="fr" datatype="plaintext" original="not.available">
<header> <header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/> <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> <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>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?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"> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:jms="urn:jms:translation" version="1.2">
<file date="2020-01-15T09:40:44Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available"> <file date="2020-01-29T14:29:56Z" source-language="en" target-language="nl" datatype="plaintext" original="not.available">
<header> <header>
<tool tool-id="JMSTranslationBundle" tool-name="JMSTranslationBundle" tool-version="1.1.0-DEV"/> <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> <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>

View File

@@ -15,7 +15,11 @@
{% set previewHtml5 = null %} {% set previewHtml5 = null %}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_access_to_subdef(record, 'preview') and record.has_preview == true %} {# first check if type audio and there is no preview , fallback to thumbnail #}
{% if app.getAclForUser(app.getAuthenticatedUser()).has_access_to_subdef(record, 'preview') and record.getType == 'audio' and record.has_preview == false %}
{% set preview_obj = record.get_thumbnail() %}
{% elseif app.getAclForUser(app.getAuthenticatedUser()).has_access_to_subdef(record, 'preview') %}
{% set preview_obj = record.get_preview() %} {% set preview_obj = record.get_preview() %}
{% else %} {% else %}
{% set preview_obj = record.get_thumbnail() %} {% set preview_obj = record.get_thumbnail() %}

View File

@@ -41,7 +41,7 @@
<div style='position:absolute; top:0px; left:0px; height:20px'> <div style='position:absolute; top:0px; left:0px; height:20px'>
<img class="require_alert" src="/assets/common/images/icons/alert.png" style="display:none;cursor:help;" title="{{ 'edit::Certains champs doivent etre remplis pour valider cet editing' | trans }}"> <img class="require_alert" src="/assets/common/images/icons/alert.png" style="display:none;cursor:help;" title="{{ 'edit::Certains champs doivent etre remplis pour valider cet editing' | trans }}">
</div> </div>
<div style='position:absolute; bottom:0px; left:0px; height:20px' class="bottom actions"> <div style='position:absolute; bottom:7px; left:8px; height:20px' class="bottom actions">
<span class="fa-stack previewTips" <span class="fa-stack previewTips"
tooltipsrc="{{ path('prod_tooltip_preview', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id() }) }}"> tooltipsrc="{{ path('prod_tooltip_preview', { 'sbas_id' : record.get_sbas_id(), 'record_id' : record.get_record_id() }) }}">
@@ -73,9 +73,9 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="editDiaButtons" style="position:absolute; bottom:0px; right:0px; width:30px; height:12px; display:none"> <div class="editDiaButtons" style="position:absolute; bottom:8px; right:3px; width:30px; display:none">
<img id="idEditDiaButtonsP_{{i}}" style="cursor:pointer" src="/assets/common/images/icons/plus11.png"/> <span id="idEditDiaButtonsP_{{i}}" style="cursor:pointer"><i class="fa fa-plus editIcon">&nbsp;</i></span>
<img id="idEditDiaButtonsM_{{i}}" style="cursor:pointer" src="/assets/common/images/icons/minus11.png"/> <span id="idEditDiaButtonsM_{{i}}" style="cursor:pointer"><i class="fa fa-minus editIcon">&nbsp;</i></span>
</div> </div>
</div> </div>
{% endmacro %} {% endmacro %}
@@ -198,7 +198,7 @@
</div> </div>
<div style="position:absolute; top:4px; width:60px; right:6px; height:24px;"> <div style="position:absolute; top:4px; width:60px; right:6px; height:24px;">
<button type="submit" class="submit-multivalued"> <button type="submit" class="submit-multivalued">
<img id="EditButAddMultiValued" style="cursor:pointer" src="/assets/common/images/icons/plus16.png" /> <i id="EditButAddMultiValued" class="icon-round-add_box-24px icomoon" style="font-size: 24px;color: grey;">&nbsp;</i>
</button> </button>
</div> </div>
</form> </form>
@@ -411,12 +411,32 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
{% if multipleDataboxes == 1 %}
$(function() {
$('#EDITWINDOW').hide();
// a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
$( "#dialog-edit-many-sbas:ui-dialog" ).dialog( "destroy" );
$( "#dialog-edit-many-sbas" ).dialog({
modal: true,
resizable:false,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
}
});
$('#dialog-edit-many-sbas').on('dialogclose', function(event) {
location.reload();
});
});
{% else %}
{% set notActionableMsg = '' %} {% set notActionableMsg = '' %}
{% if not_actionable > 1 %} {% if not_actionable > 1 %}
{% set notActionableMsg = 'prod::editing: %not_actionable% documents ne peuvent etre edites car vos droits sont induffisants' | trans({'%not_actionable%' : not_actionable}) %} {% set notActionableMsg = 'prod::editing: %not_actionable% documents ne peuvent etre edites car vos droits sont induffisants' | trans({'%not_actionable%' : not_actionable}) %}
{% elseif not_actionable == 1 %} {% elseif not_actionable == 1 %}
{% set notActionableMsg = 'prod::editing: 1 document ne peut etre edite car vos droits sont induffisants' | trans | e('js')%} {% set notActionableMsg = 'prod::editing: 1 document ne peut etre edite car vos droits sont induffisants' | trans | e('js')%}
{% endif %} {% endif %}
var recordEditorConfig = { var recordEditorConfig = {
hasMultipleDatabases: {% if multipleDataboxes or recordsRequest|length == 0 %}true{% else %}false{% endif %}, hasMultipleDatabases: {% if multipleDataboxes or recordsRequest|length == 0 %}true{% else %}false{% endif %},
databoxId: {{ databox.get_sbas_id }}, databoxId: {{ databox.get_sbas_id }},
@@ -477,4 +497,6 @@
{% endfor %} {% endfor %}
] ]
}; };
{% endif %}
</script> </script>

View File

@@ -6,10 +6,14 @@
<h4>{{ 'phraseanet:: basket feedback' | trans }}</h4> <h4>{{ 'phraseanet:: basket feedback' | trans }}</h4>
<input type="hidden" name="ssel" value="{{ basketFeedbackId }}" /> <input type="hidden" name="ssel" value="{{ basketFeedbackId }}" />
<div style="margin: 10px 0 20px 0; padding: 0 10px;"> <div style="margin: 10px 0 20px 0; padding: 0 10px;">
<label for="RADI_PRE_FBO" class="radio">
<input type="radio" name="lay" checked value="feedbackOnly" id="RADI_PRE_FBO" />
{{ 'print:: basket feedback only' | trans }}
</label>
<label for="RADI_PRE_BF" class="radio"> <label for="RADI_PRE_BF" class="radio">
<input type="radio" name="lay" value="feedback" id="RADI_PRE_BF" /> <input type="radio" name="lay" value="feedback" id="RADI_PRE_BF" />
{{ 'print:: basket feedback' | trans }} {{ 'print:: basket feedback' | trans }}
</label> </label>
</div> </div>
{% endif %} {% endif %}
@@ -43,7 +47,7 @@
{{ 'print:: liste d\'imagettes' | trans }} {{ 'print:: liste d\'imagettes' | trans }}
</label> </label>
<label for="RADI_PRE_THUMGRI" class="radio"> <label for="RADI_PRE_THUMGRI" class="radio">
<input type="radio" name="lay" checked value="thumbnailGrid" id="RADI_PRE_THUMGRI" /> <input type="radio" name="lay" {% if not basketFeedbackId %} checked {% endif %} value="thumbnailGrid" id="RADI_PRE_THUMGRI" />
{{ 'print:: planche contact (mosaique)' | trans }} {{ 'print:: planche contact (mosaique)' | trans }}
</label> </label>
</div> </div>
@@ -63,3 +67,12 @@
</div> </div>
</div> </div>
</form> </form>
<script type="text/javascript">
$(document).ready(function() {
var $form = $("form[name=formprintpage]");
$form.bind('submit', function(){
$("#DIALOG").dialog('destroy');
});
});
</script>

View File

@@ -150,6 +150,8 @@
<div class="control-group"> <div class="control-group">
<input id="PushSendFormName" placeholder="{% trans %}Name{% endtrans %}" type="text" name="name" <input id="PushSendFormName" placeholder="{% trans %}Name{% endtrans %}" type="text" name="name"
class="input-block-level"/> class="input-block-level"/>
<input id="feedbackTitle" type="hidden" value="{% trans %}prod::feedback:feedback_set_title{% endtrans %}" />
<input id="pushTitle" type="hidden" value="{% trans %}prod::push:push_set_title{% endtrans %}" />
</div> </div>
<div class="control-group"> <div class="control-group">
<textarea id="PushSendFormMessage" placeholder="{% trans %}Message{% endtrans %}" name="message" <textarea id="PushSendFormMessage" placeholder="{% trans %}Message{% endtrans %}" name="message"

View File

@@ -7577,10 +7577,10 @@ phraseanet-common@^0.4.5-d:
js-cookie "^2.1.0" js-cookie "^2.1.0"
pym.js "^1.3.1" pym.js "^1.3.1"
phraseanet-production-client@0.34.106-d: phraseanet-production-client@0.34.116-d:
version "0.34.106-d" version "0.34.116-d"
resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.106-d.tgz#020379df0fc6023eebd5e188c7047b2e83892070" resolved "https://registry.yarnpkg.com/phraseanet-production-client/-/phraseanet-production-client-0.34.116-d.tgz#74d2d3e14e68a66f3a64aeb1f857bad04a4491f0"
integrity sha512-Z8XPVe++0oQ6LYubGMHovOhJg1qbSPoCyAD0HMazmtg+TzklfNcvPmUKWxKev2mP9qMLwYr5h4ts7XueyangAQ== integrity sha512-x0IB2zQu0L+jQ/TXpHae8CPqCHsv9yanp254hAcnuwEQ88cig4oNU8JLKxPvwt0d3WUQ5J2S0BdshdbfpFxBbw==
dependencies: dependencies:
"@mapbox/mapbox-gl-language" "^0.9.2" "@mapbox/mapbox-gl-language" "^0.9.2"
"@turf/turf" "^5.1.6" "@turf/turf" "^5.1.6"