/
scoreboard.html
120 lines (117 loc) · 4.43 KB
/
scoreboard.html
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
111
112
113
114
115
116
117
118
119
120
{% extends "base.html" %}
{% load gravatar %}
{% load static %}
{% load humanize %}
{% block style %}
{% include "includes/sidenav.html" %}
<style>
.alt-img {
padding-top: 25px;
width: 75px;
filter: blur(2px);
-webkit-filter: blur(2px);
display: none;
}
.table td,
.table th {
text-align: center;
vertical-align: middle !important;
}
.table a {
text-decoration: none;
}
thead {
background: #73DC69;
color: white;
}
.bottom-right {
position: absolute;
bottom: 10px;
right: 15px;
}
</style>
{% endblock style %}
{% block content %}
<script src="{% static "js/jquery.tablesorter.js" %}"></script>
<script>
$(function (load) {
$('#keywords').tablesorter();
});
</script>
<div class="bottom-right">
<a href="https://github.com/OWASP-BLT/BLT/blob/main/website/templates/scoreboard.html">
<i class="fab fa-github"></i>
</a>
<a href="https://www.figma.com/file/s0xuxeU6O2guoWEfA9OElZ/Design?node-id=1307%3A653&t=pqxWpF3hcYxjEDrs-1">
<i class="fab fa-figma"></i>
</a>
</div>
<div class="row">
<div class="col-lg-6">
<h2 class="page-header">Company Scoreboard</h2>
</div>
</div>
<div class="row">
<div class="col-lg-10 col-lg-offset-1">
<table id="keywords"
class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Company</th>
<th>Company Name</th>
<th>Open Issues</th>
<th>Closed Issues</th>
<th>Email Event</th>
<th>Time of Last Event</th>
<th>Top Company Tester</th>
</tr>
</thead>
<tbody>
{% for domain in scoreboard %}
<tr>
<td height="80px">
<a href="{% url 'domain' slug=domain.name %}">
<img src="{{ domain.get_logo }}"
alt="{{ domain.name }}"
onerror="this.onerror=null; this.style.display='none';this.parentNode.childNodes[3].style.display='block';"
width="80px"
height="80px">
<img src="{% static 'img/logo-small-transparent.png' %}"
class="alt-img"
alt="No logo found"
width="80px"
height="80px">
</a>
</td>
<td class="text-capitalize">{{ domain.get_name }}</td>
<td>{{ domain.open_issues|length }}</td>
<td>{{ domain.closed_issues|length }}</td>
<td class="text-capitalize">{{ domain.email_event }}</td>
<td>{{ domain.modified|timesince }} ago</td>
<td class="text-capitalize">
<a href="{% url 'profile' slug=domain.top_tester %}">{{ domain.top_tester|default:"" }}</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
<div>
{% if is_paginated %}
<div class="col-md-12">
<div class="text-center">
{% if page_obj.has_previous %}
<a href="?page={{ page_obj.previous_page_number }}{% if user %}&user={{ user }}{% endif %}"
class="btn btn-default">Prev</a>
{% endif %}
<span>Page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}</span>
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}{% if user %}&user={{ user }}{% endif %}"
class="btn btn-default">Next</a>
{% endif %}
</div>
</div>
{% endif %}
</div>
{% endblock content %}