render_box: adding option addId + styles more generic, less specific

This commit is contained in:
2021-07-30 10:46:16 +02:00
parent 6dac130844
commit 4cac5f9a4a
10 changed files with 71 additions and 72 deletions

View File

@@ -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

View File

@@ -1,2 +1,2 @@
require('./thirdparty.scss');
require('./chillthirdparty.scss');

View File

@@ -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">{#

View File

@@ -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'] ?? [],