Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
Ygopro Arena Web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Ygopro Arena Web
Commits
22c18441
Commit
22c18441
authored
Mar 28, 2012
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
actions导航增强
parent
b27d9fd4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
31 additions
and
27 deletions
+31
-27
app/assets/stylesheets/ygo.css
app/assets/stylesheets/ygo.css
+15
-0
app/controllers/cards_controller.rb
app/controllers/cards_controller.rb
+3
-3
app/controllers/duels_controller.rb
app/controllers/duels_controller.rb
+3
-3
app/controllers/users_controller.rb
app/controllers/users_controller.rb
+2
-2
app/models/card.rb
app/models/card.rb
+3
-0
app/views/duels/show.html.erb
app/views/duels/show.html.erb
+1
-1
app/views/entries/_action.html.erb
app/views/entries/_action.html.erb
+4
-1
app/views/layouts/ygo.html.erb
app/views/layouts/ygo.html.erb
+0
-17
No files found.
app/assets/stylesheets/ygo.css
View file @
22c18441
body
{
background
:
url(http://sh.convnet.net:7955/images/duel%20ranking.jpg)
no-repeat
top
center
#000000
;
margin
:
0px
;
font-size
:
14px
;
color
:
white
}
a
:link
{
text-decoration
:
none
;
color
:
#ffcc66
;}
a
:visited
{
color
:
#ffcc66
;}
a
:hover
{
text-decoration
:
underline
}
nav
{
width
:
750px
;
font-size
:
14px
;
padding-bottom
:
10px
;
line-height
:
40px
;
color
:
#ffcc66
;
text-align
:
left
;
margin-left
:
auto
;
margin-right
:
auto
;}
nav
a
{
color
:
#ffcc66
}
#footer
{
line-height
:
50px
;
padding-top
:
20px
;
padding-bottom
:
10px
;
font-size
:
12px
;
color
:
#0099FF
;
clear
:
both
;
text-align
:
center
;
margin-left
:
auto
;
margin-right
:
auto
;}
#header
{
width
:
600px
;
margin-left
:
auto
;
margin-right
:
auto
;}
#title
{
width
:
600px
;
font-size
:
30px
;
padding-bottom
:
20px
;
color
:
#ffcc66
;
text-align
:
right
;
padding-top
:
150px
;}
#main
{
width
:
600px
;
margin-left
:
auto
;
margin-right
:
auto
;
;
display
:
none
;}
\ No newline at end of file
app/controllers/cards_controller.rb
View file @
22c18441
...
@@ -6,10 +6,10 @@ class CardsController < ApplicationController
...
@@ -6,10 +6,10 @@ class CardsController < ApplicationController
if
params
[
:user_id
]
if
params
[
:user_id
]
@user
=
User
.
find
params
[
:user_id
]
@user
=
User
.
find
params
[
:user_id
]
@cards
=
@user
.
cards
@cards
=
@user
.
cards
@actions
=
[
"YGO战网"
,
@user
,
"常用卡片"
]
@actions
=
[
{
"YGO战网"
=>
users_path
}
,
@user
,
"常用卡片"
]
else
else
@cards
=
Card
.
joins
(
:duel_user_cards
)
@cards
=
Card
.
joins
(
:duel_user_cards
)
@actions
=
[
"YGO战网"
,
"卡片排行"
]
@actions
=
[
{
"YGO战网"
=>
users_path
}
,
"卡片排行"
]
end
end
respond_to
do
|
format
|
respond_to
do
|
format
|
...
@@ -22,7 +22,7 @@ class CardsController < ApplicationController
...
@@ -22,7 +22,7 @@ class CardsController < ApplicationController
# GET /cards/1.json
# GET /cards/1.json
def
show
def
show
@card
=
Card
.
find
(
params
[
:id
])
@card
=
Card
.
find
(
params
[
:id
])
@actions
=
[{
"YGO战网"
=>
users_path
},
{
"YGO战网"
=>
cards_path
},
@card
]
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
# show.html.erb
format
.
html
# show.html.erb
format
.
json
{
render
json:
@card
}
format
.
json
{
render
json:
@card
}
...
...
app/controllers/duels_controller.rb
View file @
22c18441
...
@@ -7,10 +7,10 @@ class DuelsController < ApplicationController
...
@@ -7,10 +7,10 @@ class DuelsController < ApplicationController
if
params
[
:user_id
]
if
params
[
:user_id
]
@user
=
User
.
find
params
[
:user_id
]
@user
=
User
.
find
params
[
:user_id
]
@duels
=
@user
.
duels
@duels
=
@user
.
duels
@actions
=
[
"YGO战网"
,
@user
,
'对战列表'
]
@actions
=
[
{
"YGO战网"
=>
users_path
}
,
@user
,
'对战列表'
]
else
else
@duels
=
Duel
.
where
(
true
)
@duels
=
Duel
.
where
(
true
)
@actions
=
[
"YGO战网"
,
'对战列表'
]
@actions
=
[
{
"YGO战网"
=>
users_path
}
,
'对战列表'
]
end
end
@duels
=
@duels
.
reverse_order
.
page
(
params
[
:page
])
@duels
=
@duels
.
reverse_order
.
page
(
params
[
:page
])
respond_to
do
|
format
|
respond_to
do
|
format
|
...
@@ -23,7 +23,7 @@ class DuelsController < ApplicationController
...
@@ -23,7 +23,7 @@ class DuelsController < ApplicationController
# GET /duels/1.json
# GET /duels/1.json
def
show
def
show
@duel
=
Duel
.
find
(
params
[
:id
])
@duel
=
Duel
.
find
(
params
[
:id
])
@actions
=
[
"YGO战网"
,
'对战列表'
,
@duel
]
@actions
=
[
{
"YGO战网"
=>
users_path
},
{
'对战列表'
=>
duels_path
}
,
@duel
]
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
# show.html.erb
format
.
html
# show.html.erb
format
.
json
{
render
json:
@duel
}
format
.
json
{
render
json:
@duel
}
...
...
app/controllers/users_controller.rb
View file @
22c18441
...
@@ -9,7 +9,7 @@ class UsersController < ApplicationController
...
@@ -9,7 +9,7 @@ class UsersController < ApplicationController
# GET /users.xml
# GET /users.xml
def
index
def
index
@users
=
User
.
all
@users
=
User
.
all
@actions
=
[
"YGO战网"
,
"用户排行"
]
@actions
=
[
{
"YGO战网"
=>
users_path
}
,
"用户排行"
]
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
# index.html.erb
format
.
html
# index.html.erb
format
.
xml
{
render
:xml
=>
@users
}
format
.
xml
{
render
:xml
=>
@users
}
...
@@ -20,7 +20,7 @@ class UsersController < ApplicationController
...
@@ -20,7 +20,7 @@ class UsersController < ApplicationController
# GET /users/1.xml
# GET /users/1.xml
def
show
def
show
@user
=
User
.
find
(
params
[
:id
])
@user
=
User
.
find
(
params
[
:id
])
@actions
=
[
"YGO战网"
,
@user
]
@actions
=
[
{
"YGO战网"
=>
users_path
}
,
@user
]
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
# show.html.erb
format
.
html
# show.html.erb
#format.xml { render :xml => @user }
#format.xml { render :xml => @user }
...
...
app/models/card.rb
View file @
22c18441
...
@@ -40,4 +40,7 @@ class Card < ActiveRecord::Base
...
@@ -40,4 +40,7 @@ class Card < ActiveRecord::Base
def
extra?
def
extra?
[:
融合怪兽
,
:
同调怪兽
,
:
超量怪兽
].
include?
card_type
[:
融合怪兽
,
:
同调怪兽
,
:
超量怪兽
].
include?
card_type
end
end
def
to_s
name
end
end
end
\ No newline at end of file
app/views/duels/show.html.erb
View file @
22c18441
<div
id=
"replay"
>
录像下载
</div>
<div
id=
"replay"
>
<a
href=
"#"
>
录像下载
</a>
</div>
<style
type=
"text/css"
>
<style
type=
"text/css"
>
<!
--
<!
--
...
...
app/views/entries/_action.html.erb
View file @
22c18441
<%=
@site
%>
<%=
@site
%>
<%
@actions
.
each
do
|
action
|
%>
<%
@actions
.
each
do
|
action
|
%>
»
<span
class=
"action"
>
<%=
action
%>
</span>
»
<span
class=
"action"
>
<%=
action
.
is_a?
(
Hash
)
?
link_to
(
action
.
keys
[
0
],
action
.
values
[
0
])
:
action
%>
</span>
<%
end
%>
<%
end
%>
\ No newline at end of file
app/views/layouts/ygo.html.erb
View file @
22c18441
...
@@ -10,23 +10,6 @@
...
@@ -10,23 +10,6 @@
<%=
javascript_include_tag
'ygo'
%>
<%=
javascript_include_tag
'ygo'
%>
<%=
javascript_include_tag
params
[
:controller
]
%>
<%=
javascript_include_tag
params
[
:controller
]
%>
<%=
csrf_meta_tags
%>
<%=
csrf_meta_tags
%>
<style>
body
{
background
:
url(http://sh.convnet.net:7955/images/duel%20ranking.jpg)
no-repeat
top
center
#000000
;
margin
:
0px
;
font-size
:
14px
;
color
:
white
}
a
:link
{
text-decoration
:
none
;
color
:
#ffcc66
;}
a
:visited
{
color
:
#ffcc66
;}
a
:hover
{
text-decoration
:
underline
}
nav
{
width
:
750px
;
font-size
:
14px
;
padding-bottom
:
10px
;
line-height
:
40px
;
color
:
#ffcc66
;
text-align
:
left
;
margin-left
:
auto
;
margin-right
:
auto
;}
nav
a
{
color
:
#ffcc66
}
#footer
{
line-height
:
50px
;
padding-top
:
20px
;
padding-bottom
:
10px
;
font-size
:
12px
;
color
:
#0099FF
;
clear
:
both
;
text-align
:
center
;
margin-left
:
auto
;
margin-right
:
auto
;}
#header
{
width
:
600px
;
margin-left
:
auto
;
margin-right
:
auto
;}
#title
{
width
:
600px
;
font-size
:
30px
;
padding-bottom
:
20px
;
color
:
#ffcc66
;
text-align
:
right
;
padding-top
:
150px
;}
#main
{
width
:
600px
;
margin-left
:
auto
;
margin-right
:
auto
;
;
display
:
none
;}
</style>
</head>
</head>
<body>
<body>
<header
id=
"header"
>
<header
id=
"header"
>
...
...
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