Commit Graph

411 Commits

Author SHA1 Message Date
voodoorai2000
d0b8fef6b3 Delete spending proposals 2019-05-31 18:22:59 +02:00
Javier Martín
82e3c41aa9 Merge pull request #3512 from consul/backport-stats
Change stats layout
2019-05-21 17:18:47 +02:00
Javi Martín
558070d530 Remove geozone participation percentage
We currently don't store geozone population.
2019-05-21 13:50:18 +02:00
Javi Martín
793bfed372 Display only existing stats
So if we don't have information regarding gender, age or geozone, stats
regarding those topics will not be shown.

Note we're using `spec/models/statisticable_spec.rb` because having the
same file in `spec/models/concerns` caused the tests to be executed
twice.

Also note the implementation behind the `gender?`, `age?` and `geozone?`
methods is a bit primitive. We might need to make it more robust in the
future.
2019-05-21 13:50:18 +02:00
Javi Martín
76c7827cf4 Use stats objects instead of hashes
It will make it far easier to call other methods on the stats object,
and we're already caching the methods.

We had to remove the view fragment caching because the stats object
isn't as easy to cache. The good thing about it is the view will
automatically be updated when we change logic regarding which stats to
show, and the methods taking long to execute are cached in the model.
2019-05-21 13:50:18 +02:00
Javi Martín
7362b8233a Remove unrelated text
The number refers to the total number of participants, and not the total
number of votes.
2019-05-21 13:50:17 +02:00
Javi Martín
90fe746d27 Add geozone stats to polls 2019-05-21 13:50:16 +02:00
Javi Martín
4d520a3a47 Rename age_groups method
The name was confusing because it seemed to return a list of age groups.
2019-05-21 13:50:16 +02:00
Javi Martín
4ade857a1b Extract method to render number and info
We're going to use it in many places, so removing duplication is useful.
2019-05-21 13:50:16 +02:00
Javi Martín
1c9552b922 Add number-with-info HTML class to stats
So it can be reused in advanced statistics.
2019-05-21 13:50:16 +02:00
Javi Martín
573e04ef8f Move common stats to partials 2019-05-21 13:50:16 +02:00
decabeza
cbbe188d6a Move officing link inside header dropdown menu
Also include the condition to hide this link on officing namespace.
2019-05-17 17:48:43 +02:00
decabeza
a57397dd6c Always use map image from admin site customization images 2019-05-07 14:43:04 +02:00
Javi Martín
3e4e65ead7 Use double quotes inside ERB
We were using single quotes inside ERB code when that code was inside
HTML double quotes.
2019-03-25 14:58:54 +01:00
Javi Martín
4c35df4812 Use double quotes inside string interpolation 2019-03-25 14:58:54 +01:00
Julian Herrero
dbe99f058e Use double quotes in app/views/shared 2019-03-19 12:16:50 +01:00
decabeza
2d166cdeca Replace spaces to %20 on whatsapp share url
This avoid have an invalid href with spaces.
2019-03-14 11:31:40 +01:00
decabeza
f7e327af09 Change label for search text
Label wraps input field to prevent error on missing label (hidden by CSS).
2019-03-14 11:31:21 +01:00
decabeza
528a4b6e8e Add default colours to admin banners 2019-03-13 13:17:42 +01:00
decabeza
ccee843da7 Remove unused settings
These settings are customised for Madrid's fork. On CONSUL any user can include new links using site customisation content blocks from admin panel.
2019-02-18 15:40:11 +01:00
decabeza
ab70872a7d Adds new social share partial for proposals 2018-10-31 11:42:00 +01:00
Raúl Fuentes
05340e423c Add select to Legislation::Proposals
Add admin interface for mark any proposal as selected
Add filter to public interface for selected proposals
2018-10-04 16:28:56 +02:00
decabeza
dd11a040a6 Adds setting to enable or disable help page 2018-09-28 18:59:28 +02:00
Raimond Garcia
b6602348e2 Merge pull request #2852 from tiagozini/fix-issue-2848
Fix bug in facebook share link
2018-09-17 18:23:29 +02:00
Raimond Garcia
778b10d181 Merge pull request #2835 from wairbut-m2c/backport/fix-proposals-menu
Fix navigation menu under Legislation::Proposal show view
2018-09-07 18:44:31 +02:00
Alberto
21f36e6be5 Merge branch 'master' into feature/1-nav-content-blocks 2018-09-05 12:41:07 +02:00
Tiago P. Zini
416f00aafd Fixing bug in facebook share link 2018-09-03 23:41:02 -04:00
Angel Perez
43b040162d fix(frontend): Only one menu element has 'active' CSS selector 2018-08-06 10:13:41 -04:00
decabeza
62343ba49b Removes custom content on top links 2018-07-30 17:56:23 +02:00
Alberto
65e4435822 Merge pull request #2137 from wairbut-m2c/iagirre-admin-menu-in-management
Add admin menu in management view (if user is admin)
2018-07-27 12:35:07 +02:00
Ziyan Junaideen
9bad639bb5 i18n usage - typo + sub navigation using new keys 2018-07-26 22:55:49 +05:30
Ziyan Junaideen
494493214c Revert "Hiding help if there is a left/right content block"
This reverts commit 6eeb7bfdaef9d370892fe0cc03635b45b29e2036.
2018-07-26 22:55:49 +05:30
Ziyan Junaideen
4ee2c20253 Hiding help if there is a left/right content block 2018-07-26 22:55:49 +05:30
Ziyan Junaideen
7fb4d10989 Not showing top links if content block exist 2018-07-26 22:55:49 +05:30
Ziyan Junaideen
5b6a6b5324 Changed keys for locations 2018-07-26 22:55:49 +05:30
Ziyan Junaideen
b95aa5d912 Sub nav content positions 2018-07-26 22:55:49 +05:30
Angel Perez
463c753880 Recommendations are automatically disabled if dismissed by user 2018-07-15 21:28:58 -04:00
Angel Perez
251441e109 Users can now hide recommendations 2018-07-15 21:28:57 -04:00
decabeza
ecb0041b7f Adds recommended index partial and styles 2018-07-15 21:28:56 -04:00
iagirre
7a7ae5fa2e The admin menu is shown in the management section if the user who logged in is an admin 2018-07-15 17:32:30 -04:00
iagirre
82cb8d4c52 Changes suggested in PR:
* Delete all things related to banner images and styles (in code)
* Add a new test to check that the banner is showing correctly
* Update the specs accordingly to match the changes

Update dev_seed to set a random background_color and a font_color for banners (and remove everything about image and style)
Add a rake task to migrate the banner style to backgroun_color and font_color (so that the banners have the same colors than before)
2018-07-12 10:17:24 -04:00
decabeza
67713eb980 Fixes accesskey on subnavigation 2018-06-08 15:14:50 +02:00
decabeza
0bf31bde6c Updates all active to is-active classes 2018-06-06 12:02:13 +02:00
decabeza
ee884ed998 Updates active to is-active class for menus 2018-06-06 12:01:16 +02:00
decabeza
fcae2c0ac2 Updates top bar html and styles 2018-06-06 12:00:39 +02:00
Alberto García
0d64f51b78 Merge pull request #2405 from consul/more-info-pages
Improve texts of help page
2018-01-31 11:09:12 +01:00
decabeza
286371c9d9 Changes more_info folder and path to help 2018-01-30 18:26:30 +01:00
decabeza
213152349b Changes more info link to help 2018-01-30 18:10:42 +01:00
Bertocq
e5ce55b1cd Hide order selectors when only one order available 2018-01-30 17:03:17 +01:00
Bertocq
34b2a27357 Cleanup indentation and line lenght aat order select partial 2018-01-25 18:06:36 +01:00