mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-04-20 00:10:24 +00:00
97 lines
No EOL
3.8 KiB
Text
97 lines
No EOL
3.8 KiB
Text
@model IEnumerable<Project_Unite.Models.BugTag>
|
|
@using Project_Unite.Models;
|
|
@{
|
|
var db = new ApplicationDbContext();
|
|
ViewBag.Title = "Bugtracker";
|
|
}
|
|
|
|
<h2>Bugtracker</h2>
|
|
|
|
@{
|
|
Html.RenderPartial("~/Views/Bugs/_BugBar.cshtml");
|
|
}
|
|
|
|
<div class="row">
|
|
<div class="col-xs-4">
|
|
<h4>Bug types</h4>
|
|
|
|
<ul id="tabs" data-tabs="tabs" class="nav nav-stacked nav-pills">
|
|
@foreach(var cat in Model.ToArray())
|
|
{
|
|
string c = "";
|
|
if(cat == Model.First())
|
|
{
|
|
c = "active";
|
|
}
|
|
<li class="@c"><a href="#tp_@cat.Id" data-toggle="tab">@cat.Name (@cat.Open.Length)</a></li>
|
|
}
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="tab-content col-xs-8">
|
|
@foreach(var category in Model.ToArray())
|
|
{
|
|
string c = "tab-pane fade in";
|
|
if(category == Model.First())
|
|
{
|
|
c += " active";
|
|
}
|
|
<div class="@c" id="tp_@category.Id">
|
|
<h2>@category.Name</h2>
|
|
<p>@category.Description</p>
|
|
|
|
<table class="table">
|
|
<tr>
|
|
<th class="width:50%">Open</th>
|
|
<th>Urgency</th>
|
|
<th>Actions</th>
|
|
</tr>
|
|
@foreach(var bug in category.Open.OrderByDescending(x=>x.Urgency))
|
|
{
|
|
<tr>
|
|
<td>
|
|
<div class="modal fade in" id="md_@bug.Id">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h2>View bug</h2>
|
|
</div>
|
|
<div class="modal-body">
|
|
@Html.Partial("~/Views/Bugs/ViewBug.cshtml", new ViewBugViewModel
|
|
{
|
|
BugData = bug,
|
|
Comment = ""
|
|
})
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button data-dissmiss="modal" data-target="#md_@bug.Id" class="btn btn-primary"><span class="glyphicon glyphicon-ok"></span> Done</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<strong><a href="#md_@bug.Id" data-toggle="modal">@bug.Name</a></strong><br/>
|
|
<p>Reported at: @bug.ReportedAt • Reported by: @Html.UserLink(bug.Reporter)</p>
|
|
</td>
|
|
@switch (bug.Urgency)
|
|
{
|
|
case 0:
|
|
<td><strong>Minor</strong></td>
|
|
break;
|
|
case 1:
|
|
<td><strong>Moderate</strong></td>
|
|
break;
|
|
case 2:
|
|
<td class="warning"><sttrong>Major</sttrong></td>
|
|
break;
|
|
case 3:
|
|
<td class="danger"><strong>Critical</strong></td>
|
|
break;
|
|
}
|
|
<td>
|
|
<a class="btn btn-primary" href="@Url.Action("CloseBug", new {id=bug.Id})"><span class="glyphicon glyphicon-ok"></span> Close bug report</a>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</table>
|
|
</div>
|
|
}
|
|
</div>
|
|
</div> |