implementation of blur effect for list of thirdparties

This commit is contained in:
Julie Lenaerts 2021-10-27 09:41:44 +02:00
parent c1a845e3e1
commit 5cf94a5ed6
6 changed files with 49 additions and 18 deletions

View File

@ -0,0 +1,13 @@
.confidential{
display: flex;
align-items: center;
}
.toggle{
margin-left: 10px;
cursor: pointer;
}
.blur {
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
filter: blur(5px);
}

View File

@ -1,3 +1,5 @@
require('./blur.scss');
var toggleBlur = function(e){ var toggleBlur = function(e){
var btn = e.target; var btn = e.target;

View File

@ -12,23 +12,7 @@
{{ encore_entry_link_tags('mod_forkawesome') }} {{ encore_entry_link_tags('mod_forkawesome') }}
{{ encore_entry_link_tags('mod_ckeditor5') }} {{ encore_entry_link_tags('mod_ckeditor5') }}
{{ encore_entry_link_tags('chill') }} {{ encore_entry_link_tags('chill') }}
{% block css%}<!-- nothing added to css --> {% block css %}<!-- nothing added to css -->{% endblock %}
<style>
.confidential{
display: flex;
align-items: center;
}
.toggle{
margin-left: 10px;
cursor: pointer;
}
.blur {
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
filter: blur(5px);
}
</style>
{% endblock %}
</head> </head>
<body> <body>

View File

@ -7,6 +7,7 @@
* addEntity bool * addEntity bool
* addId bool * addId bool
* addInfo bool * addInfo bool
* isConfidential bool
* hLevel integer * hLevel integer
* customButtons [ * customButtons [
'before' Twig\Markup, (injected with macro) 'before' Twig\Markup, (injected with macro)
@ -84,6 +85,34 @@
<span class="badge bg-thirdparty-{{ thirdparty.kind }}">{{ ('thirdparty.' ~ thirdparty.kind)|trans }}</span> <span class="badge bg-thirdparty-{{ thirdparty.kind }}">{{ ('thirdparty.' ~ thirdparty.kind)|trans }}</span>
</div> </div>
<div class="item-col"> <div class="item-col">
{% if options['isConfidential'] %}
<div class="confidential">
<div class="confidential-content">
<ul class="list-content fa-ul">
<li>
{{ thirdparty.getAddress|chill_entity_render_box({
'render': 'list',
'with_picto': true,
'multiline': false,
'with_valid_from': false
}) }}
</li>
<li><i class="fa fa-li fa-phone"></i>
{% if thirdparty.telephone %}
<a href="{{ 'tel:' ~ thirdparty.telephone }}">{{ thirdparty.telephone|chill_format_phonenumber }}</a>
{% else %}
<span class="chill-no-data-statement">{{ 'thirdparty.No_phonenumber'|trans }}</span>
{% endif %}
</li>
<li><i class="fa fa-li fa-envelope-o"></i>
<a href="{{ 'mailto:' ~ thirdparty.email }}">
{{ thirdparty.email|chill_print_or_message("thirdparty.No_email") }}
</a>
</li>
</ul>
</div>
</div>
{% else %}
<ul class="list-content fa-ul"> <ul class="list-content fa-ul">
<li> <li>
{{ thirdparty.getAddress|chill_entity_render_box({ {{ thirdparty.getAddress|chill_entity_render_box({
@ -106,6 +135,8 @@
</a> </a>
</li> </li>
</ul> </ul>
{%- endif -%}
<ul class="record_actions"> <ul class="record_actions">
{% if options['customButtons']['before'] is defined %} {% if options['customButtons']['before'] is defined %}
{{ options['customButtons']['before'] }} {{ options['customButtons']['before'] }}

View File

@ -22,7 +22,7 @@
<div class="flex-table"> <div class="flex-table">
{% for tp in third_parties %} {% for tp in third_parties %}
<div class="item-bloc"> <div class="item-bloc">
{{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'showContacts': true }) }} {{ tp|chill_entity_render_box({'render': 'bloc', 'addLink': false, 'showContacts': true, 'isConfidential': true }) }}
<div class="item-row separator"> <div class="item-row separator">
<ul class="record_actions"> <ul class="record_actions">
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %} {% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}

View File

@ -63,6 +63,7 @@ class ThirdPartyRender extends AbstractChillEntityRender
'customArea' => $options['customArea'] ?? [], 'customArea' => $options['customArea'] ?? [],
'showContacts' => $options['showContacts'] ?? false, 'showContacts' => $options['showContacts'] ?? false,
'showParent' => $options['showParent'] ?? true, 'showParent' => $options['showParent'] ?? true,
'isConfidential' => $options['isConfidential'] ?? false
]; ];
return return