diff --git a/app/views/quantities/_index.html.erb b/app/views/quantities/_index.html.erb index f6134f1..13d7a21 100644 --- a/app/views/quantities/_index.html.erb +++ b/app/views/quantities/_index.html.erb @@ -38,8 +38,7 @@ link_to '', move_quantity_path(q, direction), { remote: true, method: :post, - class: "icon icon-move icon-move-#{direction}", - style: (action_name == "edit") ? "visibility: hidden;" : "" + class: "icon icon-move icon-move-#{direction}" } else link_to '', '', {class: "icon", style: "visibility: hidden;"} @@ -54,8 +53,7 @@ <%= link_to l(:button_edit), edit_quantity_path(q), { remote: true, - class: "icon icon-edit", - style: (action_name == "edit") ? "visibility: hidden;" : "" + class: "icon icon-edit" } %> <%= delete_link quantity_path(q), {remote: true, data: {}} %> @@ -73,14 +71,14 @@ html: {id: 'quantity-edit-form', name: 'quantity-edit-form'} do |f| %> <%= render partial: 'quantities/form', locals: {f: f} %> - <%= submit_tag l(:button_save) %> - <%= - link_to l(:button_cancel), "#", - onclick: '$(this).closest("tr").remove(); - $("#quantities a.icon-edit").css("visibility", "visible"); - $("#quantities a.icon-move").css("visibility", "visible"); - return false;' - %> + +
+

+ <%= submit_tag l(:button_save) %> + <%= link_to l(:button_cancel), "#", + onclick: '$(this).closest("tr").remove(); return false;' %> +

+
<% end %> diff --git a/app/views/quantities/index.html.erb b/app/views/quantities/index.html.erb index a8c1d06..c3c821a 100644 --- a/app/views/quantities/index.html.erb +++ b/app/views/quantities/index.html.erb @@ -17,8 +17,14 @@ html: {id: 'quantity-add-form', name: 'quantity-add-form'} do |f| %> <%= render partial: 'quantities/form', locals: {f: f} %> - <%= submit_tag l(:button_create) %> - <%= link_to l(:button_cancel), "#", onclick: '$("#add-quantity").hide(); return false;' %> + +
+

+ <%= submit_tag l(:button_create) %> + <%= link_to l(:button_cancel), "#", + onclick: '$("#add-quantity").hide(); return false;' %> +

+
<% end %>