-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathrender.html.eex
More file actions
51 lines (51 loc) · 3.12 KB
/
render.html.eex
File metadata and controls
51 lines (51 loc) · 3.12 KB
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
<% status = patch_status(@patch) %>
<div class="ghd-file">
<div class="ghd-file-header" data-file-name="<%= @patch.from %>" data-package-name="<%= @package %>" data-version="<%= @from_version %>" >
<span class="ghd-file-status ghd-file-status-<%= status %>">
<%= status %>
</span>
<%= file_header(@patch, status) %>
<span class="collapse-diff"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="16" viewBox="0 0 10 16"><path fill-rule="evenodd" d="M10 10l-1.5 1.5L5 7.75 1.5 11.5 0 10l5-5 5 5z"/></svg></span>
<span class="reveal-diff"><svg xmlns="http://www.w3.org/2000/svg" width="10" height="16" viewBox="0 0 10 16"><path fill-rule="evenodd" d="M5 11L0 6l1.5-1.5L5 8.25 8.5 4.5 10 6l-5 5z"/></svg></span>
</div>
<div class="ghd-diff">
<table class="ghd-diff">
<%= for {chunk, index} <- Enum.with_index(@patch.chunks) do %>
<tr class="ghd-chunk-header">
<td class="ghd-line-number">
<%= unless index == 0 do %>
<div class="ghd-expand-down"><svg class="octicon octicon-fold-down" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 11l3 3 3-3H8V5H6v6H4zm-4 0c0 .55.45 1 1 1h2.5l-1-1h-1l2-2H5V8H3.5l-2-2H5V5H1c-.55 0-1 .45-1 1l2.5 2.5L0 11zm10.5-2H9V8h1.5l2-2H9V5h4c.55 0 1 .45 1 1l-2.5 2.5L14 11c0 .55-.45 1-1 1h-2.5l1-1h1l-2-2z"></path></svg></div>
<% end %>
<div class="ghd-expand-up"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 16" width="14" height="16"><path fill-rule="evenodd" d="M10 6L7 3 4 6h2v6h2V6h2zm4 0c0-.55-.45-1-1-1h-2.5l1 1h1l-2 2H9v1h1.5l2 2H9v1h4c.55 0 1-.45 1-1l-2.5-2.5L14 6zM3.5 8H5v1H3.5l-2 2H5v1H1c-.55 0-1-.45-1-1l2.5-2.5L0 6c0-.55.45-1 1-1h2.5l-1 1h-1l2 2z"></path></svg></div>
</td>
<td class="ghd-text">
<div class="ghd-text-internal"><%= chunk.header %></div>
</td>
</tr>
<%= for line <- chunk.lines do %>
<tr id="<%= line_id(@patch, line) %>" class="ghd-line ghd-line-type-<%= line_type(line) %>">
<td class="ghd-line-number">
<div class="ghd-line-number-from">
<%= line_number(line.from_line_number) %>
</div>
<div class="ghd-line-number-to">
<%= line_number(line.to_line_number) %>
</div>
</td>
<td class="ghd-text">
<div class="ghd-text-internal"><%= line_text(line.text) %></div>
</td>
</tr>
<% end %>
<% end %>
<tr class="ghd-chunk-header">
<td class="ghd-line-number">
<div class="ghd-expand-down"><svg class="octicon octicon-fold-down" viewBox="0 0 14 16" version="1.1" width="14" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4 11l3 3 3-3H8V5H6v6H4zm-4 0c0 .55.45 1 1 1h2.5l-1-1h-1l2-2H5V8H3.5l-2-2H5V5H1c-.55 0-1 .45-1 1l2.5 2.5L0 11zm10.5-2H9V8h1.5l2-2H9V5h4c.55 0 1 .45 1 1l-2.5 2.5L14 11c0 .55-.45 1-1 1h-2.5l1-1h1l-2-2z"></path></svg></div>
</td>
<td class="ghd-text">
<div class="ghd-text-internal"></div>
</td>
</tr>
</table>
</div>
</div>