mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix for comment embeddable null + template adjustments
This commit is contained in:
parent
450792e446
commit
126bd1a4eb
@ -182,6 +182,11 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface
|
|||||||
|
|
||||||
public function setComment(?CommentEmbeddable $comment): self
|
public function setComment(?CommentEmbeddable $comment): self
|
||||||
{
|
{
|
||||||
|
if ($comment === null) {
|
||||||
|
$this->comment->setComment('');
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
$this->comment = $comment;
|
$this->comment = $comment;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -17,24 +17,47 @@
|
|||||||
<div class="wh-row">
|
<div class="wh-row">
|
||||||
<div class="wh-col">
|
<div class="wh-col">
|
||||||
{% if resource.person is not null %}
|
{% if resource.person is not null %}
|
||||||
<div class="item-col"><p class="h3">{{ resource.person }}</p></div>
|
<div class="item-col">
|
||||||
|
<div class="denomination h3">
|
||||||
|
<span class="name">{{ resource.person }}</span>
|
||||||
|
<span class="badge rounded-pill bg-person">{{ 'person'|trans|capitalize }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% elseif resource.thirdparty is not null %}
|
{% elseif resource.thirdparty is not null %}
|
||||||
<div class="item-col"><p class="h3">{{ resource.thirdparty }}</p></div>
|
<div class="item-col">
|
||||||
|
<div class="denomination h3">
|
||||||
|
<span class="name">{{ resource.thirdparty }}</span>
|
||||||
|
<span class="badge rounded-pill bg-thirdparty">
|
||||||
|
{{ 'thirdparty'|trans|capitalize }}
|
||||||
|
<i class="fa fa-fw fa-user-md"></i>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="item-col"><p class="h3">{{ resource.freetext }}</p></div>
|
<div class="item-col">
|
||||||
|
<div class="denomination h3">
|
||||||
|
<span>{{ resource.freetext }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="wh-col">
|
<div class="wh-col">
|
||||||
<span>{{ resource.kind.title.fr }}</span>
|
{% if resource.kind %}
|
||||||
|
<span>{{ resource.kind.title.fr|capitalize }}</span>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-row separator">
|
<div class="item-row">
|
||||||
<section class="chill-entity entity-comment-embeddable">
|
<section class="chill-entity entity-comment-embeddable">
|
||||||
|
{% if resource.kind %}
|
||||||
<blockquote class="chill-user-quote">
|
<blockquote class="chill-user-quote">
|
||||||
<div>{{ resource.comment.comment }}<div>
|
<div>{{ resource.comment.comment }}<div>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
{% else %}
|
||||||
|
<p class="chill-no-data-statement">{{ 'no comment found'|trans|capitalize }}</p>
|
||||||
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div class="item-row separator">
|
<div class="item-row separator">
|
||||||
|
@ -234,6 +234,7 @@ Are you sure you want to remove the resource for "%name%" ?: Étes-vous sûr de
|
|||||||
The resource has been successfully removed.: "La ressource a été supprimée."
|
The resource has been successfully removed.: "La ressource a été supprimée."
|
||||||
List of resources: "Liste des ressources"
|
List of resources: "Liste des ressources"
|
||||||
There are no available resources: "Il y aucun ressource"
|
There are no available resources: "Il y aucun ressource"
|
||||||
|
no comment found: "Aucun commentaire"
|
||||||
|
|
||||||
# pickAPersonType
|
# pickAPersonType
|
||||||
Pick a person: Choisir une personne
|
Pick a person: Choisir une personne
|
||||||
|
Loading…
x
Reference in New Issue
Block a user