mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
first conditionalities added analog to twig template
This commit is contained in:
parent
6bb5440220
commit
166144e57e
@ -5,8 +5,16 @@
|
|||||||
<div>
|
<div>
|
||||||
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
|
<label class="col-form-label">{{ $tc('persons_associated.counter', counter) }}</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<participation-item
|
||||||
|
v-for="participation in participations"
|
||||||
|
v-bind:participation="participation"
|
||||||
|
v-bind:key="participation.id"
|
||||||
|
@remove="removeParticipation"
|
||||||
|
@close="closeParticipation">
|
||||||
|
</participation-item>
|
||||||
|
|
||||||
<table class="table table-bordered table-striped border-dark align-middle" v-if="participations.length > 0">
|
<!-- <table class="table table-bordered table-striped border-dark align-middle" v-if="participations.length > 0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="chill-orange">{{ $t('persons_associated.name') }}</th>
|
<th class="chill-orange">{{ $t('persons_associated.name') }}</th>
|
||||||
@ -24,7 +32,7 @@
|
|||||||
@close="closeParticipation">
|
@close="closeParticipation">
|
||||||
</participation-item>
|
</participation-item>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table> -->
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<add-persons
|
<add-persons
|
||||||
|
@ -1,8 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<tr>
|
|
||||||
|
<person-render-box
|
||||||
|
:options="{
|
||||||
|
addInfo : false,
|
||||||
|
addId : true,
|
||||||
|
addEntity: false,
|
||||||
|
addLink: false,
|
||||||
|
addAltNames: false,
|
||||||
|
addAge : false,
|
||||||
|
hLevel : 1
|
||||||
|
}"
|
||||||
|
:participation="participation"
|
||||||
|
></person-render-box>
|
||||||
|
<!-- <tr>
|
||||||
<td>
|
<td>
|
||||||
<!-- {{ participation.person.firstName }}
|
{{ participation.person.firstName }}
|
||||||
{{ participation.person.lastName }} -->
|
{{ participation.person.lastName }}
|
||||||
<person-render-box
|
<person-render-box
|
||||||
v-bind:options="options"
|
v-bind:options="options"
|
||||||
v-bind:participation="participation"
|
v-bind:participation="participation"
|
||||||
@ -30,12 +43,12 @@
|
|||||||
action="edit">
|
action="edit">
|
||||||
</on-the-fly>
|
</on-the-fly>
|
||||||
</li>
|
</li>
|
||||||
<!--li>
|
li>
|
||||||
<button class="btn btn-delete"
|
<button class="btn btn-delete"
|
||||||
:title="$t('action.delete')"
|
:title="$t('action.delete')"
|
||||||
@click.prevent="$emit('remove', participation)">
|
@click.prevent="$emit('remove', participation)">
|
||||||
</button>
|
</button>
|
||||||
</li-->
|
</li
|
||||||
<li>
|
<li>
|
||||||
<button v-if="!participation.endDate"
|
<button v-if="!participation.endDate"
|
||||||
class="btn btn-remove"
|
class="btn btn-remove"
|
||||||
@ -46,7 +59,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@ -66,7 +79,7 @@ export default {
|
|||||||
PersonRenderBox: {
|
PersonRenderBox: {
|
||||||
participation : 'participation',
|
participation : 'participation',
|
||||||
options : {
|
options : {
|
||||||
addInfo : true,
|
addInfo : false,
|
||||||
addId : true,
|
addId : true,
|
||||||
addAge : false,
|
addAge : false,
|
||||||
hLevel : 1
|
hLevel : 1
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
|
|
||||||
<!-- NAME TAG -->
|
<!-- NAME TAG -->
|
||||||
<div class="denomination **h_level**">
|
<div class="denomination **h_level**">
|
||||||
|
|
||||||
<!-- NAME IF ADD LINK AND PERMISSION GRANTED -->
|
<!-- NAME IF ADD LINK AND PERMISSION GRANTED -->
|
||||||
<a href="#">
|
<a v-if="this.options.addLink == true" href="#">
|
||||||
<span class="firstname">{{ participation.person.firstName }}</span>
|
<span class="firstname">{{ participation.person.firstName }}</span>
|
||||||
<span class="lastname">{{ participation.person.lastName }}</span>
|
<span class="lastname">{{ participation.person.lastName }}</span>
|
||||||
<!-- IF ALT NAMES -->
|
<!-- IF ALT NAMES -->
|
||||||
<span class="altnames">
|
<span v-if="this.options.addAltNames == true" class="altnames">
|
||||||
<!-- LOOP THROUGH ALT NAMES -->
|
<!-- LOOP THROUGH ALT NAMES -->
|
||||||
<span class="altname altname-**key**">**label**</span>
|
<span class="altname altname-**key**">**label**</span>
|
||||||
<!-- END LOOP -->
|
<!-- END LOOP -->
|
||||||
@ -25,21 +25,21 @@
|
|||||||
<span class="firstname">{{ participation.person.firstName }}</span>
|
<span class="firstname">{{ participation.person.firstName }}</span>
|
||||||
<span class="lastname">{{ participation.person.lastName }}</span>
|
<span class="lastname">{{ participation.person.lastName }}</span>
|
||||||
<!-- IF ALT NAMES -->
|
<!-- IF ALT NAMES -->
|
||||||
<span class="altnames">
|
<span v-if="this.options.addAltNames == true" class="altnames">
|
||||||
<!-- LOOP THROUGH ALT NAMES -->
|
<!-- LOOP THROUGH ALT NAMES -->
|
||||||
<span class="altname altname-**key**">**label**</span>
|
<span class="altname altname-**key**">**label**</span>
|
||||||
<!-- END LOOP -->
|
<!-- END LOOP -->
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- IF ADD ENTITY OPTION -->
|
<!-- IF ADD ENTITY OPTION -->
|
||||||
<span class="badge rounded-pill bg-secondary">**Person object?**</span>
|
<span v-if="this.options.addEntity == true" class="badge rounded-pill bg-secondary">Person</span>
|
||||||
<span class="id-number" title="n° participation.person.id">{{ participation.person.id }}</span>
|
<span v-if="this.options.addId == true" class="id-number" title="n° participation.person.id">{{ participation.person.id }}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- END NAME TAG -->
|
<!-- END NAME TAG -->
|
||||||
|
|
||||||
<!-- BIRTHDATE / DEATHDATE AND AGE -->
|
<!-- BIRTHDATE / DEATHDATE AND AGE -->
|
||||||
<p class="moreinfo">
|
<p v-if="this.options.addInfo == true" class="moreinfo">
|
||||||
<i class="fa fa-fw **gender**" title="**gender title**"></i>
|
<i class="fa fa-fw **gender**" title="**gender title**"></i>
|
||||||
<time datetime="13/05/1867" title="**birthdate**">
|
<time datetime="13/05/1867" title="**birthdate**">
|
||||||
{{ participation.person.birthdate }}
|
{{ participation.person.birthdate }}
|
||||||
@ -86,18 +86,16 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "PersonRenderBox",
|
name: "PersonRenderBox",
|
||||||
props: [
|
props: ['participation', 'options'],
|
||||||
'options',
|
|
||||||
'participation'
|
|
||||||
],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.item-row{
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user