summaryrefslogtreecommitdiff
path: root/app/views/memory/table.html.erb
diff options
context:
space:
mode:
authorMrYummy <elemental428@gmail.com>2017-07-01 04:48:52 +0200
committerMrYummy <elemental428@gmail.com>2017-07-01 04:48:52 +0200
commit0f74795159ba65432aa1a6a25367dfdcffd4bb12 (patch)
treeded77479274a99d6f9f5668b911229c1eabb4087 /app/views/memory/table.html.erb
parent3bfc74045fa61e7646754a1563c8813ed0952f14 (diff)
Added basic hexfile reading that respects r/w perms
Diffstat (limited to 'app/views/memory/table.html.erb')
-rw-r--r--app/views/memory/table.html.erb16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/memory/table.html.erb b/app/views/memory/table.html.erb
new file mode 100644
index 0000000..03f1ef2
--- /dev/null
+++ b/app/views/memory/table.html.erb
@@ -0,0 +1,16 @@
+<table class="memory-table", data-project="<%=params[:project]%>">
+ <tr>
+ <% ["Address","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F"].each do |i| %>
+ <th><b><%=i%></b></th>
+ <% end %>
+ </tr>
+ <% @data.in_groups_of(16).each_with_index do |row, rindex| %>
+ <tr>
+ <td><b><%=(rindex*16).to_s(16).upcase.rjust(6, "0")%></b></td>
+ <% row.each_with_index do |hex, hindex| %>
+ <td contenteditable="<%=@can_edit%>" id="memory-<%=(16*rindex)+hindex%>"><%=hex.to_s.upcase.rjust(2, "0")%></td>
+ <% end %>
+ </tr>
+ <% end %>
+</table>
+<br>