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
079a8c34
Commit
079a8c34
authored
Oct 23, 2013
by
vulehuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dynamic product category on sidebar
parent
45c469cd
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
13 deletions
+25
-13
venshop_app/app/assets/javascripts/product_category.js.coffee
+3
-0
venshop_app/app/assets/stylesheets/product_category.css.scss
+3
-0
venshop_app/app/controllers/product_category_controller.rb
+4
-0
venshop_app/app/helpers/product_category_helper.rb
+2
-0
venshop_app/app/views/layouts/_product_category.html.erb
+12
-10
venshop_app/app/views/layouts/application.html.erb
+0
-1
venshop_app/app/views/layouts/application_one_col.html.erb
+0
-1
venshop_app/app/views/product_category/show.html.erb
+0
-0
venshop_app/config/routes.rb
+1
-1
No files found.
venshop_app/app/assets/javascripts/product_category.js.coffee
0 → 100644
View file @
079a8c34
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
venshop_app/app/assets/stylesheets/product_category.css.scss
0 → 100644
View file @
079a8c34
// Place all the styles related to the ProductCategory controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
venshop_app/app/controllers/product_category_controller.rb
0 → 100644
View file @
079a8c34
class
ProductCategoryController
<
ApplicationController
def
show
end
end
venshop_app/app/helpers/product_category_helper.rb
0 → 100644
View file @
079a8c34
module
ProductCategoryHelper
end
venshop_app/app/views/layouts/_product_category.html.erb
View file @
079a8c34
<%
terms
=
ProductCategory
.
all
%>
<!-- Product category -->
<!-- Product category -->
<div
class=
"box bg"
>
<div
class=
"box bg"
>
<h2>
<h2>
...
@@ -6,15 +7,15 @@
...
@@ -6,15 +7,15 @@
class=
"sprite-1 corner-right"
></span>
class=
"sprite-1 corner-right"
></span>
</h2>
</h2>
<ul
class=
"list"
>
<ul
class=
"list"
>
<
li><a
href=
""
title=
""
>
Category 1
</a></li>
<
%
<li><a
href=
""
title=
""
>
Category 2
</a></li>
n
=
terms
.
count
<li><a
href=
""
title=
""
>
Category 3
</a></li>
i
=
1
<li><a
href=
""
title=
""
>
Category 4
</a></li>
terms
.
each
do
|
term
|
<li><a
href=
""
title=
""
>
Category 5
</a></li
>
%
>
<li
><a
href=
""
title=
""
>
Category 6
</a></li>
<li
<%=
%Q{ class="last">}
if
i
==
n
%>
><a
href=
"
<%=
product_category_path
(
term
)
%>
"
title=
""
>
<%=
term
.
name
%>
</a></li>
<
li><a
href=
""
title=
""
>
Category 7
</a></li>
<
%
<li><a
href=
""
title=
""
>
Category 8
</a></li>
i
+=
1
<li><a
href=
""
title=
""
>
Category 9
</a></li>
end
<li
class=
"last"
><a
href=
""
title=
""
>
Category 10
</a></li
>
%
>
</ul>
</ul>
</div>
</div>
\ No newline at end of file
venshop_app/app/views/layouts/application.html.erb
View file @
079a8c34
...
@@ -48,7 +48,6 @@
...
@@ -48,7 +48,6 @@
</div>
</div>
</div>
</div>
<%=
render
'layouts/footer'
%>
<%=
render
'layouts/footer'
%>
<%=
debug
(
params
)
if
Rails
.
env
.
development?
%>
<script
src=
"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
></script>
<script
src=
"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
></script>
<script
src=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"
></script>
<script
src=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"
></script>
<%=
javascript_include_tag
"application"
,
"data-turbolinks-track"
=>
true
%>
<%=
javascript_include_tag
"application"
,
"data-turbolinks-track"
=>
true
%>
...
...
venshop_app/app/views/layouts/application_one_col.html.erb
View file @
079a8c34
...
@@ -39,7 +39,6 @@
...
@@ -39,7 +39,6 @@
<%=
yield
%>
<%=
yield
%>
</div>
</div>
<%=
render
'layouts/footer'
%>
<%=
render
'layouts/footer'
%>
<%=
debug
(
params
)
if
Rails
.
env
.
development?
%>
<script
src=
"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
></script>
<script
src=
"//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
></script>
<script
src=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"
></script>
<script
src=
"//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"
></script>
<%=
javascript_include_tag
"application"
,
"data-turbolinks-track"
=>
true
%>
<%=
javascript_include_tag
"application"
,
"data-turbolinks-track"
=>
true
%>
...
...
venshop_app/app/views/product_category/show.html.erb
0 → 100644
View file @
079a8c34
venshop_app/config/routes.rb
View file @
079a8c34
VenshopApp
::
Application
.
routes
.
draw
do
VenshopApp
::
Application
.
routes
.
draw
do
resources
:users
resources
:users
resources
:sessions
,
only:
[
:new
,
:create
,
:destroy
]
resources
:sessions
,
only:
[
:new
,
:create
,
:destroy
]
resources
:product_category
get
"default_pages/home"
get
"default_pages/home"
get
"users/new"
get
"users/new"
match
'/testyahoo'
,
to:
'users#testyahoo'
,
via:
'get'
match
'/signup'
,
to:
'users#new'
,
via:
'get'
match
'/signup'
,
to:
'users#new'
,
via:
'get'
match
'/signin'
,
to:
'sessions#new'
,
via:
'get'
match
'/signin'
,
to:
'sessions#new'
,
via:
'get'
match
'/signout'
,
to:
'sessions#destroy'
,
via:
'delete'
match
'/signout'
,
to:
'sessions#destroy'
,
via:
'delete'
...
...
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