diff options
author | MrYummy <elemental428@gmail.com> | 2017-07-01 04:48:52 +0200 |
---|---|---|
committer | MrYummy <elemental428@gmail.com> | 2017-07-01 04:48:52 +0200 |
commit | 0f74795159ba65432aa1a6a25367dfdcffd4bb12 (patch) | |
tree | ded77479274a99d6f9f5668b911229c1eabb4087 /app/views | |
parent | 3bfc74045fa61e7646754a1563c8813ed0952f14 (diff) |
Added basic hexfile reading that respects r/w perms
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/forums/show.html.erb | 2 | ||||
-rw-r--r-- | app/views/layouts/application.html.erb | 2 | ||||
-rw-r--r-- | app/views/memory/index.html.erb | 4 | ||||
-rw-r--r-- | app/views/memory/table.html.erb | 16 | ||||
-rw-r--r-- | app/views/statics/home.html.erb | 2 | ||||
-rw-r--r-- | app/views/users/index.html.erb | 2 |
6 files changed, 24 insertions, 4 deletions
diff --git a/app/views/forums/show.html.erb b/app/views/forums/show.html.erb index 60f3185..6e8ea2f 100644 --- a/app/views/forums/show.html.erb +++ b/app/views/forums/show.html.erb @@ -51,4 +51,4 @@ </div> <% end %> <%= paginate @threads %> -</div>
\ No newline at end of file +</div> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index a0a5f83..26d6c67 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -25,4 +25,4 @@ </div> <%= render partial: "/layouts/footer" %> </body> -</html>
\ No newline at end of file +</html> diff --git a/app/views/memory/index.html.erb b/app/views/memory/index.html.erb new file mode 100644 index 0000000..9348db0 --- /dev/null +++ b/app/views/memory/index.html.erb @@ -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 %> 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> diff --git a/app/views/statics/home.html.erb b/app/views/statics/home.html.erb index a5f3242..6a51abd 100644 --- a/app/views/statics/home.html.erb +++ b/app/views/statics/home.html.erb @@ -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>
\ No newline at end of file +<p>Join us now!</p> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 883ffb0..4f1d12d 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -19,4 +19,4 @@ </div> <% end %> <%= paginate @users %> -</div>
\ No newline at end of file +</div> |