Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
venshop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Nguyen Quoc Kien
venshop
Commits
3ab34a38
Commit
3ab34a38
authored
Aug 03, 2015
by
Nguyen Quoc Kien
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix format html
parent
79799b81
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
113 additions
and
119 deletions
+113
-119
app/views/admin/carts/_show_to_buyers.html.erb
+43
-45
app/views/admin/carts/_show_to_user_id.html.erb
+43
-45
app/views/admin/users/index.html.erb
+2
-2
app/views/carts/new.html.erb
+0
-1
app/views/carts/show.html.erb
+0
-2
app/views/order_notifier/received.html.erb
+24
-23
app/views/shopping_history/index.html.erb
+1
-1
No files found.
app/views/admin/carts/_show_to_buyers.html.erb
View file @
3ab34a38
...
...
@@ -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>
app/views/admin/carts/_show_to_user_id.html.erb
View file @
3ab34a38
...
...
@@ -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>
app/views/admin/users/index.html.erb
View file @
3ab34a38
...
...
@@ -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>
...
...
app/views/carts/new.html.erb
View file @
3ab34a38
<%
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>
...
...
app/views/carts/show.html.erb
View file @
3ab34a38
...
...
@@ -41,5 +41,4 @@
<%
else
%>
<h1>
Cart Empty
</h1>
<%
end
%>
</table>
\ No newline at end of file
app/views/order_notifier/received.html.erb
View file @
3ab34a38
<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
app/views/shopping_history/index.html.erb
View file @
3ab34a38
...
...
@@ -52,5 +52,5 @@
<tr>
<td>
<%=
link_to
'Back'
,
:back
,
class:
"btn btn-info"
%>
</td>
</tr>
</tbody>
</tbody>
</table>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment