-
Notifications
You must be signed in to change notification settings - Fork 28
/
pr_review_list.html.erb
37 lines (36 loc) · 1.16 KB
/
pr_review_list.html.erb
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
<html>
<title>PRs that require review</title>
<head>
<script src='./web_libraries/jquery.min.js' type='text/javascript'></script>
<script src='./web_libraries/sorttable.js'></script><link rel='stylesheet' href='./web_libraries/bootstrap.min.css'>
<script src='./web_libraries/DataTables/datatables.js'></script><link rel='stylesheet' href='./web_libraries/DataTables/datatables.css'>
<script type= 'text/javascript'> $(document).ready( function () {$('#reviews').DataTable();} ); </script>
</head>
<body>
<h1>PRs that require review</h1>
<table border='1' id='reviews' style='width:100%' class='sortable table table-hover'>
<tr>
<% open_prs.first.keys.each do |header| %>
<% if header != :address %>
<td> <%= header %></td>
<% end %>
<% end %>
</tr>
<% open_prs.each do |row| %>
<tr>
<% row.each do |key, value| %>
<% if key == :pr %>
<td><a href='<%= row[:address] %>/pull/<%= value %>'><%= value %></a></td>
<% elsif key == :repo %>
<td><a href='<%= row[:address] %>'><%= value %></a></td>
<% else %>
<% if key != :address %>
<td><%= value %></td>
<% end %>
<% end %>
<% end %>
</tr>
<% end %>
</table>
</body>
</html>