Skip to content

Commit

Permalink
Put big numbers on edit
Browse files Browse the repository at this point in the history
  • Loading branch information
zeamador authored and JakeNash committed May 24, 2014
1 parent 33c82cc commit 138697d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/header.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
display: block;
line-height: 40px;
text-align: center;
cusor: pointer;
cursor: pointer;
font-weight: bold;
}

Expand Down
6 changes: 5 additions & 1 deletion app/assets/stylesheets/recipes.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
8 changes: 4 additions & 4 deletions app/views/recipes/_recipe_edit_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<h3>Steps</h3>
<% @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 %>
)
<span class="stepnum">
<%= step_form.object.step_number %>
</span>
<div class = "tabbed-margin-left">
<%= render partial: "step_fields", locals: {f: step_form, edit_flag: true} %>
<%= render partial: "step_fields", locals: {f: step_form, edit_flag: true} %>
</div>
<% end -%>

Expand Down
4 changes: 3 additions & 1 deletion app/views/recipes/_step_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
<span class="stepnum"></span>
<%= f.hidden_field :step_number %>

<%= f.link_to_remove "Remove Step" %>
<span class="remove-step">
<%= f.link_to_remove "Remove Step" %>
</span>
<% end -%>

<div class = "tabbed-margin-left">
Expand Down
4 changes: 3 additions & 1 deletion app/views/recipes/_step_mapper_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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" %>
<span class="remove-prereq">
<%= f.link_to_remove "Remove Prereq" %>
</span>
<% end -%>
<br />
<span class = "radio-buttons-label" >
Expand Down

0 comments on commit 138697d

Please sign in to comment.