Commit 3ab34a38 by Nguyen Quoc Kien

Fix format html

parent 79799b81
......@@ -15,49 +15,47 @@
<td colspan="4"><h4><b>Cart <%= cart.id %>: <%= cart.created_at.to_formatted_s(:long_ordinal) %></b></h4></td>
</tr>
<% cart_products.each do |cart_product| %>
<tbody>
<% product = Product.find(cart_product.product_id) %>
<tr>
<td><%= product.name %></td>
<td><%= number_to_currency(product.price/100.00) %></td>
<td><%= cart_product.number %></td>
<td><%= number_to_currency(cart_product.price/100.00 * cart_product.number) %></td>
</tr>
<% end %>
<tr>
<td colspan="3">Total:</td>
<td><b><%= number_to_currency(cart.total_price/100.00) %></b></td>
</tr>
<tr>
<td>Name: </td>
<td colspan="3"> <%= cart.full_name %>
</tr>
<tr>
<td>E-Mail: </td>
<td colspan="3"> <%= cart.email %>
</tr>
<tr>
<td>Phone: </td>
<td colspan="3"> <%= cart.phone %>
</tr>
<tr>
<td>Address: </td>
<td colspan="3"> <%= cart.address %>
</tr>
<tr>
<td>Status: </td>
<td colspan="3"><%= cart.status %></td>
</tr>
<tr>
<% if cart.status != "Finish" %>
<td colspan="4" style="text-align:right"><%= button_to 'Next',admin_cart_path(id: cart.id, user_id: "buyers"), method: :put , class: "btn btn-primary" %></td>
<% else %>
<td colspan="4" style="text-align:right"><%= link_to 'Finished',"#" , class: "btn btn-danger" %></td>
<% end %>
</tr>
<% end %>
<tr>
<td><%= link_to 'Back', :back, class: "btn btn-info" %></td>
</tr>
</tbody>
<% product = Product.find(cart_product.product_id) %>
<tr>
<td><%= product.name %></td>
<td><%= number_to_currency(product.price/100.00) %></td>
<td><%= cart_product.number %></td>
<td><%= number_to_currency(cart_product.price/100.00 * cart_product.number) %></td>
</tr>
<% end %>
<tr>
<td colspan="3">Total:</td>
<td><b><%= number_to_currency(cart.total_price/100.00) %></b></td>
</tr>
<tr>
<td>Name: </td>
<td colspan="3"> <%= cart.full_name %>
</tr>
<tr>
<td>E-Mail: </td>
<td colspan="3"> <%= cart.email %>
</tr>
<tr>
<td>Phone: </td>
<td colspan="3"> <%= cart.phone %>
</tr>
<tr>
<td>Address: </td>
<td colspan="3"> <%= cart.address %>
</tr>
<tr>
<td>Status: </td>
<td colspan="3"><%= cart.status %></td>
</tr>
<tr>
<% if cart.status != "Finish" %>
<td colspan="4" style="text-align:right"><%= button_to 'Next',admin_cart_path(id: cart.id, user_id: "buyers"), method: :put , class: "btn btn-primary" %></td>
<% else %>
<td colspan="4" style="text-align:right"><%= link_to 'Finished',"#" , class: "btn btn-danger" %></td>
<% end %>
</tr>
<% end %>
<tr>
<td><%= link_to 'Back', :back, class: "btn btn-info" %></td>
</tr>
</table>
......@@ -15,49 +15,47 @@
<td colspan="4"><h4><b>Cart <%= cart_to_user.id %>: <%= cart_to_user.created_at.to_formatted_s(:long_ordinal) %></b></h4></td>
</tr>
<% cart_products.each do |cart_product| %>
<tbody>
<% product = Product.find(cart_product.product_id) %>
<tr>
<td><%= product.name %></td>
<td><%= number_to_currency(product.price/100.00) %></td>
<td><%= cart_product.number %></td>
<td><%= number_to_currency(cart_product.price/100.00 * cart_product.number) %></td>
</tr>
<% end %>
<tr>
<td colspan="3">Total</td>
<td><b><%= number_to_currency(cart_to_user.total_price/100.00) %></b></td>
</tr>
<tr>
<td>Name: </td>
<td colspan="3"> <%= cart_to_user.full_name %>
</tr>
<tr>
<td>E-Mail: </td>
<td colspan="3"> <%= cart_to_user.email %>
</tr>
<tr>
<td>Phone: </td>
<td colspan="3"> <%= cart_to_user.phone %>
</tr>
<tr>
<td>Address: </td>
<td colspan="3"> <%= cart_to_user.address %>
</tr>
<tr>
<td>Status: </td>
<td colspan="3"><%= cart_to_user.status %></td>
</tr>
<tr>
<% if cart_to_user.status != "Finish" %>
<td colspan="4" style="text-align:right"><%= button_to 'Next',admin_cart_path(id: cart_to_user.id, user_id: @user.id), method: :put , class: "btn btn-primary" %></td>
<% else %>
<td colspan="4" style="text-align:right"><%= link_to 'Finished',"#" , class: "btn btn-danger" %></td>
<% end %>
</tr>
<% end %>
<tr>
<td><%= link_to 'Back', :back, class: "btn btn-info" %></td>
</tr>
</tbody>
<% product = Product.find(cart_product.product_id) %>
<tr>
<td><%= product.name %></td>
<td><%= number_to_currency(product.price/100.00) %></td>
<td><%= cart_product.number %></td>
<td><%= number_to_currency(cart_product.price/100.00 * cart_product.number) %></td>
</tr>
<% end %>
<tr>
<td colspan="3">Total</td>
<td><b><%= number_to_currency(cart_to_user.total_price/100.00) %></b></td>
</tr>
<tr>
<td>Name: </td>
<td colspan="3"> <%= cart_to_user.full_name %>
</tr>
<tr>
<td>E-Mail: </td>
<td colspan="3"> <%= cart_to_user.email %>
</tr>
<tr>
<td>Phone: </td>
<td colspan="3"> <%= cart_to_user.phone %>
</tr>
<tr>
<td>Address: </td>
<td colspan="3"> <%= cart_to_user.address %>
</tr>
<tr>
<td>Status: </td>
<td colspan="3"><%= cart_to_user.status %></td>
</tr>
<tr>
<% if cart_to_user.status != "Finish" %>
<td colspan="4" style="text-align:right"><%= button_to 'Next',admin_cart_path(id: cart_to_user.id, user_id: @user.id), method: :put , class: "btn btn-primary" %></td>
<% else %>
<td colspan="4" style="text-align:right"><%= link_to 'Finished',"#" , class: "btn btn-danger" %></td>
<% end %>
</tr>
<% end %>
<tr>
<td><%= link_to 'Back', :back, class: "btn btn-info" %></td>
</tr>
</table>
......@@ -17,7 +17,7 @@
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<% @users.each do |user| %>
<tr>
<td><%= user.id %></td>
<td><%= user.username %></td>
......@@ -26,7 +26,7 @@
<td><%= user.address %> </td>
<td><%= link_to "Delete", admin_user_path(id: user.id), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
<% end %>
</tbody>
</table>
</div>
......
<% provide(:title, "Order") %>
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1>Đăng ký thông tin nhận hàng</h1>
......
......@@ -41,5 +41,4 @@
<% else %>
<h1>Cart Empty</h1>
<% end %>
</table>
\ No newline at end of file
<h1>Venshop - Email confirmation</h1>
<h2>Your Cart</h2>
<table class="table table-hover">
<thead>
<thead>
<tr>
<th>Product name</th>
<th>Price</th>
<th>Quantity</th>
<th>Total price</th>
</tr>
</thead>
<tbody>
<% cart_products = @cart.cart_products %>
<% cart_products.each do |cart_product| %>
<% product = Product.find(cart_product.product_id) %>
<tr>
<th>Product name</th>
<th>Price</th>
<th>Quantity</th>
<th>Total price</th>
</tr>
</thead>
<tbody>
<% cart_products = @cart.cart_products %>
<% cart_products.each do |cart_product| %>
<% product = Product.find(cart_product.product_id) %>
<tr>
<td><%= product.name %>
<td><%= number_to_currency(cart_product.price/100.00) %></td>
<td><%= cart_product.number %></td>
<td><%= number_to_currency(cart_product.price/100.00 * cart_product.number) %></td>
</td>
<% end %>
<tr>
<td colspan="3">Total</td>
<td> <%= number_to_currency(@cart.total_price/100.00) %></td>
</tr>
</tbody>
<td><%= product.name %>
<td><%= number_to_currency(cart_product.price/100.00) %></td>
<td><%= cart_product.number %></td>
<td><%= number_to_currency(cart_product.price/100.00 * cart_product.number) %></td>
</td>
<% end %>
<tr>
<td colspan="3">Total</td>
<td> <%= number_to_currency(@cart.total_price/100.00) %></td>
</tr>
</tbody>
</table>
\ No newline at end of file
......@@ -52,5 +52,5 @@
<tr>
<td><%= link_to 'Back', :back, class: "btn btn-info" %></td>
</tr>
</tbody>
</tbody>
</table>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment