mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Merge remote-tracking branch 'origin/master' into issue296_internal_close_accourse
This commit is contained in:
@@ -60,6 +60,16 @@ h2.badge-title {
|
||||
h3 {
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
//position: relative;
|
||||
span {
|
||||
display: none;
|
||||
//position: absolute;
|
||||
//top: 0;
|
||||
//left: 0;
|
||||
//transform: rotate(270deg);
|
||||
//transform-origin: 0 0;
|
||||
}
|
||||
}
|
||||
span.title_action {
|
||||
flex-grow: 1;
|
||||
@@ -117,3 +127,36 @@ div.activity-list {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// AccompanyingCourse: HeaderSlider Carousel
|
||||
div#header-accompanying_course-details {
|
||||
button.carousel-control-prev,
|
||||
button.carousel-control-next {
|
||||
width: 8%;
|
||||
opacity: inherit;
|
||||
}
|
||||
button.carousel-control-prev {
|
||||
left: unset;
|
||||
right: 0;
|
||||
}
|
||||
span.to-social-issues,
|
||||
span.to-persons-associated {
|
||||
display: inline-block;
|
||||
border-radius: 15px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
box-shadow: 0 0 3px 1px grey;
|
||||
opacity: 0.8;
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
span.to-social-issues {
|
||||
background-color: #4bafe8;
|
||||
border-left: 12px solid #32749a;
|
||||
}
|
||||
span.to-persons-associated {
|
||||
background-color: #16d9b4;
|
||||
border-right: 12px solid #ffffff;
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
///
|
||||
|
||||
@mixin chill_badge($color) {
|
||||
text-transform: capitalize !important;
|
||||
//text-transform: capitalize !important;
|
||||
font-weight: 500 !important;
|
||||
border-left: 20px groove $color;
|
||||
&:before {
|
||||
|
@@ -22,7 +22,7 @@
|
||||
<i>{{ $t('course.open_at') }}{{ $d(accompanyingCourse.openingDate.datetime, 'text') }}</i>
|
||||
</span>
|
||||
<span v-if="accompanyingCourse.user" class="d-md-block ms-3 ms-md-0">
|
||||
<abbr :title="$t('course.referrer')">{{ $t('course.referrer') }}:</abbr> <b>{{ accompanyingCourse.user.username }}</b>
|
||||
<span class="item-key">{{ $t('course.referrer') }}:</span> <b>{{ accompanyingCourse.user.username }}</b>
|
||||
</span>
|
||||
</span>
|
||||
</span>
|
||||
@@ -34,13 +34,15 @@
|
||||
</teleport>
|
||||
|
||||
<teleport to="#header-accompanying_course-details #banner-social-issues">
|
||||
<div class="col-12">
|
||||
<social-issue
|
||||
v-for="issue in accompanyingCourse.socialIssues"
|
||||
v-bind:key="issue.id"
|
||||
v-bind:issue="issue">
|
||||
</social-issue>
|
||||
</div>
|
||||
<social-issue
|
||||
v-for="issue in accompanyingCourse.socialIssues"
|
||||
v-bind:key="issue.id"
|
||||
v-bind:issue="issue">
|
||||
</social-issue>
|
||||
</teleport>
|
||||
|
||||
<teleport to="#header-accompanying_course-details #banner-persons-associated">
|
||||
<persons-associated :accompanyingCourse="accompanyingCourse"></persons-associated>
|
||||
</teleport>
|
||||
|
||||
</template>
|
||||
@@ -48,12 +50,14 @@
|
||||
<script>
|
||||
import ToggleFlags from './Banner/ToggleFlags';
|
||||
import SocialIssue from './Banner/SocialIssue.vue';
|
||||
import PersonsAssociated from './Banner/PersonsAssociated.vue';
|
||||
|
||||
export default {
|
||||
name: 'Banner',
|
||||
components: {
|
||||
ToggleFlags,
|
||||
SocialIssue
|
||||
SocialIssue,
|
||||
PersonsAssociated
|
||||
},
|
||||
computed: {
|
||||
accompanyingCourse() {
|
||||
|
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<span v-for="h in personsByHousehold()" :class="{ 'household': householdExists(h.id), 'no-household': !householdExists(h.id) }">
|
||||
<a v-if="householdExists(h.id)" :href="householdLink(h.id)">
|
||||
<i class="fa fa-home fa-fw text-light" :title="$t('persons_associated.show_household_number', { id: h.id })"></i>
|
||||
</a>
|
||||
<span v-for="person in h.persons" class="me-1">
|
||||
<on-the-fly :type="person.type" :id="person.id" :buttonText="person.text" :displayBadge="'true' === 'true'" action="show"></on-the-fly>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OnTheFly from 'ChillMainAssets/vuejs/OnTheFly/components/OnTheFly'
|
||||
|
||||
export default {
|
||||
name: "PersonsAssociated",
|
||||
components: {
|
||||
OnTheFly
|
||||
},
|
||||
props: [ 'accompanyingCourse' ],
|
||||
computed: {
|
||||
participations() {
|
||||
return this.accompanyingCourse.participations.filter(p => p.endDate === null)
|
||||
},
|
||||
persons() {
|
||||
return this.participations.map(p => p.person)
|
||||
},
|
||||
resources() {
|
||||
return this.accompanyingCourse.resources
|
||||
},
|
||||
requestor() {
|
||||
return this.accompanyingCourse.requestor
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
uniq(array) {
|
||||
return [...new Set(array)]
|
||||
},
|
||||
personsByHousehold() {
|
||||
|
||||
let households = []
|
||||
this.persons.forEach(p => { households.push(p.current_household_id) })
|
||||
|
||||
let personsByHousehold = []
|
||||
this.uniq(households).forEach(h => {
|
||||
personsByHousehold.push({
|
||||
id: h !== null ? h : 0,
|
||||
persons: this.persons.filter(p => p.current_household_id === h)
|
||||
})
|
||||
})
|
||||
console.log(personsByHousehold)
|
||||
|
||||
|
||||
return personsByHousehold
|
||||
},
|
||||
householdExists(id) {
|
||||
return id !== 0
|
||||
},
|
||||
householdLink(id) {
|
||||
return `/fr/person/household/${id}/summary`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
span.household {
|
||||
display: inline-block;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 10px;
|
||||
margin-right: 0.3em;
|
||||
padding: 5px;
|
||||
}
|
||||
</style>
|
@@ -10,7 +10,7 @@
|
||||
<div class="alert alert-warning">
|
||||
{{ $t('confirm.alert_validation') }}
|
||||
<ul class="mt-2">
|
||||
<li v-for="k in validationKeys">
|
||||
<li v-for="k in validationKeys" :key=k>
|
||||
{{ $t(notValidMessages[k].msg) }}
|
||||
<a :href="notValidMessages[k].anchor">
|
||||
<i class="fa fa-level-up fa-fw"></i>
|
||||
@@ -83,7 +83,11 @@ export default {
|
||||
},
|
||||
location: {
|
||||
msg: 'confirm.location_not_valid',
|
||||
anchor: '#section-20' //
|
||||
anchor: '#section-20'
|
||||
},
|
||||
origin: {
|
||||
msg: 'confirm.origin_not_valid',
|
||||
anchor: '#section-30'
|
||||
},
|
||||
socialIssue: {
|
||||
msg: 'confirm.socialIssue_not_valid',
|
||||
@@ -103,6 +107,7 @@ export default {
|
||||
...mapGetters([
|
||||
'isParticipationValid',
|
||||
'isSocialIssueValid',
|
||||
'isOriginValid',
|
||||
'isLocationValid',
|
||||
'validationKeys',
|
||||
'isValidToBeConfirmed'
|
||||
|
@@ -19,15 +19,18 @@
|
||||
:options="options"
|
||||
@select="updateOrigin">
|
||||
</VueMultiselect>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="!isOriginValid" class="alert alert-warning to-confirm">
|
||||
{{ $t('origin.not_valid') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VueMultiselect from 'vue-multiselect';
|
||||
import { getListOrigins } from '../api';
|
||||
import { mapState } from 'vuex';
|
||||
import { mapState, mapGetters } from 'vuex';
|
||||
|
||||
export default {
|
||||
name: 'OriginDemand',
|
||||
@@ -41,6 +44,9 @@ export default {
|
||||
...mapState({
|
||||
value: state => state.accompanyingCourse.origin,
|
||||
}),
|
||||
...mapGetters([
|
||||
'isOriginValid'
|
||||
])
|
||||
},
|
||||
mounted() {
|
||||
this.getOptions();
|
||||
|
@@ -5,7 +5,7 @@
|
||||
addId : false,
|
||||
addEntity: false,
|
||||
addLink: false,
|
||||
addHouseholdLink: true,
|
||||
addHouseholdLink: false,
|
||||
addAltNames: true,
|
||||
addAge : true,
|
||||
hLevel : 3,
|
||||
@@ -20,14 +20,15 @@
|
||||
v-if="hasCurrentHouseholdAddress"
|
||||
v-bind:person="participation.person">
|
||||
</button-location>
|
||||
<li v-if="participation.person.current_household_id">
|
||||
<a class="btn btn-sm btn-chill-beige"
|
||||
:href="getCurrentHouseholdUrl"
|
||||
:title="$t('persons_associated.show_household_number', { id: participation.person.current_household_id })">
|
||||
<i class="fa fa-fw fa-home"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li><on-the-fly :type="participation.person.type" :id="participation.person.id" action="show"></on-the-fly></li>
|
||||
<li><on-the-fly :type="participation.person.type" :id="participation.person.id" action="edit" @saveFormOnTheFly="saveFormOnTheFly"></on-the-fly></li>
|
||||
<!-- <li>
|
||||
<button class="btn btn-delete"
|
||||
:title="$t('action.delete')"
|
||||
@click.prevent="$emit('remove', participation)">
|
||||
</button>
|
||||
</li> -->
|
||||
<li>
|
||||
<button v-if="!participation.endDate"
|
||||
class="btn btn-sm btn-remove"
|
||||
@@ -100,6 +101,9 @@ export default {
|
||||
},
|
||||
getAccompanyingCourseReturnPath() {
|
||||
return `fr/parcours/${this.$store.state.accompanyingCourse.id}/edit#section-10`;
|
||||
},
|
||||
getCurrentHouseholdUrl() {
|
||||
return `/fr/person/household/${this.participation.person.current_household_id}/summary?returnPath=${this.getAccompanyingCourseReturnPath}`
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@@ -19,16 +19,16 @@
|
||||
@select="updateReferrer">
|
||||
</VueMultiselect>
|
||||
|
||||
|
||||
<template v-if="referrersSuggested.length > 0">
|
||||
<ul>
|
||||
<li v-for="u in referrersSuggested" @click="updateReferrer(u)">
|
||||
<user-render-box-badge :user="u"></user-render-box-badge>
|
||||
</li>
|
||||
<ul class="list-unstyled">
|
||||
<li v-for="u in referrersSuggested" @click="updateReferrer(u)">
|
||||
<span class="badge bg-primary" style="cursor: pointer">
|
||||
<i class="fa fa-plus fa-fw text-success"></i>
|
||||
<user-render-box-badge :user="u"></user-render-box-badge>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</template>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@@ -35,6 +35,7 @@ const appMessages = {
|
||||
title: "Origine de la demande",
|
||||
label: "Origine de la demande",
|
||||
placeholder: "Renseignez l'origine de la demande",
|
||||
not_valid: "Indiquez une origine de la demande",
|
||||
},
|
||||
persons_associated: {
|
||||
title: "Usagers concernés",
|
||||
@@ -53,7 +54,7 @@ const appMessages = {
|
||||
show_household_number: "Voir le ménage (n° {id})",
|
||||
show_household: "Voir le ménage",
|
||||
person_without_household_warning: "Certaines usagers n'appartiennent actuellement à aucun ménage. Renseignez leur appartenance dès que possible.",
|
||||
update_household: "Modifier l'appartenance",
|
||||
update_household: "Renseigner l'appartenance",
|
||||
participation_not_valid: "Sélectionnez ou créez au minimum 1 usager",
|
||||
},
|
||||
requestor: {
|
||||
@@ -125,6 +126,7 @@ const appMessages = {
|
||||
participation_not_valid: "sélectionnez au minimum 1 usager",
|
||||
socialIssue_not_valid: "sélectionnez au minimum une problématique sociale",
|
||||
location_not_valid: "indiquez au minimum une localisation temporaire du parcours",
|
||||
origin_not_valid: "indiquez une origine de la demande",
|
||||
set_a_scope: "indiquez au moins un service",
|
||||
sure: "Êtes-vous sûr ?",
|
||||
sure_description: "Une fois le changement confirmé, il ne sera plus possible de le remettre à l'état de brouillon !",
|
||||
|
@@ -52,6 +52,9 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
||||
isSocialIssueValid(state) {
|
||||
return state.accompanyingCourse.socialIssues.length > 0;
|
||||
},
|
||||
isOriginValid(state) {
|
||||
return state.accompanyingCourse.origin !== null;
|
||||
},
|
||||
isLocationValid(state) {
|
||||
return state.accompanyingCourse.location !== null;
|
||||
},
|
||||
@@ -64,6 +67,7 @@ let initPromise = Promise.all([scopesPromise, accompanyingCoursePromise])
|
||||
if (!getters.isParticipationValid) { keys.push('participation'); }
|
||||
if (!getters.isLocationValid) { keys.push('location'); }
|
||||
if (!getters.isSocialIssueValid) { keys.push('socialIssue'); }
|
||||
if (!getters.isOriginValid) { keys.push('origin'); }
|
||||
if (!getters.isScopeValid) { keys.push('scopes'); }
|
||||
//console.log('getter keys', keys);
|
||||
return keys;
|
||||
|
@@ -119,9 +119,9 @@
|
||||
<div id="persons" class="action-row">
|
||||
<h3>{{ $t('persons_involved') }}</h3>
|
||||
|
||||
<ul>
|
||||
<ul class="list-unstyled">
|
||||
<li v-for="p in personsReachables" :key="p.id">
|
||||
<input v-model="personsPicked" :value="p.id" type="checkbox">
|
||||
<input v-model="personsPicked" :value="p.id" type="checkbox" class="me-2">
|
||||
<person-render-box render="badge" :options="{}" :person="p"></person-render-box>
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -96,14 +96,9 @@
|
||||
<p class="chill-no-data-statement">{{ $t('renderbox.no_data') }}</p>
|
||||
</li>
|
||||
|
||||
<li v-if="person.center && options.addCenter">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
<template v-if="person.center.type !== undefined">
|
||||
{{ person.center.name }}
|
||||
</template>
|
||||
<template v-else>
|
||||
<template v-for="c in person.center">{{ c.name }}</template>
|
||||
</template>
|
||||
<li v-if="person.centers !== undefined && person.centers.length > 0 && options.addCenter">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
<template v-for="c in person.centers">{{ c.name }}</template>
|
||||
</li>
|
||||
<li v-else-if="options.addNoData">
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<a class="btn btn-sm btn-update change-icon"
|
||||
href="{{ path('chill_person_accompanying_course_edit', { 'accompanying_period_id': accompanyingCourse.id, '_fragment': 'section-10' }) }}">
|
||||
<i class="fa fa-fw fa-crosshairs"></i>
|
||||
Corriger
|
||||
{{ 'fix it'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<a class="btn btn-sm btn-update change-icon"
|
||||
href="{{ path('chill_person_accompanying_course_edit', { 'accompanying_period_id': accompanyingCourse.id, '_fragment': 'section-20' }) }}">
|
||||
<i class="fa fa-fw fa-crosshairs"></i>
|
||||
Corriger
|
||||
{{ 'fix it'|trans }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
@@ -23,11 +23,28 @@
|
||||
</div>
|
||||
<div id="header-accompanying_course-details" class="header-details">
|
||||
<div class="container-xxl">
|
||||
<div
|
||||
class="row justify-content-md-right">
|
||||
<div class="row">
|
||||
|
||||
{# vue teleport fragment here #}
|
||||
<div class="col-md-10 ps-md-5 ps-xxl-0" id="banner-social-issues"></div>
|
||||
<div class="col-md-12 px-md-5 px-xxl-0">
|
||||
<div id="ACHeaderSlider" class="carousel carousel-dark slide" data-bs-ride="carousel">
|
||||
<div class="carousel-inner">
|
||||
<div class="carousel-item active">
|
||||
{# vue teleport fragment here #}
|
||||
<div id="banner-social-issues" class="col-11"></div>
|
||||
</div>
|
||||
<div class="carousel-item">
|
||||
{# vue teleport fragment here #}
|
||||
<div id="banner-persons-associated" class="col-11"></div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="carousel-control-prev justify-content-end visually-hidden" type="button" data-bs-target="#ACHeaderSlider" data-bs-slide="prev">
|
||||
<span class="to-social-issues" title="{{ 'see social issues'|trans }}"></span>
|
||||
</button>
|
||||
<button class="carousel-control-next justify-content-end visually-hidden" type="button" data-bs-target="#ACHeaderSlider" data-bs-slide="next">
|
||||
<span class="to-persons-associated" title="{{ 'see persons associated'|trans }}"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -23,32 +23,6 @@
|
||||
{% block content %}
|
||||
<div class="accompanyingcourse-resume row">
|
||||
|
||||
<div class="associated-persons mb-5">
|
||||
{% for h in participationsByHousehold %}
|
||||
{% set householdClass = (h.household is not null) ? 'household-' ~ h.household.id : 'no-household alert alert-warning' %}
|
||||
{% set householdTitle = (h.household is not null) ?
|
||||
'household.Household number'|trans({'household_num': h.household.id }) : 'household.Never in any household'|trans %}
|
||||
<span class="household {{ householdClass }}" title="{{ householdTitle }}">
|
||||
{% if h.household is not null %}
|
||||
<a href="{{ path('chill_person_household_summary', { 'household_id': h.household.id }) }}"
|
||||
title="{{ 'household.Household number'|trans({'household_num': h.household.id }) }}"
|
||||
><i class="fa fa-home fa-fw"></i></a>
|
||||
{% endif %}
|
||||
{% for p in h.members %}
|
||||
|
||||
{# include vue_onthefly component #}
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'person', id: p.person.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: p.person|chill_entity_render_string
|
||||
} %}
|
||||
|
||||
{% endfor %}
|
||||
</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% if 'DRAFT' == accompanyingCourse.step %}
|
||||
<div class="col-md-6 warnings mb-5">
|
||||
{% include '@ChillPerson/AccompanyingCourse/_still_draft.html.twig' %}
|
||||
@@ -83,7 +57,7 @@
|
||||
</div>
|
||||
|
||||
<div class="social-actions mb-5">
|
||||
<h2 class="mb-3">{{ 'Last social actions'|trans }}</h2>
|
||||
<h2 class="mb-3 d-none">{{ 'Last social actions'|trans }}</h2>
|
||||
{% include 'ChillPersonBundle:AccompanyingCourseWork:list_recent_by_accompanying_period.html.twig' with {'buttonText': false } %}
|
||||
</div>
|
||||
|
||||
@@ -101,8 +75,7 @@
|
||||
{% set accompanying_course_id = accompanyingCourse.id %}
|
||||
{% endif %}
|
||||
|
||||
<h2 class="mb-3">{{ 'Last activities' |trans }}</h2>
|
||||
|
||||
<h2 class="mb-3 d-none">{{ 'Last activities' |trans }}</h2>
|
||||
{% include 'ChillActivityBundle:Activity:list_recent.html.twig' with { 'context': 'accompanyingCourse', 'no_action': true } %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@@ -1,29 +1,33 @@
|
||||
{% if works|length == 0 %}
|
||||
<p class="chill-no-data-statement">{{ 'accompanying_course_work.Any work'|trans }}
|
||||
<a class="btn btn-sm btn-create"
|
||||
href="" title="TODO"></a>{# TODO link #}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="accompanying_course_work-list">
|
||||
{% for w in works | slice(0,5) %}
|
||||
<a href="{{ chill_path_add_return_path('chill_person_accompanying_period_work_edit', { 'id': w.id }) }}"></a>
|
||||
|
||||
<h2 class="badge-title">
|
||||
<span class="title_label">{{ 'accompanying_course_work.action'|trans }}</span>
|
||||
<span class="title_action">{{ w.socialAction|chill_entity_render_string }}
|
||||
<span class="title_label">
|
||||
<span>{{ 'accompanying_course_work.action'|trans }}</span>
|
||||
</span>
|
||||
<span class="title_action">
|
||||
{{ w.socialAction|chill_entity_render_string }}
|
||||
|
||||
<ul class="small_in_title">
|
||||
<li>
|
||||
<abbr title="{{ 'accompanying_course_work.start_date'|trans }}">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</abbr>
|
||||
{{ w.startDate|format_date('short') }}
|
||||
<span class="item-key">{{ 'accompanying_course_work.start_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ w.startDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% if w.endDate %}
|
||||
<li>
|
||||
<abbr title="{{ 'Last updated by'|trans }}">{{ 'Last updated by'|trans ~ ' : ' }}</abbr>
|
||||
{{ w.updatedBy|chill_entity_render_box }}, {{ w.updatedAt|format_datetime('short', 'short') }}
|
||||
<span class="item-key">{{ 'accompanying_course_work.end_date'|trans ~ ' : ' }}</span>
|
||||
<b>{{ w.endDate|format_date('short') }}</b>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
<div class="metadata text-end" style="font-size: 60%">
|
||||
{{ 'Last updated by'|trans }}
|
||||
<span class="user">{{ w.updatedBy|chill_entity_render_box }}</span>:
|
||||
<span class="date">{{ w.updatedAt|format_datetime('short', 'short') }}</span>
|
||||
</div>
|
||||
|
||||
</span>
|
||||
</h2>
|
||||
{% endfor %}
|
||||
|
@@ -148,10 +148,12 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if options['addCenter'] and person|chill_resolve_center is not null %}
|
||||
{% if options['addCenter'] and person|chill_resolve_center|length > 0 %}
|
||||
<li>
|
||||
<i class="fa fa-li fa-long-arrow-right"></i>
|
||||
{{ person|chill_resolve_center.name }}
|
||||
{% for c in person|chill_resolve_center %}
|
||||
{{ c.name|upper }}{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
@@ -17,18 +17,14 @@
|
||||
{%- endif -%}
|
||||
</div>
|
||||
<div class="text-md-end">
|
||||
{% if person|chill_resolve_center is not null %}
|
||||
{% if person|chill_resolve_center|length > 0 %}
|
||||
<span class="open_sansbold">
|
||||
{{ 'Center'|trans|upper}} :
|
||||
</span>
|
||||
|
||||
{% if person|chill_resolve_center is iterable %}
|
||||
{% for c in person|chill_resolve_center %}
|
||||
{{ c.name|upper }}{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{{ person|chill_resolve_center.name|upper }}
|
||||
{% endif %}
|
||||
{% for c in person|chill_resolve_center %}
|
||||
{{ c.name|upper }}{% if not loop.last %}, {% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{%- endif -%}
|
||||
</div>
|
||||
|
@@ -1,7 +1,12 @@
|
||||
{% macro button_person(person) %}
|
||||
{% macro button_person_after(person) %}
|
||||
{% set household = person.getCurrentHousehold %}
|
||||
{% if household is not null %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_household_summary', { 'household_id': household.id }) }}" class="btn btn-sm btn-chill-beige"><i class="fa fa-home"></i></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_new', { 'person_id': [ person.id ]}) }}"
|
||||
class="btn btn-sm btn-create change-icon" title="{{ 'Create an accompanying period'|trans }}"><i class="fa fa-random"></i></a>
|
||||
<a href="{{ path('chill_person_accompanying_course_new', { 'person_id': [ person.id ]}) }}" class="btn btn-sm btn-create change-icon" title="{{ 'Create an accompanying period'|trans }}"><i class="fa fa-random"></i></a>
|
||||
</li>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -56,7 +61,7 @@
|
||||
'addAltNames': true,
|
||||
'addCenter': true,
|
||||
'address_multiline': false,
|
||||
'customButtons': { 'after': _self.button_person(person) }
|
||||
'customButtons': { 'after': _self.button_person_after(person) }
|
||||
}) }}
|
||||
|
||||
{#- 'acps' is for AcCompanyingPeriodS #}
|
||||
@@ -76,12 +81,20 @@
|
||||
<div class="wl-row separator">
|
||||
<div class="wl-col title">
|
||||
|
||||
<div class="date">
|
||||
{% if acp.requestorPerson == person %}
|
||||
<span class="as-requestor badge bg-info" title="{{ 'Requestor'|trans|e('html_attr') }}">
|
||||
{% if acp.step == 'DRAFT' %}
|
||||
<div class="is-draft">
|
||||
<span class="course-draft badge bg-secondary" title="{{ 'course.draft'|trans }}">{{ 'course.draft'|trans }}</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if acp.requestorPerson == person %}
|
||||
<div>
|
||||
<span class="as-requestor badge bg-info" title="{{ 'Requestor'|trans|e('html_attr') }}">
|
||||
{{ 'Requestor'|trans({'gender': person.gender}) }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="date">
|
||||
{% if app != null %}
|
||||
{{ 'Since %date%'|trans({'%date%': app.startDate|format_date('medium') }) }}
|
||||
{% endif %}
|
||||
@@ -94,6 +107,11 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="courseid">
|
||||
{{ 'File number'|trans }} {{ acp.id }}
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
|
||||
@@ -101,17 +119,76 @@
|
||||
{{ issue|chill_entity_render_box }}
|
||||
{% endfor %}
|
||||
|
||||
<ul class="record_actions">
|
||||
<ul class="record_actions record_actions_column">
|
||||
<li>
|
||||
<a href="{{ path('chill_person_accompanying_course_index', { 'accompanying_period_id': acp.id }) }}"
|
||||
class="btn btn-sm btn-outline-primary" title="{{ 'See accompanying period'|trans }}">
|
||||
<i class="fa fa-random fa-fw"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% if acp.currentParticipations|length > 1 %}
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<div class="participants">
|
||||
{{ 'Participants'|trans }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
{% set participating = false %}
|
||||
{% for part in acp.currentParticipations %}
|
||||
{% if part.person.id != person.id %}
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'person', id: part.person.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: part.person|chill_entity_render_string
|
||||
} %}
|
||||
{% else %}
|
||||
{% set participating = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if participating %}
|
||||
{{ 'person.and_himself'|trans({'gender': person.gender}) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if (acp.requestorPerson is not null and acp.requestorPerson.id != person.id) or acp.requestorThirdParty is not null %}
|
||||
<div class="wl-row">
|
||||
<div class="wl-col title">
|
||||
<div>
|
||||
{% if acp.requestorPerson is not null %}
|
||||
{{ 'Requestor'|trans({'gender': acp.requestorPerson.gender}) }}
|
||||
{% else %}
|
||||
{{ 'Requestor'|trans({'gender': 'other'})}}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="wl-col list">
|
||||
{% if acp.requestorThirdParty is not null %}
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'thirdparty', id: acp.requestorThirdParty.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: acp.requestorThirdParty|chill_entity_render_string
|
||||
} %}
|
||||
{% else %}
|
||||
{% include '@ChillMain/OnTheFly/_insert_vue_onthefly.html.twig' with {
|
||||
targetEntity: { name: 'person', id: acp.requestorPerson.id },
|
||||
action: 'show',
|
||||
displayBadge: true,
|
||||
buttonText: acp.requestorPerson|chill_entity_render_string
|
||||
} %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user