summaryrefslogtreecommitdiff
blob: 6a71c0676696462cd47d68d3c9b92852de09ca7c (plain)
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
<!DOCTYPE html>
<html lang="en">
{{template "head"}}
<body>
{{template "header" .}}

<style>
    td:hover {
        cursor: pointer;
    }
</style>

<div class="container mb-5">
    <div class="row">
        <div class="col-12">


           <h1>Search Results for: "{{.SearchQuery}}"</h1>

            <table id="table_id" class="requests-data-table table table-hover">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>Title</th>
                    <th>Requester</th>
                    <th>Date</th>
                    <th>Bug Ready</th>
                    <th>Approved</th>
                    <th>Workflow</th>
                    <th>Permissions</th>
                </tr>
                </thead>
                <tbody>

                {{ range .GLSAs}}
                    <tr>
                        <td>{{.Id}}</td>
                        <td>{{.Title}}</td>
                        <td>{{.Creator.Nick}}</td>
                        <td>{{.Created}}</td>
                        <td>
                            <span class="badge badge-secondary float-right mr-2" style="background: none;border: 1px solid {{if .Status.BugReady }}green{{else}}darkred{{end}};padding-top:4px!important;padding-bottom:1.6px;">
                                <svg class="" style="width:13px;height:13px" viewBox="0 0 24 24">
                                    <path fill="{{if .Status.BugReady }}green{{else}}darkred{{end}}" d="M20,8H17.19C16.74,7.2 16.12,6.5 15.37,6L17,4.41L15.59,3L13.42,5.17C12.96,5.06 12.5,5 12,5C11.5,5 11.05,5.06 10.59,5.17L8.41,3L7,4.41L8.62,6C7.87,6.5 7.26,7.21 6.81,8H4V10H6.09C6.03,10.33 6,10.66 6,11V12H4V14H6V15C6,15.34 6.03,15.67 6.09,16H4V18H6.81C8.47,20.87 12.14,21.84 15,20.18C15.91,19.66 16.67,18.9 17.19,18H20V16H17.91C17.97,15.67 18,15.34 18,15V14H20V12H18V11C18,10.66 17.97,10.33 17.91,10H20V8M16,15A4,4 0 0,1 12,19A4,4 0 0,1 8,15V11A4,4 0 0,1 12,7A4,4 0 0,1 16,11V15M14,10V12H10V10H14M10,14H14V16H10V14Z" />
                                </svg>
                                <span class="" style="color:{{if .Status.BugReady }}green{{else}}darkred{{end}};">{{if .Status.BugReady }}READY{{else}}NOT READY{{end}}</span>
                            </span>

                        </td>
                        <td>
                            <span class="badge badge-secondary float-right mr-2" style="background: none;border: 1px solid {{if eq .Status.Approval "declined" }}darkred{{else if eq .Status.Approval "approved"}}green{{else if eq .Status.Approval "comments"}}orange{{else}}grey{{end}};">
                                <i class="fa fa-circle mr-1" aria-hidden="true" style="font-size: 0.8rem;color: {{if eq .Status.Approval "declined" }}darkred{{else if eq .Status.Approval "approved"}}green{{else if eq .Status.Approval "comments"}}orange{{else}}grey{{end}};"></i>
                                <span class="text-uppercase" style="color:{{if eq .Status.Approval "declined" }}darkred{{else if eq .Status.Approval "approved"}}green{{else if eq .Status.Approval "comments"}}orange{{else}}grey{{end}};">{{.Status.Approval}}</span>
                            </span>
                        </td>
                        <td>
                            <span class="badge badge-danger float-right mr-2" style="background: none;border: 1px solid {{if eq .Status.WorkflowStatus "commented" }}blue{{else if eq .Status.WorkflowStatus "own"}}green{{else if eq .Status.WorkflowStatus "approved"}}green{{else}}darkred{{end}};">
                                <i class="fa {{if eq .Status.WorkflowStatus "commented" }}fa-comments-o{{else if eq .Status.WorkflowStatus "own"}}fa-user{{else if eq .Status.WorkflowStatus "approved"}}fa-check-circle-o{{else}}fa-times-circle{{end}} mr-1" aria-hidden="true" style="font-size: 0.8rem;color: {{if eq .Status.WorkflowStatus "commented" }}blue{{else if eq .Status.WorkflowStatus "own"}}green{{else if eq .Status.WorkflowStatus "approved"}}green{{else}}darkred{{end}};"></i>
                                <span class="text-uppercase" style="color:{{if eq .Status.WorkflowStatus "commented" }}blue{{else if eq .Status.WorkflowStatus "own"}}green{{else if eq .Status.WorkflowStatus "approved"}}green{{else}}darkred{{end}};">{{.Status.WorkflowStatus}}</span>
                            </span>
                        </td>
                        <td>
                            <span class="badge badge-secondary float-right" style="background: none;border: 1px solid {{ if eq .Status.Permission "public"}}green{{else}}black{{end}};">
                                <i class="fa {{ if eq .Status.Permission "public"}}fa-globe{{else}}fa-user-secret{{end}} mr-1" aria-hidden="true" style="font-size: 0.8rem;color: {{ if eq .Status.Permission "public"}}green{{else}}black{{end}};"></i>
                                <span style="color: {{ if eq .Status.Permission "public"}}green{{else}}black{{end}};">{{ if eq .Status.Permission "public"}}PUBLIC{{else}}CONFIDENTAL{{end}}</span>
                            </span>
                        </td>
                    </tr>
                {{end}}
                </tbody>
            </table>


        </div>
    </div>
</div>



{{template "footer" .}}


</body>
</html>