mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
render_box: adding option addId + styles more generic, less specific
This commit is contained in:
parent
6dac130844
commit
4cac5f9a4a
@ -21,12 +21,7 @@
|
||||
|
||||
// styles communs pour tous les bandeaux
|
||||
div.banner {
|
||||
.id-number {
|
||||
font-weight: lighter;
|
||||
font-size: 50%;
|
||||
&:before { content: '(n°'; }
|
||||
&:after { content: ')'; }
|
||||
}
|
||||
|
||||
a.phone,
|
||||
a.email {
|
||||
color: white;
|
||||
|
@ -2,7 +2,7 @@
|
||||
section.chill-entity {
|
||||
|
||||
// display inline for render raw
|
||||
// have no effect for render label, row, bloc !
|
||||
// have no effect for render label, bloc !
|
||||
display: inline;
|
||||
|
||||
// don't break flex cascade with section tag
|
||||
@ -13,8 +13,38 @@ section.chill-entity {
|
||||
}
|
||||
|
||||
// specific rules
|
||||
// address render_box
|
||||
div.chill-entity {
|
||||
.chill-entity {
|
||||
|
||||
// used for: entity-person, entity-thirdparty
|
||||
&.entity-person,
|
||||
&.entity-thirdparty {
|
||||
|
||||
div.entity-label {
|
||||
div.denomination {
|
||||
&.h3 {
|
||||
font-size: 1.3em;
|
||||
font-weight: 700;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
span.badge {
|
||||
margin-left: 0.3em;
|
||||
}
|
||||
span.id-number {
|
||||
font-weight: lighter;
|
||||
font-size: 50%;
|
||||
margin-left: 0.5em;
|
||||
&:before { content: '(n°'; }
|
||||
&:after { content: ')'; }
|
||||
}
|
||||
}
|
||||
p.moreinfo {}
|
||||
}
|
||||
div.entity-bloc {}
|
||||
}
|
||||
|
||||
// address render_box
|
||||
&.entity-address {
|
||||
div.noaddress {}
|
||||
div.address {
|
||||
|
@ -1,22 +1,8 @@
|
||||
|
||||
section.chill-entity.entity-person {
|
||||
div.entity-label {
|
||||
div.denomination {
|
||||
&.h3 {
|
||||
font-size: 1.3em;
|
||||
font-weight: 700;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
span.firstname, span.lastname, span.altname {}
|
||||
span.badge {
|
||||
margin-left: 0.3em;
|
||||
}
|
||||
}
|
||||
p.moreinfo {}
|
||||
section.chill-entity {
|
||||
&.entity-person {
|
||||
span.firstname,
|
||||
span.lastname,
|
||||
span.altname {}
|
||||
}
|
||||
div.entity-row {}
|
||||
div.entity-bloc {}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
* addAltNames bool
|
||||
* addLink bool
|
||||
* addEntity bool
|
||||
* addId bool
|
||||
* addInfo bool
|
||||
* hLevel integer
|
||||
* customButtons [
|
||||
@ -42,6 +43,11 @@
|
||||
{%- if options['addEntity'] -%}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Person'|trans }}</span>
|
||||
{%- endif -%}
|
||||
{%- if options['addId'] -%}
|
||||
<span class="id-number" title="{{ 'Person'|trans ~ ' ' ~ person.id }}">
|
||||
{{ person.id|upper }}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- if options['addInfo'] -%}
|
||||
{% set gender = (person.gender == 'woman') ? 'fa-venus' :
|
||||
|
@ -2,26 +2,17 @@
|
||||
<div id="header-person-name" class="header-name">
|
||||
<div class="container-xxl">
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="col-md-6">
|
||||
<h1>
|
||||
{% set gender =
|
||||
(person.gender == "woman") ? 'female' :
|
||||
(person.gender == "both") ? 'neuter' : 'male'
|
||||
%}
|
||||
<i class="fa fa-fw fa-{{ gender }}" title="{{ gender|capitalize|trans }}"></i>
|
||||
|
||||
{{ person|chill_entity_render_string }}
|
||||
|
||||
<span class="id-number" title="{{ 'Person'|trans ~ ' ' ~ person.id }}">
|
||||
{{ person.id|upper }}
|
||||
</span>
|
||||
</h1>
|
||||
{{ person|chill_entity_render_box({
|
||||
'render': 'label', 'addInfo': true, 'addId': true, 'hLevel': 1
|
||||
}) }}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-auto ps-4 ps-md-2">
|
||||
<ul class="list-content fa-ul my-2">
|
||||
{% if person.email %}
|
||||
{% if person.email %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-envelope-o"></i>
|
||||
<a href="{{ 'mailto:' ~ person.email }}" class="email" title="{{ 'Email'|trans }}">
|
||||
@ -44,7 +35,7 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md ps-4 ps-md-2">
|
||||
<ul class="list-content fa-ul">
|
||||
{%- if person.currentHouseholdAddress is not empty -%}
|
||||
@ -60,14 +51,14 @@
|
||||
{%- endif -%}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="header-person-details" class="header-details">
|
||||
<div class="container-xxl">
|
||||
<div class="row justify-content-between">
|
||||
|
||||
|
||||
<div class="col-md-6 ps-4">
|
||||
<span class="open_sansbold">
|
||||
{{ 'Birthdate'|trans|upper }} :
|
||||
@ -81,7 +72,7 @@
|
||||
{{ person.age ~ ((person.age > 1) ? ' ans' : ' an') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
{%- if chill_person.fields.nationality == 'visible' -%}
|
||||
<div class="col-md-auto ps-4 ps-md-2">
|
||||
<span class="open_sansbold">
|
||||
@ -94,16 +85,16 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
{%- if chill_person.fields.spoken_languages == 'visible' -%}
|
||||
<div class="col-md ps-4 ps-md-2 text-md-end text-start pe-4">
|
||||
<span class="open_sansbold">
|
||||
{{ 'Center'|trans|upper}} :
|
||||
</span>
|
||||
</span>
|
||||
{{ person.center.name|upper }}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,6 +55,7 @@ class PersonRender extends AbstractChillEntityRender
|
||||
'addAltNames' => $this->configAltNamesHelper->hasAltNames(),
|
||||
'addLink' => $options['addLink'] ?? false,
|
||||
'addEntity' => $options['addEntity'] ?? false,
|
||||
'addId' => $options['addId'] ?? false,
|
||||
'addInfo' => $options['addInfo'] ?? false,
|
||||
'hLevel' => $options['hLevel'] ?? 3,
|
||||
'customButtons' => $options['customButtons'] ?? [],
|
||||
|
@ -1,26 +1,9 @@
|
||||
|
||||
/// render_box
|
||||
section.chill-entity.entity-thirdparty {
|
||||
div.entity-label {
|
||||
div.denomination {
|
||||
&.h3 {
|
||||
font-size: 1.3em;
|
||||
font-weight: 700;
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
span.name {}
|
||||
span.badge {
|
||||
margin-left: 0.3em;
|
||||
}
|
||||
}
|
||||
p.moreinfo {
|
||||
span.company, span.acronym {}
|
||||
}
|
||||
section.chill-entity {
|
||||
.entity-thirdparty {
|
||||
span.name {}
|
||||
}
|
||||
div.entity-row {}
|
||||
div.entity-bloc {}
|
||||
}
|
||||
|
||||
/* AVANT
|
@ -1,2 +1,2 @@
|
||||
require('./thirdparty.scss');
|
||||
require('./chillthirdparty.scss');
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
* with_valid_from bool
|
||||
* addLink bool
|
||||
* addEntity bool
|
||||
* addId bool
|
||||
* addInfo bool
|
||||
* hLevel integer
|
||||
* customButtons [
|
||||
@ -32,6 +33,11 @@
|
||||
{%- if options['addEntity'] -%}
|
||||
<span class="badge rounded-pill bg-secondary">{{ 'Third party'|trans }}</span>
|
||||
{%- endif -%}
|
||||
{%- if options['addId'] -%}
|
||||
<span class="id-number" title="{{ 'Third party'|trans ~ ' ' ~ thirdparty.id }}">
|
||||
{{ person.id|upper }}
|
||||
</span>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- if options['addInfo'] -%}
|
||||
<p class="moreinfo">{#
|
||||
|
@ -50,6 +50,7 @@ class ThirdPartyRender extends AbstractChillEntityRender
|
||||
'with_valid_from' => $options['with_valid_from'] ?? true,
|
||||
'addLink' => $options['addLink'] ?? false,
|
||||
'addEntity' => $options['addEntity'] ?? false,
|
||||
'addId' => $options['addId'] ?? false,
|
||||
'addInfo' => $options['addInfo'] ?? false,
|
||||
'hLevel' => $options['hLevel'] ?? 3,
|
||||
'customButtons' => $options['customButtons'] ?? [],
|
||||
|
Loading…
x
Reference in New Issue
Block a user