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 btn = e.target;

View File

@ -12,23 +12,7 @@
{{ encore_entry_link_tags('mod_forkawesome') }}
{{ encore_entry_link_tags('mod_ckeditor5') }}
{{ encore_entry_link_tags('chill') }}
{% block css%}<!-- nothing added to css -->
<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 %}
{% block css %}<!-- nothing added to css -->{% endblock %}
</head>
<body>

View File

@ -7,6 +7,7 @@
* addEntity bool
* addId bool
* addInfo bool
* isConfidential bool
* hLevel integer
* customButtons [
'before' Twig\Markup, (injected with macro)
@ -84,6 +85,9 @@
<span class="badge bg-thirdparty-{{ thirdparty.kind }}">{{ ('thirdparty.' ~ thirdparty.kind)|trans }}</span>
</div>
<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({
@ -106,6 +110,33 @@
</a>
</li>
</ul>
</div>
</div>
{% else %}
<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>
{%- endif -%}
<ul class="record_actions">
{% if options['customButtons']['before'] is defined %}
{{ options['customButtons']['before'] }}

View File

@ -22,7 +22,7 @@
<div class="flex-table">
{% for tp in third_parties %}
<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">
<ul class="record_actions">
{% if is_granted('CHILL_3PARTY_3PARTY_UPDATE', tp) %}

View File

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