-
Notifications
You must be signed in to change notification settings - Fork 1
/
pull_request.jst.ejs
59 lines (51 loc) · 1.66 KB
/
pull_request.jst.ejs
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
<%
var statusClass = "";
var statusMsg = "Unknown";
var loader = "";
switch(status) {
case 0:
statusMsg = "Building";
statusClass = "badge-info";
loader = '<img style="position: relative; top: -1px; margin-right: 3px;" src="/assets/ajax-loader.gif" />';
break;
case 1:
statusClass = "badge-success";
statusMsg = "Complete";
break;
case 2:
statusClass = "badge-important";
statusMsg = "Failed";
break;
case 3:
statusMsg = "In Queue";
break;
};
%>
<td><a href="<%= url %>" target="_blank"><%= title %></a></td>
<td data-value="<%= user_login + '' + number %>"><img width=32 height=32 src="<%= user_avatar_url %>" /> <%= user_login %></td>
<td class="timeago" data-value="<%= github_updated_at %>"><%= jQuery.timeago(github_updated_at) %></td>
<td data-value="<%= statusMsg + '' + number%>"><span class="status badge <%= statusClass %>"><%= loader %> <%= statusMsg %></span></td>
<td>
<% if(!!jira_status_name) { %>
<img width=32 height=32 src="<%= jira_status_icon_url %>" /> <span><%= jira_status_name %></span>
<% } %>
</td>
<%
var website = this.model.website();
if(!!website) {
%>
<td><a href="http://<%= website %>" target="_blank" class="btn btn-primary">Website</a>
<% } %>
<% if(repo.jira_url && this.model.jiraIssue()) { %>
<a href="<%= repo.jira_url %>/browse/<%= this.model.jiraIssue() %>" target="_blank" class="btn btn-primary">JIRA Issue</a>
<% } %>
<% if(repo.log_file) { %>
<a href="#" class="log btn btn-primary">Log</a>
<% } %>
<% if(1 == status) { %>
<a href="#" class="btn rebuild">
<i class="icon-refresh icon-white"></i>
Rebuild
</a>
<% } %>
</td>