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 {
|
.activity {
|
||||||
color: $chill-green;
|
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>
|
<template>
|
||||||
<li>
|
<li>
|
||||||
<span class="badge badge-primary" :title="person.text">
|
<span class="badge badge-primary" :title="person.text">
|
||||||
{{ textCutted }}
|
<span class="chill_denomination">
|
||||||
<a class="fa fa-times"
|
{{ textCutted }}
|
||||||
|
</span>
|
||||||
|
<a class="fa fa-fw fa-times"
|
||||||
@click.prevent="$emit('remove', person)">
|
@click.prevent="$emit('remove', person)">
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</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) }}
|
{{ form_row(edit_form.reasons) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h2 class="chill-red">Parties concernées</h2>
|
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
|
||||||
|
|
||||||
{%- if edit_form.persons is defined -%}
|
{%- if edit_form.persons is defined -%}
|
||||||
{{ form_widget(edit_form.persons) }}
|
{{ form_widget(edit_form.persons) }}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
{{ form_row(form.reasons) }}
|
{{ form_row(form.reasons) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<h2 class="chill-red">Parties concernées</h2>
|
<h2 class="chill-red">{{ 'Concerned groups'|trans }}</h2>
|
||||||
|
|
||||||
{%- if form.persons is defined -%}
|
{%- if form.persons is defined -%}
|
||||||
{{ form_widget(form.persons) }}
|
{{ form_widget(form.persons) }}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<h1 >{{ "Activity"|trans }}</h1>
|
<h1 >{{ "Activity"|trans }}</h1>
|
||||||
|
|
||||||
<dl class="chill_view_data">
|
<dl class="chill_view_data">
|
||||||
<dt class="inline">{{ 'User'|trans }}</dt>
|
<dt class="inline">{{ 'User'|trans }}</dt>
|
||||||
<dd>{{ entity.user }}</dd>
|
<dd>{{ entity.user }}</dd>
|
||||||
@ -8,8 +7,13 @@
|
|||||||
<dt class="inline">{{ 'Scope'|trans }}</dt>
|
<dt class="inline">{{ 'Scope'|trans }}</dt>
|
||||||
<dd><span class="scope">{{ entity.scope.name|localize_translatable_string }}</span></dd>
|
<dd><span class="scope">{{ entity.scope.name|localize_translatable_string }}</span></dd>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</dl>
|
||||||
|
|
||||||
<h2 class="chill-red">{{ 'Activity data'|trans }}</h2>
|
<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 -%}
|
{%- if entity.person is defined -%}
|
||||||
<dt class="inline">{{ 'Person'|trans }}</dt>
|
<dt class="inline">{{ 'Person'|trans }}</dt>
|
||||||
@ -39,7 +43,6 @@
|
|||||||
{%- else -%}
|
{%- else -%}
|
||||||
<dd>{{ entity.comment|chill_entity_render_box }}</dd>
|
<dd>{{ entity.comment|chill_entity_render_box }}</dd>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
{% set person_id = null %}
|
{% set person_id = null %}
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
||||||
|
|
||||||
{% block content -%}
|
{% block content -%}
|
||||||
{% include 'ChillActivityBundle:Activity:show.html.twig' %}
|
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'accompanyingCourse'} %}
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
@ -7,5 +7,5 @@
|
|||||||
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
{% import 'ChillActivityBundle:ActivityReason:macro.html.twig' as m %}
|
||||||
|
|
||||||
{% block personcontent -%}
|
{% block personcontent -%}
|
||||||
{% include 'ChillActivityBundle:Activity:show.html.twig' %}
|
{% include 'ChillActivityBundle:Activity:show.html.twig' with {'context': 'person'} %}
|
||||||
{% endblock personcontent %}
|
{% endblock personcontent %}
|
||||||
|
@ -61,6 +61,13 @@ Choose a type: Choisir un type
|
|||||||
1 hour 30: 1 heure 30
|
1 hour 30: 1 heure 30
|
||||||
1 hour 45: 1 heure 45
|
1 hour 45: 1 heure 45
|
||||||
2 hours: 2 heures
|
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
|
#timeline
|
||||||
'%user% has done an %activity_type%': '%user% a effectué une activité de type "%activity_type%"'
|
'%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
|
* ACCOMPANYING_COURSE
|
||||||
* Header custom for 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">
|
<span class="chill-entity chill-entity__person">
|
||||||
{%- if addLink and is_granted('CHILL_PERSON_SEE', 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 -%}
|
{%- 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_denomination">{{ person.firstName }}</span>
|
||||||
<span class="chill-entity__person__last-name">{{ person.lastName }}</span>
|
<span class="chill_denomination">{{ person.lastName }}</span>
|
||||||
{%- if addAltNames -%}
|
{%- if addAltNames -%}
|
||||||
{%- for n in person.altNames -%}
|
{%- for n in person.altNames -%}
|
||||||
{%- if loop.first -%}({% else %} {%- endif -%}
|
{%- if loop.first -%}({% else %} {%- endif -%}
|
||||||
|
@ -51,8 +51,8 @@ class PersonRender extends AbstractChillEntityRender
|
|||||||
{
|
{
|
||||||
return
|
return
|
||||||
$this->getDefaultOpeningBox('person').
|
$this->getDefaultOpeningBox('person').
|
||||||
'<span class="chill-entity__person__first-name">'.$person->getFirstName().'</span>'.
|
'<span class="chill_denomination">'.$person->getFirstName().'</span>'.
|
||||||
' <span class="chill-entity__person__last-name">'.$person->getLastName().'</span>'.
|
' <span class="chill_denomination">'.$person->getLastName().'</span>'.
|
||||||
$this->addAltNames($person, true).
|
$this->addAltNames($person, true).
|
||||||
$this->getDefaultClosingBox()
|
$this->getDefaultClosingBox()
|
||||||
;
|
;
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
{# template to render a person #}
|
{# 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">
|
||||||
|
|
||||||
<div class="chill_contact_name">
|
<div class="chill_contact_name">
|
||||||
@ -43,3 +49,4 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
{%- endif -%}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user