blob: 0584bbcf0c88ac4497b43bc71566e48daf277855 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
@model Project_Unite.Models.BugTag
@{
ViewBag.Title = "Bugtracker";
var tags = new Project_Unite.Models.ApplicationDbContext().BugTags;
}
<h2>Bugtracker</h2>
@{
Html.RenderPartial("~/Views/Bugs/_BugBar.cshtml");
}
<div class="row">
<div class="col-xs-3">
@{
Html.RenderPartial("~/Views/Bugs/_Sidebar.cshtml", tags);
}
</div>
<div class="col-xs-9">
<h3>@Model.Name</h3>
<p>@Model.Description</p>
<p><strong>@Model.Open.Length</strong> open, <strong>@Model.Closed.Length</strong> closed.</p>
@*Open bugs.*@
<table class="table">
<tr>
<th style="width:65%;">Open</th>
<th>Actions</th>
</tr>
@foreach(var open in Model.Open.OrderByDescending(x => x.Urgency))
{
<tr>
<td>
@Html.ActionLink(open.Name, "ViewBug", new { id = open.Id })<br/>
<p>Opened by @Html.UserLink(open.Reporter) at @open.ReportedAt •
@switch (open.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;
default:
<strong>A bug occurred in the bug reporter and thus an urgency couldn't be decided.</strong>
break;
}
</p>
</td>
<td><a href="@Url.Action("CloseBug", new { id = open.Id })" class="btn btn-default"><span class="glyphicon glyphicon-check"></span> Close Bug</a></td>
</tr>
}
</table>
<hr/>
<table class="table">
<tr>
<th style="width:65%;">Closed</th>
<th>Actions</th>
</tr>
@foreach (var open in Model.Closed.OrderByDescending(x => x.Urgency))
{
<tr class="disabled">
<td>
@Html.ActionLink(open.Name, "ViewBug", new { id = open.Id })<br />
<p>
Opened by @Html.UserLink(open.Reporter) at @open.ReportedAt •
@switch (open.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;
default:
<strong>A bug occurred in the bug reporter and thus an urgency couldn't be decided.</strong>
break;
}
•
Closed by @Html.UserLink(open.ClosedBy) at @open.ClosedAt
</p>
</td>
<td><a href="@Url.Action("OpenBug", new { id = open.Id })" class="btn btn-default"><span class="glyphicon glyphicon-unchecked"></span> Reopen Bug</a></td>
</tr>
}
</table>
</div>
</div>
|