Merge pull request #4495 from FinnStutzenstein/viewItemTitle
ViewItem title (fixes #4464)
This commit is contained in:
commit
3684701ab6
@ -78,16 +78,6 @@ export class ItemRepositoryService extends BaseRepository<ViewItem, Item> {
|
|||||||
const viewItem = new ViewItem(item, contentObject);
|
const viewItem = new ViewItem(item, contentObject);
|
||||||
viewItem.getVerboseName = this.getVerboseName;
|
viewItem.getVerboseName = this.getVerboseName;
|
||||||
viewItem.getTitle = () => {
|
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} · ` : '';
|
const numberPrefix = viewItem.itemNumber ? `${viewItem.itemNumber} · ` : '';
|
||||||
|
|
||||||
if (viewItem.contentObject) {
|
if (viewItem.contentObject) {
|
||||||
@ -99,6 +89,7 @@ export class ItemRepositoryService extends BaseRepository<ViewItem, Item> {
|
|||||||
return numberPrefix + repo.getAgendaTitleWithType(viewItem);
|
return numberPrefix + repo.getAgendaTitleWithType(viewItem);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
viewItem.getListTitle = viewItem.getTitle;
|
||||||
return viewItem;
|
return viewItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</os-head-bar>
|
</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">
|
<mat-card class="speaker-card" *ngIf="viewItem">
|
||||||
<!-- List of finished speakers -->
|
<!-- List of finished speakers -->
|
||||||
|
@ -111,9 +111,9 @@ export class ViewItem extends BaseViewModel {
|
|||||||
/**
|
/**
|
||||||
* This is set by the repository
|
* This is set by the repository
|
||||||
*/
|
*/
|
||||||
public getVerboseName;
|
public getVerboseName: () => string;
|
||||||
public getTitle;
|
public getTitle: () => string;
|
||||||
public getListTitle;
|
public getListTitle: () => string;
|
||||||
|
|
||||||
public listOfSpeakersSlide: ProjectorElementBuildDeskriptor = {
|
public listOfSpeakersSlide: ProjectorElementBuildDeskriptor = {
|
||||||
getBasicProjectorElement: options => ({
|
getBasicProjectorElement: options => ({
|
||||||
|
Loading…
Reference in New Issue
Block a user