Commit 66a266b7 authored by Jean Rabreau's avatar Jean Rabreau
Browse files

馃┕restore project managers names on public pages

parent 24ea9329
......@@ -590,7 +590,7 @@ export const en_US = {
dismissManager: "Dismiss @.lower:project.manager",
removeMember: "Remove from project",
subtitles: {
managers: "{label} : {managers}",
managers: "{label}: {names}",
},
contributor: "Contributor",
search: "@:search.title in the @.lower:project.label",
......@@ -606,6 +606,7 @@ export const en_US = {
generalInfo: {
updated: "General info of this set have been updated",
},
initiator: "Started by:",
publisher: "Publisher",
template: "Metadata template",
count: "No set | {count} set | {count} sets",
......
......@@ -604,7 +604,7 @@ export const fr_FR = {
dismissManager: "D茅stituer @.lower:project.manager",
removeMember: "Retirer du projet",
subtitles: {
managers: "{label} : {managers}",
managers: "{label} : {names}",
},
contributor: "Contributeur",
search: "@:search.title dans le @.lower:project.label",
......@@ -621,6 +621,7 @@ export const fr_FR = {
updated: "Les informations g茅n茅rales de l'ensemble ont bien 茅t茅 mises 脿 jour",
},
publisher: "脡diteur",
initiator: "Initi茅 par : {name}",
template: "Mod猫le de m茅tadonn茅es",
count: "Aucun ensemble | {count} ensemble | {count} ensembles",
label: "Ensemble",
......
......@@ -8,7 +8,7 @@
prepend-inner-icon="mdi-magnify"
@change="onSearch"
/>
<v-tabs v-model="tab">
<v-tabs v-model="activeTab">
<v-tab
v-for="tab in tabs"
:key="tab.id"
......@@ -17,7 +17,7 @@
</v-tab>
</v-tabs>
<v-divider />
<v-tabs-items v-model="tab">
<v-tabs-items v-model="activeTab">
<v-tab-item
v-for="tab in tabs"
:key="tab.id"
......@@ -106,7 +106,7 @@ export default {
data: function() {
return {
query: '',
tab: undefined,
activeTab: undefined,
tabsRoot: [ 'project', 'set' ],
tabs: {
project: {
......@@ -182,16 +182,17 @@ export default {
subtitles: function() {
let subtitles;
if (mode === 'project') {
const managers = result.managers.map(m => m.name).join(', ');
const names = result.managers.map(m => m.name).join(', ');
const label = that.$tc('project.managers', result.managers.length)
subtitles = [
`${that.$t('project.subtitles.managers', { managers, label: that.$tc('project.managers', result.managers.length) })}`,
`${that.$tc('set.count', result.publicSetsCount)}`,
`${that.$tc('item.count', result.publicItemsCount)}`,
that.$t('project.subtitles.managers', { names, label }),
that.$tc('set.count', result.publicSetsCount),
that.$tc('item.count', result.publicItemsCount),
];
} else if (mode === 'set') {
subtitles = [
`${that.$t('item.fields.creator.label')} : ${result.creator.name}`,
`${that.$tc('item.count', result.publicItemsCount)}`,
that.$t('set.initiator', { name: result.creator.name}),
that.$tc('item.count', result.publicItemsCount),
];
}
return subtitles;
......
......@@ -333,11 +333,12 @@ export default {
crudListItems() {
return this.projectList.pageContent
.map((project) => {
const managers = project.managers.map(m => m.name).join(', ');
const names = project.managers.map(m => m.name).join(', ');
const label = this.$tc('project.managers', project.managers.length)
return {
id: project.id,
title: this.textTruncate(project.name, 50),
subtitle: `${this.$t('project.subtitles.managers', { managers, label: this.$tc('project.managers', project.managers.length) })}`,
subtitle: this.$t('project.subtitles.managers', { names, label }),
description: this.textTruncate(this.stripHtml(project.description), 150),
thumbnail: project.thumbnails.embed,
to: { name: 'projectPublic', params: { projectId: project.id } },
......
......@@ -80,12 +80,13 @@ export default {
computed: {
...mapState('project', { project: 'current' }),
itemHeader() {
const managers = this.project.managers.map(m => m.name).join(', ');
const names = this.project.managers.map(m => m.name).join(', ');
const label = this.$tc('project.managers', this.project.managers.length)
return {
thumbnail: this.project.thumbnails.m,
title: this.project.name,
subtitles: [
`${this.$t('project.subtitles.managers', { managers, label: this.$tc('project.managers', this.project.managers.length) })}`,
this.$t('project.subtitles.managers', { names, label }),
],
};
},
......
......@@ -69,12 +69,13 @@ export default {
computed: {
...mapState('community', ['currentProject', 'setList']),
project() {
const managers = this.currentProject.managers.map(m => m.name).join(', ');
const names = this.currentProject.managers.map(m => m.name).join(', ');
const label = this.$tc('project.managers', this.currentProject.managers.length)
return {
thumbnail: this.currentProject.thumbnails.m,
title: this.currentProject.name,
subtitles: [
`${this.$t('project.subtitles.managers', { managers, label: this.$tc('project.managers', this.currentProject.managers.length) })}`,
this.$t('project.subtitles.managers', { names, label }),
],
description: this.currentProject.description,
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment