Commit Graph

23 Commits

Author SHA1 Message Date
Julian Herrero
fd71ed825b Avoid error when accessing final votes stats before balloting phase
When accessing the URL `/admin/stats/budget_balloting?budget_id=X'
for a budget in a phase prior to the balloting phase, the following
error was raised due to the stats where not calculated yet.
Instead, we'll now show a flash message.

NoMethodError:
  undefined method `[]' for nil:NilClass
  ./app/controllers/admin/stats_controller.rb:82
2019-06-10 17:28:16 +02:00
voodoorai2000
d0b8fef6b3 Delete spending proposals 2019-05-31 18:22:59 +02:00
Juanjo Bazán
110ee961e3 adds budget stats for final voting to admin stats 2019-05-16 14:45:46 +02:00
Juanjo Bazán
5be54b57da reduces current admin budget stats as supporting phase 2019-05-16 14:45:45 +02:00
rgarcia
11437a1d40 add budget investment stats 2019-05-16 13:41:49 +02:00
rgarcia
cfe3f95f5c moves graphs to individual views 2019-05-16 13:37:47 +02:00
Julian Herrero
d24376f6ad Use double quotes in controllers/ 2019-03-13 22:19:49 +01:00
Angel Perez
9029acd440 Fix Rubocop warnings for Admin controllers [ci skip] 2018-09-07 13:59:07 -04:00
Bertocq
c0dcd03bab Prevent valuation comments from appearing in public pages 2018-01-31 18:14:11 +01:00
iagirre
5a3e701e8d Polls' stats migrated from Madrid's fork and sortable functions added for tables 2017-10-23 13:19:22 +02:00
rgarcia
b1fa2d22f7 only count active users in stats 2017-06-13 12:59:04 +02:00
Alberto Garcia Cabeza
60d08ab565 improves query on admin stats controller 2017-04-26 13:12:55 +02:00
Alberto Garcia Cabeza
45af9ce5aa adds budget investments numbers and chart on admin stats 2017-04-25 16:46:20 +02:00
rgarcia
bb3c4c6399 adds consistency to ruby code style
Keep a blank line before and after private
Keep a blank line before and after protected
Remove extra empty line at class body end
Remove extra blank line
Add final newline
Use 2 (not 3) spaces for indentation
Use 2 (not 4) spaces for indentation
Remove space before comma
Add space after comma
Remove trailing whitespaces
Remove unnecessary spacing
Use snake_case for variable names
Do not use then for multi-line if
Remove unused block argument - i
Use the new Ruby 1.9 hash syntax
Remove unused assignment to variable
Indent when as deep as case
Align attributes
Align end with def
2016-11-15 11:18:43 +01:00
rgarcia
3c2098eb14 improves legibility of counts 2016-06-16 18:40:05 +02:00
rgarcia
b7e3129ec1 uses more efficient count 2016-06-16 18:35:34 +02:00
rgarcia
0abc9c8376 adds stats for direct messages and proposal notifications 2016-06-16 17:42:16 +02:00
Juanjo Bazán
65335d1344 optimizes stat query 2016-05-20 11:05:10 +02:00
palomahnhp
bf5d253e12 Merge branch 'master' into tracking_user_verifications_and_others
Conflicts:
	app/controllers/admin/stats_controller.rb
	db/dev_seeds.rb
2016-04-20 11:44:33 +02:00
inobcr
e2610e15e7 Add_stats_for_Investment_Proyect_#918 2016-03-21 18:18:18 +01:00
palomahnhp
7d4936b577 track user verification and add statistics of verified users who did not vote proposals 2016-03-13 21:38:05 +01:00
rgarcia
dc52271881 displays stats summary 2015-09-26 13:07:21 +02:00
Juanjo Bazán
8c99c6a5f0 refactors stats and optimizes js
JS libraries for stats (d3, c3, etc.) only load now when needed (stats/show)
2015-09-23 19:37:24 +02:00