mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-29 05:26:13 +00:00
add concerned parties in show activity page (2 contexts)
This commit is contained in:
parent
32b3d74a1b
commit
987815471c
@ -8,3 +8,27 @@
|
||||
.activity {
|
||||
color: $chill-green;
|
||||
}
|
||||
|
||||
// exceptions for flex-bloc in concerned-groups
|
||||
div.flex-bloc.concerned-groups {
|
||||
margin-top: 1em;
|
||||
div.item-bloc {
|
||||
flex-grow: 0; flex-shrink: 0; flex-basis: 25%; //4 blocs
|
||||
ul.list-content {
|
||||
list-style-type: none;
|
||||
padding-left: 0;
|
||||
li {
|
||||
a {
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
color: #ffffffab;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.person div.item-bloc {
|
||||
flex-basis: 33%; //3 blocs
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<li>
|
||||
<span class="badge badge-primary" :title="person.text">
|
||||
<span class="chill_denomination">
|
||||
{{ textCutted }}
|
||||
<a class="fa fa-times"
|
||||
</span>
|
||||
<a class="fa fa-fw fa-times"
|
||||
@click.prevent="$emit('remove', person)">
|
||||
</a>
|
||||
</span>
|
||||
|
@ -0,0 +1,37 @@
|
||||
{% if context == 'person' %}
|
||||
{% set blocs = [
|
||||
{ 'title': 'Persons associated'|trans, 'items': entity.persons },
|
||||
{ 'title': 'ThirdParties'|trans, 'items': entity.thirdParties },
|
||||
{ 'title': 'Users concerned'|trans, 'items': entity.users },
|
||||
] %}
|
||||
{% else %}
|
||||
{% set blocs = [
|
||||
{ 'title': 'Persons in accompanying course'|trans, 'items': entity.persons },
|
||||
{ 'title': 'Third persons'|trans, 'items': entity.persons },
|
||||
{ 'title': 'ThirdParties'|trans, 'items': entity.thirdParties },
|
||||
{ 'title': 'Users concerned'|trans, 'items': entity.users },
|
||||
] %}
|
||||
{% endif %}
|
||||
|
||||
<div class="flex-bloc concerned-groups {{ context }}">
|
||||
{% for bloc in blocs %}
|
||||
<div class="item-bloc">
|
||||
<div class="item-row">
|
||||
<div class="item-col">
|
||||
<h4>{{ bloc.title }}</h4>
|
||||
</div>
|
||||
<div class="item-col">
|
||||
<ul class="list-content">
|
||||
{% for item in bloc.items %}
|
||||
<li>
|
||||
<span class="badge badge-primary">
|
||||
{{ item|chill_entity_render_box({'only_denomination': true}) }}
|
||||
</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
@ -25,7 +25,7 @@
|
||||
{{ form_row(edit_form.reasons) }}
|
||||
{% endif %}
|
||||
|
||||
<h2 class="chill-red">Parties concernées</h2>
|
||||
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
|
||||
|
||||
{%- if edit_form.persons is defined -%}
|
||||
{{ form_widget(edit_form.persons) }}
|
||||
|
@ -26,7 +26,7 @@
|
||||
{{ form_row(form.reasons) }}
|
||||
{% endif %}
|
||||
|
||||
<h2 class="chill-red">Parties concernées</h2>
|
||||
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
|
||||
|
||||
{%- if form.persons is defined -%}
|
||||
{{ form_widget(form.persons) }}
|
||||
|
@ -1,5 +1,4 @@
|
||||
<h1 >{{ "Activity"|trans }}</h1>
|
||||
|
||||
<dl class="chill_view_data">
|
||||
<dt class="inline">{{ 'User'|trans }}</dt>
|
||||
<dd>{{ entity.user }}</dd>
|
||||
@ -8,8 +7,13 @@
|
||||
<dt class="inline">{{ 'Scope'|trans }}</dt>
|
||||
<dd><span class="scope">{{ entity.scope.name|localize_translatable_string }}</span></dd>
|
||||
{% endif %}
|
||||
</dl>
|
||||
|
||||
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
|
||||
{% include 'ChillActivityBundle:Activity:concernedGroups.html.twig' with {'context': context } %}
|
||||
|
||||
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
|
||||
<dl class="chill_view_data">
|
||||
|
||||
{%- if entity.person is defined -%}
|
||||
<dt class="inline">{{ 'Person'|trans }}</dt>
|
||||
@ -39,7 +43,6 @@
|
||||
{%- else -%}
|
||||
<dd>{{ entity.comment|chill_entity_render_box }}</dd>
|
||||
{%- endif -%}
|
||||
|
||||
</dl>
|
||||
|
||||
{% set person_id = null %}
|
||||
|
@ -7,5 +7,5 @@
|
||||
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
||||
|
||||
{% block content -%}
|
||||
{% include 'ChillActivityBundle:Activity:show.html.twig' %}
|
||||
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||
{% endblock content %}
|
||||
|
@ -7,5 +7,5 @@
|
||||
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
||||
|
||||
{% block personcontent -%}
|
||||
{% include 'ChillActivityBundle:Activity:show.html.twig' %}
|
||||
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %}
|
||||
{% endblock personcontent %}
|
||||
|
@ -61,6 +61,13 @@ Choose a type: Choisir un type
|
||||
1 hour 30: 1 heure 30
|
||||
1 hour 45: 1 heure 45
|
||||
2 hours: 2 heures
|
||||
Concerned groups: Parties concernées
|
||||
Persons in accompanying course: Usagers du parcours
|
||||
Third persons: Tiers non-pro.
|
||||
Persons associated: Usagers
|
||||
ThirdParties: Tiers professionnels
|
||||
Users concerned: T(M)S
|
||||
|
||||
|
||||
#timeline
|
||||
'%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"'
|
||||
|
@ -41,6 +41,12 @@ table {
|
||||
}
|
||||
}
|
||||
|
||||
// règle la typo des étiquettes de dénomination rendues avec renderBox
|
||||
.chill_denomination {
|
||||
font-size: 1.3em;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/*
|
||||
* ACCOMPANYING_COURSE
|
||||
* Header custom for Accompanying Course
|
||||
|
@ -40,11 +40,3 @@ div.list-with-period {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.chill-entity__person {
|
||||
.chill-entity__person__first-name,
|
||||
.chill-entity__person__last-name {
|
||||
font-size: 1.3em;
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
<span class="chill-entity chill-entity__person">
|
||||
{%- if addLink and is_granted('CHILL_PERSON_SEE', person) -%}
|
||||
{%- set showLink = true -%}<a href="{{ chill_path_add_return_path('chill_person_view', { 'person_id': person.id }) }}">{%- endif -%}
|
||||
<span class="chill-entity__person__first-name">{{ person.firstName }}</span>
|
||||
<span class="chill-entity__person__last-name">{{ person.lastName }}</span>
|
||||
<span class="chill_denomination">{{ person.firstName }}</span>
|
||||
<span class="chill_denomination">{{ person.lastName }}</span>
|
||||
{%- if addAltNames -%}
|
||||
{%- for n in person.altNames -%}
|
||||
{%- if loop.first -%}({% else %} {%- endif -%}
|
||||
|
@ -51,8 +51,8 @@ class PersonRender extends AbstractChillEntityRender
|
||||
{
|
||||
return
|
||||
$this->getDefaultOpeningBox('person').
|
||||
'<span class="chill-entity__person__first-name">'.$person->getFirstName().'</span>'.
|
||||
' <span class="chill-entity__person__last-name">'.$person->getLastName().'</span>'.
|
||||
'<span class="chill_denomination">'.$person->getFirstName().'</span>'.
|
||||
' <span class="chill_denomination">'.$person->getLastName().'</span>'.
|
||||
$this->addAltNames($person, true).
|
||||
$this->getDefaultClosingBox()
|
||||
;
|
||||
|
@ -1,4 +1,10 @@
|
||||
{# template to render a person #}
|
||||
{%- if options['only_denomination'] == true -%}
|
||||
<div class="chill_denomination">
|
||||
{{ contact.name }}
|
||||
</div>
|
||||
|
||||
{%- else -%}
|
||||
<div class="chill_contact">
|
||||
|
||||
<div class="chill_contact_name">
|
||||
@ -43,3 +49,4 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{%- endif -%}
|
||||
|
Loading…
x
Reference in New Issue
Block a user