mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 11:21:47 -05:00
Show bugs on release pages
This commit is contained in:
parent
4fd744368c
commit
efc9acb106
3 changed files with 59 additions and 2 deletions
|
@ -127,7 +127,7 @@ public List<SelectListItem> Versions
|
||||||
{
|
{
|
||||||
var db = new ApplicationDbContext();
|
var db = new ApplicationDbContext();
|
||||||
var items = new List<SelectListItem>();
|
var items = new List<SelectListItem>();
|
||||||
foreach(var itm in db.Downloads.OrderByDescending(x => x.PostDate))
|
foreach(var itm in db.Downloads.Where(x=>x.Obsolete == false).OrderByDescending(x => x.PostDate))
|
||||||
{
|
{
|
||||||
items.Add(new SelectListItem
|
items.Add(new SelectListItem
|
||||||
{
|
{
|
||||||
|
|
|
@ -12,6 +12,15 @@ public class Download
|
||||||
[Required]
|
[Required]
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
public Bug[] OpenBugs
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return new ApplicationDbContext().Bugs.Where(x => x.ReleaseId == this.Id && x.Open == true).ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,54 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@Html.Markdown(Model.Changelog)
|
@Html.Markdown(Model.Changelog)
|
||||||
|
|
||||||
|
<h4>Reported bugs</h4>
|
||||||
|
|
||||||
|
@if (Model.OpenBugs.Length == 0)
|
||||||
|
{
|
||||||
|
<p>There are no reported bugs to display.</p>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<table class="table">
|
||||||
|
<tr>
|
||||||
|
<th style="width:55%">Bug</th>
|
||||||
|
<th>Urgency</th>
|
||||||
|
<th>Actions</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@foreach (var bug in Model.OpenBugs.OrderByDescending(x=>x.Urgency))
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
@Html.ActionLink(bug.Name, "ViewBug", "Bugs", null, new { id=bug.Id})<br/>
|
||||||
|
Opened by @Html.UserLink(bug.Reporter) at @bug.ReportedAt
|
||||||
|
</td>
|
||||||
|
<th>
|
||||||
|
@switch (bug.Urgency)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
<strong>Minor</strong>
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
<strong>Moderate</strong>
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
<strong>Major</strong>
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
<strong>Critical</strong>
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
</th>
|
||||||
|
<th>
|
||||||
|
<a href="@Url.Action("ViewBug", "Bugs", new {id=bug.Id})" class="btn btn-default"><span class="glyphicon glyphicon-eye-open"></span> View bug</a>
|
||||||
|
</th>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</table>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4">
|
<div class="col-xs-4">
|
||||||
<h3>Download</h3>
|
<h3>Download</h3>
|
||||||
|
|
Loading…
Reference in a new issue