public IActionResult Details(string version)
        {
            var release = _changelogData.Get(version);

            if (release == null)
            {
                return(RedirectToAction(nameof(Index)));
            }

            var model = new DetailViewModel()
            {
                PageTitle = "Details - Version " + version,
                Release   = _mapper.Map <ReleaseViewModel>(release)
            };

            return(View(model));
        }
Exemple #2
0
        public IActionResult Details(string version)
        {
            var release = _changelogData.Get(version);

            if (release == null)
            {
                return(RedirectToAction(nameof(Index)));
            }

            var localizedString = _localizer[SharedResources.Sitemap.ChangelogDetails];
            var model           = new DetailViewModel()
            {
                PageTitle = $"{localizedString} - {version}",
                Release   = _mapper.Map <ReleaseViewModel>(release)
            };

            return(View(model));
        }
        public IActionResult Changelog(string version)
        {
            var model = _mapper.Map <ReleaseViewModel>(_changelogData.Get(version));

            return(Json(model));
        }