Added basic hexfile reading that respects r/w perms
This commit is contained in:
@@ -51,4 +51,4 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<%= paginate @threads %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -25,4 +25,4 @@
|
||||
</div>
|
||||
<%= render partial: "/layouts/footer" %>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
4
app/views/memory/index.html.erb
Normal file
4
app/views/memory/index.html.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
<%= form_tag "memory/table", method: :get do %>
|
||||
<%= select_tag "project", options_for_select(@projects.collect.with_index{|p, i| [@project_names[i], p]}) %>
|
||||
<%= submit_tag "View Table", name: nil %>
|
||||
<% end %>
|
||||
16
app/views/memory/table.html.erb
Normal file
16
app/views/memory/table.html.erb
Normal file
@@ -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>
|
||||
@@ -30,4 +30,4 @@
|
||||
<span>for those who just want to mine some ore</span>
|
||||
<span>and we have a freebuild world for large projects.</span>
|
||||
</p>
|
||||
<p>Join us now!</p>
|
||||
<p>Join us now!</p>
|
||||
|
||||
@@ -19,4 +19,4 @@
|
||||
</div>
|
||||
<% end %>
|
||||
<%= paginate @users %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user