From d02f8f5a017d3853914d9931308dea0bafb677f2 Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Fri, 12 Jul 2019 18:06:01 +0400 Subject: [PATCH 1/8] PHRAS-2665 #comment Fix video tool ratio #time 8h --- cache/.gitkeep | 0 .../prod/actions/Tools/videoEditor.html.twig | 36 +++++++++++++++---- 2 files changed, 29 insertions(+), 7 deletions(-) delete mode 100644 cache/.gitkeep diff --git a/cache/.gitkeep b/cache/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/templates/web/prod/actions/Tools/videoEditor.html.twig b/templates/web/prod/actions/Tools/videoEditor.html.twig index df8f61332c..c4f45e1642 100644 --- a/templates/web/prod/actions/Tools/videoEditor.html.twig +++ b/templates/web/prod/actions/Tools/videoEditor.html.twig @@ -45,6 +45,8 @@ {% set dataH = constant('media_subdef::TC_DATA_HEIGHT') %} {% set technical_info = record.get_technical_infos %} + + {#Set the preview Ratio #} {% set width = technical_info[dataW].value %} {% set height = technical_info[dataH].value %} @@ -56,12 +58,32 @@ {% set ratio = '' %} {% endif %} - + {#Set the document Ratio #} + {% for subdef in outputFormats %} + + {% set width = subdef.get_width() %} + {% set height = subdef.get_height() %} + + {% if width and height %} + {% set rawRatio = (width / height)|number_format(3, '.') %} + {% set rawRatioLength = rawRatio|length %} + {% set docRatio = rawRatio|slice(0,rawRatioLength-1) %} + {% else %} + {% set docRatio = '' %} + {% endif %} + + + +
+ {% endfor %}
@@ -109,7 +131,7 @@ + class="alt_canvas" id="{{ subdef.get_name() }}" > {% endfor %} From b590ae1c8aa79eb111466aee9bfad360f34304b6 Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Mon, 15 Jul 2019 18:30:37 +0400 Subject: [PATCH 2/8] PHRAS-2665 --- .../prod/actions/Tools/videoEditor.html.twig | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/templates/web/prod/actions/Tools/videoEditor.html.twig b/templates/web/prod/actions/Tools/videoEditor.html.twig index c4f45e1642..150bc55767 100644 --- a/templates/web/prod/actions/Tools/videoEditor.html.twig +++ b/templates/web/prod/actions/Tools/videoEditor.html.twig @@ -71,18 +71,19 @@ {% else %} {% set docRatio = '' %} {% endif %} + {% if loop.index == 1 %} + - - -
+
+ {% endif %} {% endfor %} From 1ba27e55c7870af175a700a5fdbda4271aab6c3e Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Tue, 16 Jul 2019 14:07:41 +0400 Subject: [PATCH 3/8] PHRAS-2665 #time 3h --- .../prod/actions/Tools/videoEditor.html.twig | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/templates/web/prod/actions/Tools/videoEditor.html.twig b/templates/web/prod/actions/Tools/videoEditor.html.twig index 150bc55767..b0064cc978 100644 --- a/templates/web/prod/actions/Tools/videoEditor.html.twig +++ b/templates/web/prod/actions/Tools/videoEditor.html.twig @@ -49,6 +49,7 @@ {#Set the preview Ratio #} {% set width = technical_info[dataW].value %} {% set height = technical_info[dataH].value %} + {% set prevRatio = '' %} {% if width and height %} {% set rawRatio = (width / height)|number_format(3, '.') %} @@ -59,7 +60,7 @@ {% endif %} {#Set the document Ratio #} - {% for subdef in outputFormats %} + {% for subdef in previewHtml5 %} {% set width = subdef.get_width() %} {% set height = subdef.get_height() %} @@ -67,24 +68,21 @@ {% if width and height %} {% set rawRatio = (width / height)|number_format(3, '.') %} {% set rawRatioLength = rawRatio|length %} - {% set docRatio = rawRatio|slice(0,rawRatioLength-1) %} + {% if subdef.get_name()=='preview' %} + {% set prevRatio = rawRatio|slice(0,rawRatioLength-1) %} + {% endif %} {% else %} - {% set docRatio = '' %} + {% set prevRatio = '' %} {% endif %} - {% if loop.index == 1 %} - -
- {% endif %} {% endfor %} + +
From 954e04477d66569799bacd9963fd7df22441c604 Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Tue, 23 Jul 2019 11:27:11 +0400 Subject: [PATCH 4/8] PHRAS-2665 #comment fix code review #time 1h --- .../web/prod/actions/Tools/videoEditor.html.twig | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/templates/web/prod/actions/Tools/videoEditor.html.twig b/templates/web/prod/actions/Tools/videoEditor.html.twig index b0064cc978..d9a798291a 100644 --- a/templates/web/prod/actions/Tools/videoEditor.html.twig +++ b/templates/web/prod/actions/Tools/videoEditor.html.twig @@ -52,11 +52,7 @@ {% set prevRatio = '' %} {% if width and height %} - {% set rawRatio = (width / height)|number_format(3, '.') %} - {% set rawRatioLength = rawRatio|length %} - {% set ratio = rawRatio|slice(0,rawRatioLength-1) %} - {% else %} - {% set ratio = '' %} + {% set ratio = (width / height)|number_format(3, '.') %} {% endif %} {#Set the document Ratio #} @@ -66,13 +62,9 @@ {% set height = subdef.get_height() %} {% if width and height %} - {% set rawRatio = (width / height)|number_format(3, '.') %} - {% set rawRatioLength = rawRatio|length %} {% if subdef.get_name()=='preview' %} - {% set prevRatio = rawRatio|slice(0,rawRatioLength-1) %} + {% set prevRatio = (width / height)|number_format(3, '.') %} {% endif %} - {% else %} - {% set prevRatio = '' %} {% endif %} {% endfor %} From 86484c6580210073d8d53d58d839834f21d4e634 Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Tue, 23 Jul 2019 11:29:00 +0400 Subject: [PATCH 5/8] PHRAS-2665 --- templates/web/prod/actions/Tools/videoEditor.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/web/prod/actions/Tools/videoEditor.html.twig b/templates/web/prod/actions/Tools/videoEditor.html.twig index d9a798291a..6d10080cce 100644 --- a/templates/web/prod/actions/Tools/videoEditor.html.twig +++ b/templates/web/prod/actions/Tools/videoEditor.html.twig @@ -52,7 +52,7 @@ {% set prevRatio = '' %} {% if width and height %} - {% set ratio = (width / height)|number_format(3, '.') %} + {% set ratio = (width / height)|number_format(2, '.') %} {% endif %} {#Set the document Ratio #} @@ -63,7 +63,7 @@ {% if width and height %} {% if subdef.get_name()=='preview' %} - {% set prevRatio = (width / height)|number_format(3, '.') %} + {% set prevRatio = (width / height)|number_format(2, '.') %} {% endif %} {% endif %} From 714918f148687f14fa472dbc7bfd775e817662b3 Mon Sep 17 00:00:00 2001 From: jygaulier Date: Tue, 23 Jul 2019 16:58:50 +0200 Subject: [PATCH 6/8] Restore xdebug provisioning restore roles xdebug & nginx --- resources/ansible/playbook-boxes.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/ansible/playbook-boxes.yml b/resources/ansible/playbook-boxes.yml index 704c5b96ec..370b427481 100644 --- a/resources/ansible/playbook-boxes.yml +++ b/resources/ansible/playbook-boxes.yml @@ -7,12 +7,12 @@ # - server # - repositories # - vagrant_local -# - nginx + - nginx # - mariadb # - elasticsearch # - rabbitmq # - php -# - xdebug + - xdebug # - composer # - mailcatcher # - node From 2180332414e3312330ec7d56682985670c752a71 Mon Sep 17 00:00:00 2001 From: jygaulier Date: Mon, 29 Jul 2019 13:37:53 +0200 Subject: [PATCH 7/8] fix mailcatcher version current version of mailcatcher wants ruby 2, downgrade to a version ok with ruby 1.9 --- resources/ansible/roles/mailcatcher/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/ansible/roles/mailcatcher/tasks/main.yml b/resources/ansible/roles/mailcatcher/tasks/main.yml index 7d1ca213ea..45a377ebe8 100644 --- a/resources/ansible/roles/mailcatcher/tasks/main.yml +++ b/resources/ansible/roles/mailcatcher/tasks/main.yml @@ -13,7 +13,7 @@ - name: Install mailcatcher gem # gem module is flaky, this is consistent - command: gem install mailcatcher --conservative + command: gem install mailcatcher -v 0.6.4 --conservative ignore_errors: yes - name: Install mailcatcher supervisord conf From 9335bb2517cc02fd093e6f084e50f71397296a05 Mon Sep 17 00:00:00 2001 From: jygaulier Date: Mon, 29 Jul 2019 13:39:06 +0200 Subject: [PATCH 8/8] restore mailcatcher --- resources/ansible/playbook-boxes.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/ansible/playbook-boxes.yml b/resources/ansible/playbook-boxes.yml index 370b427481..3418297c6c 100644 --- a/resources/ansible/playbook-boxes.yml +++ b/resources/ansible/playbook-boxes.yml @@ -14,7 +14,7 @@ # - php - xdebug # - composer -# - mailcatcher + - mailcatcher # - node # - yarn # - ffmpeg