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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huanvl
venshop
Commits
b044beed
Commit
b044beed
authored
Oct 29, 2013
by
vulehuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use link_to helper
parent
841bca67
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
57 additions
and
31 deletions
+57
-31
venshop_app/app/views/cards/_item_list.html.erb
+10
-4
venshop_app/app/views/cards/checkout.html.erb
+1
-1
venshop_app/app/views/cards/confirm_checkout.html.erb
+1
-1
venshop_app/app/views/layouts/_advertising.html.erb
+18
-9
venshop_app/app/views/layouts/_footer.html.erb
+4
-3
venshop_app/app/views/layouts/_header.html.erb
+20
-12
venshop_app/app/views/layouts/_product_category.html.erb
+3
-1
No files found.
venshop_app/app/views/cards/_item_list.html.erb
View file @
b044beed
...
@@ -13,7 +13,9 @@
...
@@ -13,7 +13,9 @@
</thead>
</thead>
<tbody>
<tbody>
<%
if
card_infos
.
empty?
||
card_infos
[
:card_items
].
empty?
%>
<%
if
card_infos
.
empty?
||
card_infos
[
:card_items
].
empty?
%>
<tr><td
colspan=
"6"
><a
href=
"
<%=
products_path
%>
"
>
Click here to order
</a></td></tr>
<tr><td
colspan=
"6"
>
<%=
link_to
'Click here to order'
,
products_path
%>
</td></tr>
<%
<%
else
else
card_items
=
card_infos
[
:card_items
]
card_items
=
card_infos
[
:card_items
]
...
@@ -36,8 +38,12 @@
...
@@ -36,8 +38,12 @@
<%
if
can_edit
%>
<%
if
can_edit
%>
<td>
<td>
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<a
href=
"
<%=
cards_path
%>
?product_id=
<%=
card_item
[
:product_id
]
%>
&card_action=update"
class=
"btn btn-info btn-update-card-quantity"
><span
class=
"glyphicon glyphicon-plus"
></span>
Update quantity
</a>
<%=
link_to
cards_path
(
product_id:
card_item
[
:product_id
],
card_action:
'update'
),
class:
'btn btn-info btn-update-card-quantity'
do
%>
<a
href=
"
<%=
cards_path
%>
?product_id=
<%=
card_item
[
:product_id
]
%>
&card_action=remove"
class=
"btn btn-danger"
dada=
"{:confirm=>"
Do
you
want
to
remove
this
product
?"}"
><span
class=
"glyphicon glyphicon-remove"
></span>
Remove
</a>
<span
class=
"glyphicon glyphicon-plus"
></span>
Update quantity
<%
end
%>
<%=
link_to
cards_path
(
product_id:
card_item
[
:product_id
],
card_action:
'remove'
),
class:
'btn btn-danger'
,
dada:
'{:confirm=>"Do you want to remove this product?"}'
do
%>
<span
class=
"glyphicon glyphicon-remove"
></span>
Remove
<%
end
%>
</div>
</div>
</td>
</td>
<%
end
%>
<%
end
%>
...
@@ -57,7 +63,7 @@
...
@@ -57,7 +63,7 @@
<tr>
<tr>
<td
colspan=
"6"
>
<td
colspan=
"6"
>
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<
a
class=
"btn btn-primary"
href=
"
<%=
url_for
(
action:
'checkout'
)
%>
"
>
Check out
</a
>
<
%=
link_to
'Check out'
,
{
action:
'checkout'
},
class:
'btn btn-primary'
%
>
</div>
</div>
</td>
</td>
</tr>
</tr>
...
...
venshop_app/app/views/cards/checkout.html.erb
View file @
b044beed
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<%=
text_area_tag
:note
,
params
[
:note
],
class:
"form-control"
,
rows:
10
,
cols:
25
%>
<%=
text_area_tag
:note
,
params
[
:note
],
class:
"form-control"
,
rows:
10
,
cols:
25
%>
<%=
render
partial:
'cards/item_list'
,
locals:
{
card_infos:
@card_infos
,
can_edit:
false
}
%>
<%=
render
partial:
'cards/item_list'
,
locals:
{
card_infos:
@card_infos
,
can_edit:
false
}
%>
<div
class=
"text-center"
>
<div
class=
"text-center"
>
<
a
href=
"
<%=
cards_path
%>
"
class=
"btn btn-default"
>
Back
</a
>
<
%=
link_to
'Back'
,
cards_path
,
class:
'btn btn-default'
%
>
<%=
submit_tag
"Continue"
,
class:
'btn btn-primary btn-submit'
%>
<%=
submit_tag
"Continue"
,
class:
'btn btn-primary btn-submit'
%>
</div>
</div>
<%
end
%>
<%
end
%>
...
...
venshop_app/app/views/cards/confirm_checkout.html.erb
View file @
b044beed
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<%=
form_tag
do
%>
<%=
form_tag
do
%>
<div
class=
"text-center"
>
<div
class=
"text-center"
>
The information above
The information above
<a
href=
"
<%=
url_for
(
action:
'checkout'
)
%>
"
class=
"btn btn-default"
>
Incorrect, edit
</a
>
<%=
link_to
'Incorrect, edit'
,
{
action:
'checkout'
},
class:
'btn btn-default'
%
>
<%=
submit_tag
"Correct, click here"
,
class:
'btn btn-primary btn-submit'
%>
<%=
submit_tag
"Correct, click here"
,
class:
'btn btn-primary btn-submit'
%>
</div>
</div>
<%
end
%>
<%
end
%>
...
...
venshop_app/app/views/layouts/_advertising.html.erb
View file @
b044beed
...
@@ -6,14 +6,23 @@
...
@@ -6,14 +6,23 @@
class=
"sprite-1 corner-right"
></span>
class=
"sprite-1 corner-right"
></span>
</h2>
</h2>
<div
class=
"block-advertising"
>
<div
class=
"block-advertising"
>
<a
href=
""
class=
"thumbnail"
><img
<%=
link_to
'#'
,
class:
'thumbnail'
do
%>
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/1.jpg"
alt=
""
/></a>
<a
href=
""
<img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/1.jpg"
alt=
""
/>
class=
"thumbnail"
><img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/2.gif"
alt=
""
/></a>
<%
end
%>
<a
href=
""
class=
"thumbnail"
><img
<%=
link_to
'#'
,
class:
'thumbnail'
do
%>
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/3.png"
alt=
""
/></a>
<a
href=
""
<img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/2.gif"
alt=
""
/>
class=
"thumbnail"
><img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/4.jpg"
alt=
""
/></a>
<%
end
%>
<a
href=
""
class=
"thumbnail"
><img
<%=
link_to
'#'
,
class:
'thumbnail'
do
%>
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/5.jpg"
alt=
""
/></a>
<a
href=
""
<img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/3.png"
alt=
""
/>
class=
"thumbnail"
><img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/6.jpg"
alt=
""
/></a>
<%
end
%>
<%=
link_to
'#'
,
class:
'thumbnail'
do
%>
<img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/4.jpg"
alt=
""
/>
<%
end
%>
<%=
link_to
'#'
,
class:
'thumbnail'
do
%>
<img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/5.jpg"
alt=
""
/>
<%
end
%>
<%=
link_to
'#'
,
class:
'thumbnail'
do
%>
<img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/ads/6.jpg"
alt=
""
/>
<%
end
%>
</div>
</div>
</div>
</div>
venshop_app/app/views/layouts/_footer.html.erb
View file @
b044beed
...
@@ -2,8 +2,9 @@
...
@@ -2,8 +2,9 @@
<div
class=
"container"
>
<div
class=
"container"
>
<footer>
<footer>
<b>
Venshop - Huan Vu Le
</b><br
/>
<b>
Address
</b>
: 17 No.2 street, Cu
<b>
Venshop - Huan Vu Le
</b><br
/>
<b>
Address
</b>
: 17 No.2 street, Cu
Xa Do Thanh, Ward 4 Dist. 3, HCMC, Vietnam
<br
/>
<b>
Email
</b>
:
<a
Xa Do Thanh, Ward 4 Dist. 3, HCMC, Vietnam
<br
/>
<b>
Email
</b>
:
href=
"mailto:info@zigexn.vn"
>
info@zigexn.vn
</a><br
/>
<b>
Website
</b>
:
<%=
link_to
'info@zigexn.vn'
,
'mailto:info@zigexn.vn'
%>
<a
href=
"http://zigexn.vn"
>
http://http://zigexn.vn.com
</a>
<br
/>
<b>
Website
</b>
:
<%=
link_to
'http://http://zigexn.vn.com'
,
'http://http://zigexn.vn.com'
%>
</footer>
</footer>
</div>
</div>
venshop_app/app/views/layouts/_header.html.erb
View file @
b044beed
<header>
<header>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-md-2 col-sm-2"
>
<div
class=
"col-md-2 col-sm-2"
>
<h1
class=
"logo pull-left"
><a
href=
"
<%=
root_path
%>
"
>
Venshop
</a></h1>
<h1
class=
"logo pull-left"
>
<%=
link_to
'Venshop'
,
root_path
%>
</h1>
</div>
</div>
<div
class=
"col-md-10 col-sm-10"
>
<div
class=
"col-md-10 col-sm-10"
>
<div
class=
"banner pull-right"
>
<div
class=
"banner pull-right"
>
<a
href=
"
<%=
root_path
%>
"
><img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/banner/1.png"
class=
"img-responsive"
alt=
""
/></a>
<%=
link_to
root_path
do
%>
<img
src=
"
<%=
image_path
(
''
)
%>
/images/upload/banner/1.png"
class=
"img-responsive"
alt=
""
/>
<%
end
%>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -15,9 +19,12 @@
...
@@ -15,9 +19,12 @@
if
signed_in?
if
signed_in?
user
=
current_user
user
=
current_user
%>
%>
<a
href=
"
<%=
cards_path
%>
"
class=
"btn btn-danger"
>
<span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Your cart
<%=
link_to
cards_path
,
class:
'btn btn-danger'
do
%>
</a>
<span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Your cart
<a
data-toggle=
"dropdown"
href=
"#"
class=
"btn btn-default"
><span
class=
"glyphicon glyphicon-list"
></span>
My actions
</a>
<%
end
%>
<%=
link_to
'#'
,
class:
'btn btn-default'
,
'data-toggle'
=>
'dropdown'
do
%>
<span
class=
"glyphicon glyphicon-list"
></span>
My actions
<%
end
%>
<ul
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"dLabel"
>
<ul
class=
"dropdown-menu"
role=
"menu"
aria-labelledby=
"dLabel"
>
<li>
<li>
<%=
link_to
edit_user_path
(
current_user
)
do
%>
<%=
link_to
edit_user_path
(
current_user
)
do
%>
...
@@ -47,8 +54,9 @@
...
@@ -47,8 +54,9 @@
<%=
link_to
signup_path
,
class:
"btn btn-default"
do
%>
<%=
link_to
signup_path
,
class:
"btn btn-default"
do
%>
<span
class=
"glyphicon glyphicon-user"
></span>
Register
<span
class=
"glyphicon glyphicon-user"
></span>
Register
<%
end
%>
<%
end
%>
<a
href=
"
<%=
cards_path
%>
"
class=
"btn btn-danger last"
>
<span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Your cart
<%=
link_to
cards_path
,
class:
'btn btn-danger last'
do
%>
</a>
<span
class=
"glyphicon glyphicon-shopping-cart"
></span>
Your cart
<%
end
%>
<%
end
%>
<%
end
%>
...
@@ -58,10 +66,10 @@
...
@@ -58,10 +66,10 @@
</header>
</header>
<!-- search -->
<!-- search -->
<div
class=
"input-group block-search"
>
<div
class=
"input-group block-search"
>
<input
id=
"txt-keyword"
type=
"text"
class=
"form-control"
<input
id=
"txt-keyword"
type=
"text"
class=
"form-control"
placeholder=
"Enter keywords"
value=
"
<%=
params
[
'keyword'
]
%>
"
>
placeholder=
"Enter keywords"
value=
"
<%=
params
[
'keyword'
]
%>
"
>
<span
<span
class=
"input-group-btn"
>
class=
"input-group-btn"
>
<a
id=
"btn-search"
<%=
link_to
url_for
(
controller:
'products'
,
action:
'search'
),
class:
'btn btn-default'
,
id:
'btn-search'
do
%>
class=
"btn btn-default"
href=
"
<%=
url_for
(
controller:
'products'
,
action:
'search'
)
%>
"
><span
<span
class=
"glyphicon glyphicon-search"
></span>
Search
class=
"glyphicon glyphicon-search"
></span>
Search
</a
>
<%
end
%
>
</span>
</span>
</div>
</div>
venshop_app/app/views/layouts/_product_category.html.erb
View file @
b044beed
...
@@ -12,7 +12,9 @@
...
@@ -12,7 +12,9 @@
i
=
1
i
=
1
terms
.
each
do
|
term
|
terms
.
each
do
|
term
|
%>
%>
<li
<%=
%Q{ class="last">}
if
i
==
n
%>
><a
href=
"
<%=
product_category_path
(
term
)
%>
"
title=
""
>
<%=
term
.
name
%>
</a></li>
<li
<%=
%Q{ class="last">}
if
i
==
n
%>
>
<%=
link_to
term
.
name
,
product_category_path
(
term
)
%>
</li>
<%
<%
i
+=
1
i
+=
1
end
end
...
...
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