From e06c4d8ecac325e8ce2dca820525236f0c0f7a8a Mon Sep 17 00:00:00 2001 From: Harrys Ravalomanana Date: Wed, 22 Jan 2020 16:04:36 +0400 Subject: [PATCH] PHRAS-2875 add Collection on caption tooltip --- package.json | 2 +- templates/web/prod/Tooltip/Caption.html.twig | 7 ++++++- templates/web/prod/WorkZone/Macros.html.twig | 2 +- yarn.lock | 8 ++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index d5cfe5cddf..fbe48edbd0 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "normalize-css": "^2.1.0", "npm": "^6.0.0", "npm-modernizr": "^2.8.3", - "phraseanet-production-client": "0.34.105-d", + "phraseanet-production-client": "0.34.106-d", "requirejs": "^2.3.5", "tinymce": "^4.0.28", "underscore": "^1.8.3", diff --git a/templates/web/prod/Tooltip/Caption.html.twig b/templates/web/prod/Tooltip/Caption.html.twig index cd85656671..8bd04c2fe8 100644 --- a/templates/web/prod/Tooltip/Caption.html.twig +++ b/templates/web/prod/Tooltip/Caption.html.twig @@ -1,6 +1,11 @@ {% extends 'prod/Tooltip/Tooltip.html.twig' %} -{% set title %}{{ 'Caption' | trans }}{% endset %} +{% set title %}{{ 'Caption' | trans }}   {% set collectionLogo = collection_logo(record.baseId) %} + {% if collectionLogo is empty %} + {{ record.collectionName }} + {% else %} + {{ collectionLogo|raw }} + {% endif %} {% endset %} {% set width = 400 %} {% set maxwidth = 700 %} diff --git a/templates/web/prod/WorkZone/Macros.html.twig b/templates/web/prod/WorkZone/Macros.html.twig index b3298373c3..a2eff03031 100644 --- a/templates/web/prod/WorkZone/Macros.html.twig +++ b/templates/web/prod/WorkZone/Macros.html.twig @@ -112,7 +112,7 @@ {% endfor %}
- {% for basket in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::BASKETS')) %} + {% for basket in content.get(constant('\\Alchemy\\Phrasea\\Helper\\WorkZone::BASKETS')) | sort | reverse %}