diff --git a/Project-Unite/Controllers/DeveloperController.cs b/Project-Unite/Controllers/DeveloperController.cs index 301038d..b380acb 100644 --- a/Project-Unite/Controllers/DeveloperController.cs +++ b/Project-Unite/Controllers/DeveloperController.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; +using Project_Unite.Models; namespace Project_Unite.Controllers { @@ -15,5 +16,11 @@ namespace Project_Unite.Controllers ViewBag.Developer = true; return View(); } + + public ActionResult Releases() + { + var db = new ApplicationDbContext(); + return View(db.Downloads); + } } } \ No newline at end of file diff --git a/Project-Unite/Project-Unite.csproj b/Project-Unite/Project-Unite.csproj index 9fe031a..6e70675 100644 --- a/Project-Unite/Project-Unite.csproj +++ b/Project-Unite/Project-Unite.csproj @@ -539,6 +539,7 @@ + diff --git a/Project-Unite/Views/Developer/Releases.cshtml b/Project-Unite/Views/Developer/Releases.cshtml new file mode 100644 index 0000000..ff41ff0 --- /dev/null +++ b/Project-Unite/Views/Developer/Releases.cshtml @@ -0,0 +1,94 @@ +@model IEnumerable +@{ + ViewBag.Title = "Releases"; + ViewBag.Developer = true; +} + +

Releases

+ + + +

Below is a list of all ShiftOS releases, sorted by date in descending order, categorized by stability.

+ + + +
+
+

Stable releases

+

Stable builds of ShiftOS are generally more trusted - they may not contain all the latest features, but they are also bug-free... mostly.

+ + + + + + + @foreach(var release in Model.Where(x => x.IsStable == true && x.Obsolete == false).OrderByDescending(x => x.PostDate)) + { + + + + + } +
ReleaseActions
+ @if(release.Obsolete==true) + OBSOLETE: + @Html.ActionLink(release.Name, "ViewRelease", "Download", new { id = release.Id }, null)
+

...released by @Html.UserLink(release.ReleasedBy), released on @Model.PostDate

+
+ Watch dev update + @Html.ActionLink("Make Unstable", "MakeUnstable", "Developer", new { id = release.Id }, new { @class = "btn btn-warning" }) + @Html.ActionLink("Toggle Obsolete", "ToggleObsolete", "Developer", new { id = release.Id }, new { @class = "btn btn-warning" }) + @Html.ActionLink("Delete", "Delete", "Developer", new { id = release.Id }, new { @class = "btn btn-danger" }) + + + + + + + + +
+
+
+

Unstable releases

+

Unstable builds are in-between builds of ShiftOS. They are more feature-rich, released faster, but that comes at the cost of stability. These builds may be really buggy. Seriously. I've released some that don't even boot.

+ + + + + + + @foreach (var release in Model.Where(x => x.IsStable == false).OrderByDescending(x => x.PostDate)) + { + + + + + } +
ReleaseActions
+ @if (release.Obsolete == true) + OBSOLETE: + @Html.ActionLink(release.Name, "ViewRelease", "Download", new { id = release.Id }, null)
+

...released by @Html.UserLink(release.ReleasedBy), released on @Model.PostDate

+
+ Watch dev update + @Html.ActionLink("Make Stable", "MakeStable", "Developer", new { id = release.Id }, new { @class = "btn btn-warning" }) + @Html.ActionLink("Toggle Obsolete", "ToggleObsolete", "Developer", new { id = release.Id }, new { @class = "btn btn-warning" }) + @Html.ActionLink("Delete", "Delete", "Developer", new { id = release.Id }, new { @class = "btn btn-danger" }) + + + + + + + + +
+
+
\ No newline at end of file