Skip to content

Commit

Permalink
adds style to views
Browse files Browse the repository at this point in the history
  • Loading branch information
ParzivalRealm committed Feb 7, 2023
1 parent 68d9ea0 commit c965c93
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 17 deletions.
12 changes: 8 additions & 4 deletions app/views/scrappers/create_with_attachment.html.erb
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%>
14 changes: 8 additions & 6 deletions app/views/suppliers/new.html.erb
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>
24 changes: 17 additions & 7 deletions app/views/suppliers/show.html.erb
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>

0 comments on commit c965c93

Please sign in to comment.