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
psanchezp
2018-06-11 00:05:26 -0500
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
95d02435517ada282182f8252afbc94125bddc40
95d02435
2 parents
3c947293
09d39934
Merge branch 'master' of git.ukko.mx:psanchezp/quiniela-mundial
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
21 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 @
95d0243
...
...
@@ -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 @
95d0243
h1
Leaderboard
table
.leaderboard
thead
th
Username
th
Score
tbody
tr
-
@leaders
.
each
do
|
user
,
points
|
...
...
app/views/application/_navbar.slim
View file @
95d0243
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"
aria-label
=
"Home"
alt
=
"Home"
home
section
class
=
"mdc-top-app-bar__section mdc-top-app-bar__section--align-end"
a
href
=
"/bets"
class
=
"material-icons mdc-top-app-bar__navigation-icon"
aria-label
=
"Attach_Money"
alt
=
"Attach_Money"
attach_money
a
href
=
"/logout"
class
=
"material-icons mdc-top-app-bar__navigation-icon"
aria-label
=
"Exit_to_app"
alt
=
"Exit_to_app"
exit_to_app
/ <section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-end" role="toolbar">
/ <a href="#" class="material-icons mdc-top-app-bar__action-item" aria-label="Download" alt="Download">file_download</a>
/ <a href="#" class="material-icons mdc-top-app-bar__action-item" aria-label="Print this page" alt="Print this page">print</a>
/ <a href="#" class="material-icons mdc-top-app-bar__action-item" aria-label="Bookmark this page" alt="Bookmark this page">bookmark</a>
/ </section>
a
href
=
"/logout"
class
=
"material-icons mdc-top-app-bar__navigation-icon"
aria-label
=
"Exit_to_app"
alt
=
"Exit_to_app"
exit_to_app
\ No newline at end of file
...
...
app/views/application/_results.html.slim
View file @
95d0243
h1
Results
table
.results
thead
th
Team
1
th
Team
2
th
Points
obtained
h1
Your
most
recent
results
table
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 @
95d0243
...
...
@@ -5,6 +5,7 @@ table.upcoming
tr
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