-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from QuartzBrandi/multiple_changes/anw/anw+bew
Multiple changes
- Loading branch information
Showing
11 changed files
with
132 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<%= form_for recipe do |f| %> | ||
<div class="form-group"> | ||
<%= f.label :name %> | ||
<%= f.text_field :name, class: "form-control", required: true %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :description %> | ||
<%= f.text_area :description, class: "form-control" %> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<%= f.label :image %> | ||
<%= f.file_field :image %> | ||
</div> | ||
|
||
<%= f.submit "Save", { class: "btn btn-primary" } %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<% content_for :page_title do %> | ||
<h2>Edit Recipe</h2> | ||
<% end %> | ||
|
||
<%= render 'form', { recipe: @recipe } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<% content_for :page_title do %> | ||
<h2>New Recipe</h2> | ||
<% end %> | ||
|
||
<%= render 'form', { recipe: @recipe } %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<li class="preparation_step list-unstyled"> | ||
|
||
<% if step.has_measurements? %> | ||
<ul class="list-unstyled text-muted"> | ||
<% step.measurements.each do |measurement| %> | ||
<li class="ingredients_line"><%= measurement.amount %> <%= link_to measurement.ingredient.name, ingredient_path(measurement.ingredient) %></li> | ||
<% end %> | ||
</ul> | ||
<% end %> | ||
|
||
<%= step.directions %> | ||
<% if recipe.owner?(session[:user_id]) && params[:recipe_id].nil? %> | ||
<ul class="list-unstyled"> | ||
<li> | ||
<%= link_to "Edit Step", edit_recipe_step_path(recipe, step), class: "btn btn-default" %> | ||
</li> | ||
<li> | ||
<%= button_to "Delete Step", recipe_step_path(recipe, step), | ||
method: :delete, data: { confirm: "Are you 100% sure you want to delete this step? The associated ingredients will also be removed from the recipe!" }, | ||
class: "btn btn-danger" %> | ||
</li> | ||
</ul> | ||
<% end %> | ||
|
||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters