Merge pull request #5417 from tsiegleauq/agenda-numbered-topics-pdf

Prevent double "TOP" in agenda PDF
This commit is contained in:
Emanuel Schütze 2020-06-15 15:10:22 +02:00 committed by GitHub
commit b5bc855dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 6 deletions

View File

@ -53,16 +53,19 @@ export class TopicRepositoryService extends BaseIsAgendaItemAndListOfSpeakersCon
}
public getTitle = (titleInformation: TopicTitleInformation) => {
return titleInformation.title;
};
public getListTitle = (titleInformation: TopicTitleInformation) => {
if (titleInformation.agenda_item_number && titleInformation.agenda_item_number()) {
return `${titleInformation.agenda_item_number()} · ${titleInformation.title}`;
} else {
return titleInformation.title;
return this.getTitle(titleInformation);
}
};
public getAgendaListTitle = (titleInformation: TopicTitleInformation) => {
// Do not append ' (Topic)' to the title.
return { title: this.getTitle(titleInformation) };
return { title: this.getListTitle(titleInformation) };
};
public getAgendaSlideTitle = (titleInformation: TopicTitleInformation) => {

View File

@ -87,7 +87,7 @@ export class AgendaPdfService {
text: nodeItem.item.item_number
},
{
text: nodeItem.item.contentObject.getListTitle()
text: nodeItem.item.contentObject.getTitle()
}
]
};

View File

@ -68,7 +68,7 @@ export abstract class BaseViewModelWithAgendaItem<
*/
public getProjectorTitle(): ProjectorTitle {
const subtitle = this.item ? this.item.comment : null;
return { title: this.getTitle(), subtitle };
return { title: this.getListTitle(), subtitle };
}
/**

View File

@ -27,7 +27,7 @@
<mat-card *ngIf="topic || editTopic" [ngClass]="editTopic ? 'os-form-card' : 'os-card'">
<div *ngIf="!editTopic">
<h1>{{ topic.getTitle() }}</h1>
<h1>{{ topic.getListTitle() }}</h1>
</div>
<div>
<span *ngIf="!editTopic">