From 138697d61faf39fa0090cbf89bd7de5bce41e593 Mon Sep 17 00:00:00 2001 From: Zach Amador Date: Fri, 23 May 2014 22:36:22 -0700 Subject: [PATCH] Put big numbers on edit --- app/assets/stylesheets/header.css.scss | 2 +- app/assets/stylesheets/recipes.css.scss | 6 +++++- app/views/recipes/_recipe_edit_fields.html.erb | 8 ++++---- app/views/recipes/_step_fields.html.erb | 4 +++- app/views/recipes/_step_mapper_fields.html.erb | 4 +++- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/header.css.scss b/app/assets/stylesheets/header.css.scss index 7602c96..a16dd03 100644 --- a/app/assets/stylesheets/header.css.scss +++ b/app/assets/stylesheets/header.css.scss @@ -43,7 +43,7 @@ display: block; line-height: 40px; text-align: center; - cusor: pointer; + cursor: pointer; font-weight: bold; } diff --git a/app/assets/stylesheets/recipes.css.scss b/app/assets/stylesheets/recipes.css.scss index daf177b..df21eb7 100644 --- a/app/assets/stylesheets/recipes.css.scss +++ b/app/assets/stylesheets/recipes.css.scss @@ -127,10 +127,14 @@ input[value="Delete Recipe"] { width: 50px; } -.remove_nested_fields { +.remove-step { margin-left: 310px; } +.remove-prereq { + margin-left: 85px; +} + .unit-input-box { width: 100px; } diff --git a/app/views/recipes/_recipe_edit_fields.html.erb b/app/views/recipes/_recipe_edit_fields.html.erb index 284ef2c..dece81e 100644 --- a/app/views/recipes/_recipe_edit_fields.html.erb +++ b/app/views/recipes/_recipe_edit_fields.html.erb @@ -20,11 +20,11 @@

Steps

<% @steps = @recipe.steps.sort { |a, b| a.step_number <=> b.step_number } %> <%= recipe_form.fields_for :steps, @steps do |step_form| %> - ( - <%= step_form.object.step_number %> - ) + + <%= step_form.object.step_number %> +
- <%= render partial: "step_fields", locals: {f: step_form, edit_flag: true} %> + <%= render partial: "step_fields", locals: {f: step_form, edit_flag: true} %>
<% end -%> diff --git a/app/views/recipes/_step_fields.html.erb b/app/views/recipes/_step_fields.html.erb index 7c06ada..2daa2a6 100644 --- a/app/views/recipes/_step_fields.html.erb +++ b/app/views/recipes/_step_fields.html.erb @@ -3,7 +3,9 @@ <%= f.hidden_field :step_number %> - <%= f.link_to_remove "Remove Step" %> + + <%= f.link_to_remove "Remove Step" %> + <% end -%>
diff --git a/app/views/recipes/_step_mapper_fields.html.erb b/app/views/recipes/_step_mapper_fields.html.erb index d697666..936b370 100644 --- a/app/views/recipes/_step_mapper_fields.html.erb +++ b/app/views/recipes/_step_mapper_fields.html.erb @@ -3,7 +3,9 @@ <%= f.number_field :prereq_step_number, :class => "number-input-box", :min => 1 %> <% unless edit_flag -%> - <%= f.link_to_remove "Remove Prereq" %> + + <%= f.link_to_remove "Remove Prereq" %> + <% end -%>