#72 [templates] link to components when alternative pronouns possible

This commit is contained in:
Andrea Vos 2020-10-12 23:41:32 +02:00
parent 4c0b4d40ce
commit 1c6f56698a

View File

@ -9,12 +9,24 @@
<section>
<div class="alert alert-primary">
<h2 class="text-center mb-0">
<strong>{{ selectedTemplate.name(glue) }}</strong>
<strong v-if="nameOptions.length === 1">
{{ selectedTemplate.name(glue) }}
</strong>
<template v-else>
<template v-for="(nameOption, i) in nameOptions">
<nuxt-link :to="'/' + addSlash(nameOption)">
<strong>
{{ nameOption }}
</strong>
</nuxt-link>
<span v-if="i < nameOptions.length - 1">{{ glue }}</span>
</template>
</template>
</h2>
<p class="h6 small text-center mb-0 mt-2" v-if="selectedTemplate.description">
<em>
({{Array.isArray(selectedTemplate.description)
? ('Formy wymienne: ' + selectedTemplate.description.join(glue))
? ($t('template.alt.header') + ': ' + selectedTemplate.description.join(glue))
: selectedTemplate.description
}})
</em>
@ -110,6 +122,7 @@
glue: ' ' + this.$t('template.or') + ' ',
selectedTemplate,
nameOptions: selectedTemplate.nameOptions(),
templateGroup: templateLibrary.find(selectedTemplate),
counter: 0,