Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Patricio Sanchez
/
quiniela-mundial
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Iker Narvaez
2018-06-10 22:12:14 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f81f603b7b11ff5222ae9abe22ee4444ac189d26
f81f603b
1 parent
cba58e78
dashboard fixes
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
15 deletions
app/controllers/application_controller.rb
app/views/application/_leaderboard.html.slim
app/views/application/_navbar.slim
app/views/application/_results.html.slim
app/views/application/_upcoming_matches.html.slim
app/controllers/application_controller.rb
View file @
f81f603
...
...
@@ -21,8 +21,10 @@ class ApplicationController < HeimdallEngine::ApplicationController
end
def
check_results
return
[]
unless
@current_user
@current_user
.
bets
.
join
(
:matches
).
order
(
match:
{
date: :ASC
}).
limit
(
5
)
return
[]
unless
current_user
current_user
.
bets
.
joins
(
:match
).
order
(
'matches.date desc'
)
.
where
.
not
(
result:
nil
)
.
limit
(
5
)
end
def
recent_matches
...
...
app/views/application/_leaderboard.html.slim
View file @
f81f603
h1
Leaderboard
table
thead
th
Username
th
Score
tbody
tr
-
@leaders
.
each
do
|
user
,
points
|
...
...
app/views/application/_navbar.slim
View file @
f81f603
header
class
=
"mdc-top-app-bar navbar"
header
class
=
"mdc-top-app-bar navbar"
style
=
'margin-top: -8px; margin-left: -8px;'
div
class
=
"mdc-top-app-bar__row"
section
class
=
"mdc-top-app-bar__section mdc-top-app-bar__section--align-start"
a
href
=
"#"
class
=
"material-icons mdc-top-app-bar__navigation-icon"
menu
span
class
=
"mdc-top-app-bar__title"
Title
span
class
=
"mdc-top-app-bar__title"
Ukko
/a href="#" class="material-icons mdc-top-app-bar__navigation-icon" menu
...
...
app/views/application/_results.html.slim
View file @
f81f603
h1
R
esults
h1
Your
most
recent
r
esults
table
thead
th
Team
1
th
Team
2
th
Points
obtained
tbody
tr
-
@results
.
each
do
|
r
|
td
=
r
.
local
td
=
r
.
visit
td
=
r
.
match
.
local
td
VS
td
=
r
.
match
.
visit
td
=
r
.
points
...
...
app/views/application/_upcoming_matches.html.slim
View file @
f81f603
...
...
@@ -5,6 +5,7 @@ table
-
@upcoming_matches
.
each
do
|
u
|
td
=
l
(
u
.
date
,
format: :short
)
td
=
u
.
local
td
VS
td
=
u
.
visit
h1
Recent
matches
...
...
Please
register
or
login
to post a comment