-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
68d9ea0
commit c965c93
Showing
3 changed files
with
33 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
<%= simple_form_for @scrapper, url: create_with_attachment_scrappers_path(@scrapper), method: :post do |f|%> | ||
<%= f.input :attachment, as: :file %> | ||
<%= f.submit %> | ||
<%end%> | ||
<%= simple_form_for @scrapper, url: create_with_attachment_scrappers_path(@scrapper), method: :post, html: { class: "form-horizontal" } do |f|%> | ||
<div class="form-group"> | ||
<%= f.input :attachment, as: :file, input_html: { class: "form-control-file" } %> | ||
</div> | ||
<div class="form-group"> | ||
<%= f.submit "Submit", class: "btn btn-primary" %> | ||
</div> | ||
<%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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<h1>New supplier</h1> | ||
<h1 class="text-center mt-5 mb-5">New Supplier</h1> | ||
|
||
<%= render "form", supplier: @supplier %> | ||
|
||
<br> | ||
<div class="row justify-content-center"> | ||
<div class="col-md-8"> | ||
<%= render "form", supplier: @supplier %> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<%= link_to "Back to suppliers", suppliers_path %> | ||
<div class="text-center mt-5"> | ||
<%= link_to "Back to Suppliers", suppliers_path, class: "btn btn-secondary" %> | ||
</div> |
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 |
---|---|---|
@@ -1,10 +1,20 @@ | ||
<p style="color: green"><%= notice %></p> | ||
<% if notice %> | ||
<p class="alert alert-success"> | ||
<%= notice %> | ||
</p> | ||
<% end %> | ||
|
||
<%= render @supplier %> | ||
|
||
<div> | ||
<%= link_to "Edit this supplier", edit_supplier_path(@supplier) %> | | ||
<%= link_to "Back to suppliers", suppliers_path %> | ||
<div class="card mt-5 mb-5"> | ||
<div class="card-header"> | ||
Supplier Info | ||
</div> | ||
<div class="card-body"> | ||
<%= render @supplier %> | ||
</div> | ||
</div> | ||
|
||
<%= button_to "Destroy this supplier", @supplier, method: :delete %> | ||
<div class="d-flex justify-content-between mt-5"> | ||
<%= link_to "Edit this Supplier", edit_supplier_path(@supplier), class: "btn btn-primary" %> | ||
<%= link_to "Back to Suppliers", suppliers_path, class: "btn btn-secondary" %> | ||
<%= button_to "Destroy this Supplier", @supplier, method: :delete, class: "btn btn-danger" %> | ||
</div> |