Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VietTH-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
4
Merge Requests
4
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
Tran Hoang Viet
VietTH-VenShop
Commits
6d6f1f12
Commit
6d6f1f12
authored
Jul 16, 2015
by
Tran Hoang Viet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
VietTH: Fix review code social feature
parent
a9b16269
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
8 deletions
+16
-8
app/assets/stylesheets/layout.css.scss
+8
-2
app/assets/stylesheets/product.css.scss
+2
-1
app/helpers/social_helper.rb
+1
-1
app/views/layouts/_share_social.html.haml
+0
-0
app/views/layouts/application.html.haml
+1
-1
app/views/orders/index.html.haml
+1
-1
app/views/products/_add_to_cart_btn.html.haml
+2
-1
app/views/products/_product.html.haml
+1
-1
No files found.
app/assets/stylesheets/layout.css.scss
View file @
6d6f1f12
...
...
@@ -38,7 +38,7 @@ label.error{
-moz-box-shadow
:
0px
1px
5px
0px
rgba
(
0
,
0
,
0
,
0
.72
);
box-shadow
:
0px
1px
5px
0px
rgba
(
0
,
0
,
0
,
0
.72
);
background-color
:
#F3F3F3
;
.share-s
c
ocial
{
.share-social
{
display
:
block
;
}
}
...
...
@@ -47,6 +47,12 @@ label.error{
position
:
relative
;
&
.disable
{
opacity
:
0
.4
;
img
{
-webkit-filter
:
grayscale
(
100%
);
filter
:
grayscale
(
100%
);
filter
:
gray
;
filter
:
url("data:image/svg+xml;utf8,<svg version='1.1' xmlns='http://www.w3.org/2000/svg' height='0'><filter id='greyscale'><feColorMatrix type='matrix' values='0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0' /></filter></svg>#greyscale")
;
}
}
img
{
height
:
180px
;
...
...
@@ -55,7 +61,7 @@ label.error{
}
}
.share-s
c
ocial
{
.share-social
{
display
:
none
;
text-align
:
center
;
margin-left
:
-15px
;
...
...
app/assets/stylesheets/product.css.scss
View file @
6d6f1f12
...
...
@@ -10,7 +10,7 @@
font-size
:
16px
;
}
.share-s
c
ocial
{
.share-social
{
display
:
block
!
important
;
}
}
\ No newline at end of file
app/helpers/s
c
ocial_helper.rb
→
app/helpers/social_helper.rb
View file @
6d6f1f12
module
S
c
ocialHelper
module
SocialHelper
def
facebook_share_url
(
url
)
"https://www.facebook.com/sharer/sharer.php?u=
#{
url
||
request
.
original_url
}
"
end
...
...
app/views/layouts/_share_s
c
ocial.html.haml
→
app/views/layouts/_share_social.html.haml
View file @
6d6f1f12
File moved
app/views/layouts/application.html.haml
View file @
6d6f1f12
...
...
@@ -31,7 +31,7 @@
=
render
'layouts/cart'
.row
.col-md-12
=
render
'layouts/share_s
c
ocial'
=
render
'layouts/share_social'
.col-md-10
=
yield
...
...
app/views/orders/index.html.haml
View file @
6d6f1f12
%h3
.title
Checkout
-
if
cart_valid?
#checkout-cart
#checkout-cart
.table-responsive
=
form_for
Order
.
new
do
|
f
|
%table
.table
%thead
...
...
app/views/products/_add_to_cart_btn.html.haml
View file @
6d6f1f12
.product-addto-cart.input-group
-
max_quantity
=
product
.
stock
-
current_user
.
cart
.
find
(
product
).
try
(
:quantity
).
to_i
-
max_quantity
=
product
.
stock
-
max_quantity
-=
current_user
.
cart
.
find
(
product
).
try
(
:quantity
).
to_i
if
user_signed_in?
=
form_tag
add_cart_product_path
(
product
),
method: :get
,
class:
'form-quantity'
do
=
text_field_tag
:quantity
,
1
,
class:
'form-control quantity'
=
hidden_field_tag
:stock
,
max_quantity
,
class:
'max-quantity'
...
...
app/views/products/_product.html.haml
View file @
6d6f1f12
...
...
@@ -14,7 +14,7 @@
.clearfix
.share-s
c
ocial
.share-social
=
link_to
facebook_share_url
(
product_url
(
product
)),
class:
'facebook'
,
target:
'_blank'
do
=
image_tag
'facebook.png'
=
link_to
twitter_share_url
(
product_url
(
product
)),
class:
'twitter'
,
target:
'_blank'
do
...
...
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