mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
vue person renderbox, fix title
This commit is contained in:
parent
f1773997ce
commit
85538f74b7
@ -28,16 +28,20 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p v-if="options.addInfo === true" class="moreinfo">
|
<p v-if="options.addInfo === true" class="moreinfo">
|
||||||
<i :class="'fa fa-fw ' + getGenderIcon" title="{{ getGender }}"></i>
|
<i :class="'fa fa-fw ' + getGenderIcon" :title="$t(getGender)"></i>
|
||||||
<time v-if="person.birthdate && !person.deathdate" datetime="{{ person.birthdate }}" title="{{ birthdate }}">
|
|
||||||
|
<time v-if="person.birthdate && !person.deathdate" :datetime="person.birthdate" :title="birthdate">
|
||||||
{{ $t(getGenderTranslation) + ' ' + $d(birthdate, 'text') }}
|
{{ $t(getGenderTranslation) + ' ' + $d(birthdate, 'text') }}
|
||||||
</time>
|
</time>
|
||||||
<time v-else-if="person.birthdate && person.deathdate" datetime="{{ person.deathdate }}" title="{{ person.deathdate }}">
|
|
||||||
|
<time v-else-if="person.birthdate && person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
||||||
{{ birthdate }} - {{ deathdate }}
|
{{ birthdate }} - {{ deathdate }}
|
||||||
</time>
|
</time>
|
||||||
<time v-else-if="person.deathdate" datetime="{{ person.deathdate }}" title="{{ person.deathdate }}">
|
|
||||||
|
<time v-else-if="person.deathdate" :datetime="person.deathdate" :title="person.deathdate">
|
||||||
{{ $t('renderbox.deathdate') + ' ' + deathdate }}
|
{{ $t('renderbox.deathdate') + ' ' + deathdate }}
|
||||||
</time>
|
</time>
|
||||||
|
|
||||||
<span v-if="options.addAge && person.birthdate" class="age">{{ getAge }} {{ $t('renderbox.years_old')}}</span>
|
<span v-if="options.addAge && person.birthdate" class="age">{{ getAge }} {{ $t('renderbox.years_old')}}</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -141,9 +145,6 @@ export default {
|
|||||||
},
|
},
|
||||||
props: ['person', 'options', 'render', 'returnPath'],
|
props: ['person', 'options', 'render', 'returnPath'],
|
||||||
computed: {
|
computed: {
|
||||||
getGenderTranslation: function() {
|
|
||||||
return this.person.gender === 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
|
|
||||||
},
|
|
||||||
isMultiline: function() {
|
isMultiline: function() {
|
||||||
if(this.options.isMultiline){
|
if(this.options.isMultiline){
|
||||||
return this.options.isMultiline
|
return this.options.isMultiline
|
||||||
@ -154,6 +155,12 @@ export default {
|
|||||||
getGenderIcon: function() {
|
getGenderIcon: function() {
|
||||||
return this.person.gender === 'woman' ? 'fa-venus' : this.person.gender === 'man' ? 'fa-mars' : 'fa-neuter';
|
return this.person.gender === 'woman' ? 'fa-venus' : this.person.gender === 'man' ? 'fa-mars' : 'fa-neuter';
|
||||||
},
|
},
|
||||||
|
getGenderTranslation: function() {
|
||||||
|
return this.person.gender === 'woman' ? 'renderbox.birthday.woman' : 'renderbox.birthday.man';
|
||||||
|
},
|
||||||
|
getGender() {
|
||||||
|
return this.person.gender === 'woman' ? 'person.gender.woman' : this.person.gender === 'man' ? 'person.gender.man' : 'person.gender.neuter';
|
||||||
|
},
|
||||||
birthdate: function(){
|
birthdate: function(){
|
||||||
if(this.person.birthdate !== null){
|
if(this.person.birthdate !== null){
|
||||||
const date = new Date(this.person.birthdate.datetime);
|
const date = new Date(this.person.birthdate.datetime);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user