diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/memory/index.html.erb | 5 | ||||
-rw-r--r-- | app/views/memory/table.html.erb | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/views/memory/index.html.erb b/app/views/memory/index.html.erb index 9348db0..6abcee0 100644 --- a/app/views/memory/index.html.erb +++ b/app/views/memory/index.html.erb @@ -1,4 +1,5 @@ -<%= form_tag "memory/table", method: :get do %> +<%= form_tag url_for(controller: "memory", action: "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 %> + <br><br> + <%= submit_tag "Load table", name: nil, class: "btn blue" %> <% end %> diff --git a/app/views/memory/table.html.erb b/app/views/memory/table.html.erb index 03f1ef2..2f24dc4 100644 --- a/app/views/memory/table.html.erb +++ b/app/views/memory/table.html.erb @@ -1,3 +1,4 @@ +<h1 style="text-align:center"><%= title @name + (" (read-only)" if !@can_edit).to_s %></h1> <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| %> @@ -8,7 +9,7 @@ <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> + <td contenteditable="<%=!!@can_edit%>" id="memory-<%=(16*rindex)+hindex%>"><%=hex.to_s.upcase.rjust(2, "0")%></td> <% end %> </tr> <% end %> |