Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
584 additions
and
274 deletions.
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
app/assets/stylesheets/responsive/_public_body_stats_layout.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* Layout for statistics page */ | ||
.public-body-ranking { | ||
margin-bottom: 40px; | ||
} | ||
|
||
.public-body-ranking-title { | ||
margin-top: 25px; | ||
margin-bottom: 10px; | ||
} | ||
|
||
.public-body-ranking table { | ||
margin-top: 20px; | ||
margin-left: 30px; | ||
} | ||
|
||
.public-body-ranking td, th { | ||
border: 0px; | ||
padding: 5px; | ||
padding-right: 20px; | ||
} | ||
|
||
.public-body-ranking td.statistic { | ||
text-align: center; | ||
} | ||
|
||
.leaderboard-block { | ||
margin: 0 0 4em; | ||
@include respond-min( 35em ) { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
} | ||
|
||
.leaderboard-item { | ||
@include respond-min( 35em ) { | ||
width: 45%; | ||
} | ||
} | ||
|
||
.leaderboard-people { | ||
padding: 0; | ||
} | ||
|
||
.leaderboard-person { | ||
margin: 0 0 1em; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
|
||
img, | ||
.leaderboard-person-initial { | ||
margin: 0 1rem 0 0; | ||
width: 3rem; | ||
height: 3rem; | ||
} | ||
|
||
.u-name { | ||
font-size: 1.125em; | ||
margin: 0 0 .5em; | ||
} | ||
} | ||
|
||
.leaderboard-person-initial { | ||
padding: .6rem; | ||
font-size: 1.5em; | ||
} | ||
|
||
a.leaderboard-person-details { | ||
display: flex; | ||
justify-content: flex-start; | ||
align-items: flex-start; | ||
|
||
p { | ||
margin: 0; | ||
} | ||
} | ||
|
||
.leaderboard-count { | ||
margin: 0; | ||
font-size: 1.125em; | ||
padding: 0 0 1em 1em; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class StatisticsController < ApplicationController | ||
def index | ||
unless AlaveteliConfiguration::public_body_statistics_page | ||
raise ActiveRecord::RecordNotFound.new("Page not enabled") | ||
end | ||
|
||
@public_bodies = Statistics.public_bodies | ||
@users = Statistics.users | ||
|
||
respond_to do |format| | ||
format.html | ||
format.json do | ||
render json: { | ||
public_bodies: @public_bodies, | ||
users: Statistics.user_json_for_api(@users) | ||
} | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.