diff options
| author | Michael <[email protected]> | 2017-04-05 20:38:55 -0400 |
|---|---|---|
| committer | Michael <[email protected]> | 2017-04-05 20:38:55 -0400 |
| commit | 76df9153cbf52b192d1832488352ce02deaaf0b4 (patch) | |
| tree | 4c4e5ed6f1e91428c4b8bbaab2563fa860605c2d /Project-Unite | |
| parent | ae757d47d51a57f83a43a527481d01f63b9fc741 (diff) | |
| download | project-unite-76df9153cbf52b192d1832488352ce02deaaf0b4.tar.gz project-unite-76df9153cbf52b192d1832488352ce02deaaf0b4.tar.bz2 project-unite-76df9153cbf52b192d1832488352ce02deaaf0b4.zip | |
"View Release" page
Diffstat (limited to 'Project-Unite')
| -rw-r--r-- | Project-Unite/Controllers/DownloadController.cs | 9 | ||||
| -rw-r--r-- | Project-Unite/Project-Unite.csproj | 1 | ||||
| -rw-r--r-- | Project-Unite/Views/Download/ViewRelease.cshtml | 47 |
3 files changed, 57 insertions, 0 deletions
diff --git a/Project-Unite/Controllers/DownloadController.cs b/Project-Unite/Controllers/DownloadController.cs index 58e3c36..fc03f2b 100644 --- a/Project-Unite/Controllers/DownloadController.cs +++ b/Project-Unite/Controllers/DownloadController.cs @@ -15,5 +15,14 @@ namespace Project_Unite.Controllers var db = new ApplicationDbContext(); return View(db.Downloads); } + + public ActionResult ViewRelease(string id) + { + var db = new ApplicationDbContext(); + var release = db.Downloads.Where(x => x.Id == id); + if (release == null) + return new HttpStatusCodeResult(404); + return View(release); + } } }
\ No newline at end of file diff --git a/Project-Unite/Project-Unite.csproj b/Project-Unite/Project-Unite.csproj index afb2d1d..49bdef7 100644 --- a/Project-Unite/Project-Unite.csproj +++ b/Project-Unite/Project-Unite.csproj @@ -541,6 +541,7 @@ <Content Include="Views\Developer\Index.cshtml" /> <Content Include="Views\Developer\Releases.cshtml" /> <Content Include="Views\Developer\AddRelease.cshtml" /> + <Content Include="Views\Download\ViewRelease.cshtml" /> </ItemGroup> <ItemGroup> <Folder Include="App_Data\" /> diff --git a/Project-Unite/Views/Download/ViewRelease.cshtml b/Project-Unite/Views/Download/ViewRelease.cshtml new file mode 100644 index 0000000..32c0fdf --- /dev/null +++ b/Project-Unite/Views/Download/ViewRelease.cshtml @@ -0,0 +1,47 @@ +@model Project_Unite.Models.Download +@{ + ViewBag.Title = Model.Name; +} + +<h2>@Model.Name</h2> + +<p>Released by @Html.UserLink(Model.ReleasedBy) at @Model.PostDate - + + @if (Model.IsStable) + { + <span class="glyphicon glyphicon-star"></span> <strong>This build is stable!</strong> + } + else + { + <span class="glyphicon glyphicon-star-empty"></span> <strong>This build is unstable.</strong> + } + </p> + +<div class="row"> + <div class="col-xs-8"> + @if (!string.IsNullOrWhiteSpace(Model.DevUpdateId)) + { + <iframe src="http://youtube.com/embed/@Model.DevUpdateId" frameborder="0" allowfullscreen autoplay="true" style="width:100%"></iframe> + + } + <img src="@Model.ScreenshotUrl" style="width:auto;height:auto;max-width:100%" /> + + @Html.Markdown(Model.Changelog) + </div> + <div class="col-xs-4"> + <h3>Download</h3> + + <a href="@Model.DownloadUrl" class="btn btn-default"><span class="glyphicon glyphicon-arrow-down"></span> Download .ZIP</a> + + <p>At ShiftOS, we strive to make your experience in the multi-user domain as reliable as possible.</p> + <p>If you have any issues with this build, please let us know. Also, to find out a bit more about the build, if you haven't already, check out the details to the left!</p> + + @if (Model.Obsolete) + { + <h4>This build is obsolete!</h4> + + <p>We no longer support this build, and thus, any issues with this build that arise as we develop the game further will not be fixed. Consider picking up a more up-to-date build?</p> + } + </div> +</div> + |
