public void Output([NotNull] GetLogbookEntryDetailOutput interactorOutput)
        {
            if (interactorOutput == null)
            {
                throw new ArgumentNullException(nameof(interactorOutput));
            }

            viewModel = new MvcLogbookDetailViewModel(
                interactorOutput.AllowEdit,
                interactorOutput.LogbookEntryId,
                interactorOutput.Title,
                interactorOutput.IsFavorite,
                interactorOutput.IsPublished,
                interactorOutput.Teaser,
                interactorOutput.Text,
                interactorOutput.ExternalPhotoAlbumUrl,
                interactorOutput.EventName,
                interactorOutput.OriginalAuthorName,
                interactorOutput.OriginalAuthorEmail,
                interactorOutput.OriginalAuthorAvatarId,
                interactorOutput.EditorName,
                interactorOutput.EditorEmail,
                interactorOutput.EditorAvatarId,
                interactorOutput.CreatedAt.ToStringSwissDateTime(),
                interactorOutput.ModifiedAt?.ToStringSwissDateTime(),
                detailsUrlGenerator.GenerateEditUrl(interactorOutput.LogbookEntryId),
                detailsUrlGenerator.GenerateUnPublishUrl(interactorOutput.LogbookEntryId),
                detailsUrlGenerator.GeneratePublishUrl(interactorOutput.LogbookEntryId),
                detailsUrlGenerator.GenerateDeleteUrl(interactorOutput.LogbookEntryId),
                relativeUrlGenerator.GenerateEventUrl(interactorOutput.EventId),
                detailsUrlGenerator.GenerateTeaserImageUrl(interactorOutput.TeaserImageIdentifier)
                );
        }
Esempio n. 2
0
        public void Output(GetLogbookEntryDetailOutput interactorOutput)
        {
            if (interactorOutput == null)
            {
                throw new ArgumentNullException(nameof(interactorOutput));
            }

            viewModel = new LogbookEditViewModel(
                interactorOutput.LogbookEntryId,
                interactorOutput.IsFavorite,
                null,
                interactorOutput.Title,
                interactorOutput.Teaser,
                interactorOutput.Text,
                interactorOutput.ExternalPhotoAlbumUrl,
                interactorOutput.CreatedAt);
        }