ViewItem title (fixes #4464)
This commit is contained in:
parent
0419ea629f
commit
aa81bf38c3
@ -78,16 +78,6 @@ export class ItemRepositoryService extends BaseRepository<ViewItem, Item> {
|
||||
const viewItem = new ViewItem(item, contentObject);
|
||||
viewItem.getVerboseName = this.getVerboseName;
|
||||
viewItem.getTitle = () => {
|
||||
if (viewItem.contentObject) {
|
||||
return viewItem.contentObject.getAgendaTitle();
|
||||
} else {
|
||||
const repo = this.collectionStringMapperService.getRepository(
|
||||
viewItem.item.content_object.collection
|
||||
) as BaseAgendaContentObjectRepository<any, any>;
|
||||
return repo.getAgendaTitle(viewItem);
|
||||
}
|
||||
};
|
||||
viewItem.getListTitle = () => {
|
||||
const numberPrefix = viewItem.itemNumber ? `${viewItem.itemNumber} · ` : '';
|
||||
|
||||
if (viewItem.contentObject) {
|
||||
@ -99,6 +89,7 @@ export class ItemRepositoryService extends BaseRepository<ViewItem, Item> {
|
||||
return numberPrefix + repo.getAgendaTitleWithType(viewItem);
|
||||
}
|
||||
};
|
||||
viewItem.getListTitle = viewItem.getTitle;
|
||||
return viewItem;
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
</os-head-bar>
|
||||
|
||||
<h1 class="title on-transition-fade" *ngIf="viewItem">{{ viewItem.contentObject.getTitle() }}</h1>
|
||||
<h1 class="title on-transition-fade" *ngIf="viewItem">{{ viewItem.getTitle() }}</h1>
|
||||
|
||||
<mat-card class="speaker-card" *ngIf="viewItem">
|
||||
<!-- List of finished speakers -->
|
||||
|
@ -111,9 +111,9 @@ export class ViewItem extends BaseViewModel {
|
||||
/**
|
||||
* This is set by the repository
|
||||
*/
|
||||
public getVerboseName;
|
||||
public getTitle;
|
||||
public getListTitle;
|
||||
public getVerboseName: () => string;
|
||||
public getTitle: () => string;
|
||||
public getListTitle: () => string;
|
||||
|
||||
public listOfSpeakersSlide: ProjectorElementBuildDeskriptor = {
|
||||
getBasicProjectorElement: options => ({
|
||||
|
Loading…
Reference in New Issue
Block a user