Commit Graph

862 Commits

Author SHA1 Message Date
Alberto
ebe5bf13e7 Merge pull request #3149 from NahiaSolutions/add_cards_to_custom_pages
Add cards to custom pages
2019-01-29 16:05:47 +01:00
Alberto
78479ff0e7 Merge pull request #3228 from consul/milestones_public_progress_bar
[Backport] Add progress bars to milestones public view
2019-01-29 14:12:08 +01:00
Alberto
bd4826b25e Merge branch 'master' into add_cards_to_custom_pages 2019-01-28 14:49:39 +01:00
Alberto
c297595e49 Merge branch 'master' into add_image_to_legislation_processes 2019-01-28 14:49:19 +01:00
decabeza
a497e57475 Replace progress tag to div class progress 2019-01-24 17:39:56 +01:00
Javi Martín
8c5907a3fb Add percentage text to progress bars
Note we require extra <span> tags because the <progress> tag is an empty
tag (like <img>), and so it can't have ::before or ::after
pseudo-elements. There's a workaround for that, but currently it only
works on Chrome.

For some reason, the text seems to be slightly misaligned vertically in
all implementations I've tried. So the `top: -0.1rem` rule is a hack to
align it properly.
2019-01-24 17:34:04 +01:00
Javi Martín
e73f3bd97a Add progress bars to milestones public view 2019-01-24 17:33:34 +01:00
decabeza
4498c26ff7 Create helper for active menus and show stats or results on poll subnav 2019-01-24 14:44:11 +01:00
Manu
b6cfe92d76 fixed banner styles issues 2019-01-21 12:02:27 -05:00
Manu
26db37a17f fixed wrong menu selection inside site content 2019-01-18 09:54:43 -05:00
Julian Herrero
d77183ee09 Improvement - CRUD budgets and content blocks 2019-01-14 12:59:48 +01:00
Javi Martín
68fb295db5 Use if blocks instead of two ternary operators
Using a simple ternary operator is usually fine; however, code combining
two ternary operator is a bit hard to follow.
2019-01-10 16:11:51 +01:00
Javi Martín
eb6bba52e3 Simplify code
The string inside `params[:direction]` should already use lowercase
characters.
2019-01-10 16:11:51 +01:00
Javi Martín
814579d58f Simplify interpolation
It's OK ot use single quotes inside a string with double quotes in order
to avoid escape characters.
2019-01-10 16:11:51 +01:00
Javi Martín
ee2f970e03 Fix sorting links for non-English languages
We were assuming the translation and the column name were related.
2019-01-10 16:11:51 +01:00
Anna Anks Nowak
3fd7b3d216 Extract setting icon and direction to methods 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
0fe9ea08c3 Fix the direction assignment 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
e88acb8905 Make params handling case insensitive 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
e264490bca Styling and refactor sorting methods and helpers 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
37b2226432 Make the link_to helper more readable 2019-01-10 16:11:51 +01:00
Anna Anks Nowak
747b8295b1 Refactor link_to_investments_sorted method 2019-01-10 15:35:54 +01:00
Anna Anks Nowak
9786b0bf7d Rewrite sorting to support direction param [#2931] 2019-01-10 15:34:33 +01:00
Anna Anks Nowak
5dd468092a Rewrite the method to not use budget_investments_sorting_options [#2931] 2019-01-10 15:28:55 +01:00
Anna Anks Nowak
22059379f5 Refactor by creating a helper method for generating sorting links [#2931] 2019-01-10 15:28:55 +01:00
Julian Herrero
1ea18f0c89 refactor - correct place for block variable 2019-01-02 12:50:01 +01:00
Julian Herrero
2081269a67 fix Hound violations 2019-01-02 10:46:31 +01:00
Raimond Garcia
a8de5306c8 Merge pull request #3091 from dpgigorro/2791-homepage-for-legislation-process
add homepage for legislation processes
2018-12-19 11:14:24 +01:00
Javier Martín
4782ca37d6 Merge pull request #3111 from consul/backport-customize_toda_la_ciudad
Remove custom "toda la ciudad" code
2018-12-18 13:03:51 +01:00
Julian Nicolas Herrero
2175339609 Merge pull request #3106 from consul/2918-crud_budget_groups_headings
Change CRUD for budget groups and headings
2018-12-18 10:23:24 +01:00
dperez
bef404c443 add homepage for legislation processes 2018-12-15 18:04:24 +01:00
Javi Martín
e6a609e6e5 Extract method to filter investments by status 2018-12-14 18:15:51 +01:00
Javi Martín
b4b0b18a2d Extract method to get investment milestone status 2018-12-14 18:15:51 +01:00
Julian Herrero
8fb8f70efd cleanup (due to new CRUD for budget groups and headings) 2018-12-14 15:37:25 +01:00
Javi Martín
03dc43a500 Manage legislation process milestones 2018-12-11 20:18:53 +01:00
Julian Nicolas Herrero
6aa54d6c62 Merge branch 'master' into content_blocks_for_headings 2018-12-11 16:40:25 +01:00
Javier Martín
3631ff7340 Merge pull request #3074 from consul/backport-refactor_legislation_process_subnav
Refactor legislation process subnav
2018-12-05 13:32:22 +01:00
Javi Martín
9ad8c5728a Refactor legislation process subnav 2018-11-30 18:09:52 +01:00
Javi Martín
b499c88373 Extract method in menu moderated content
This way we can make a long line considerably shorter.
2018-11-30 18:04:55 +01:00
Javi Martín
45a41a7528 Rename Admin::Proposals to Admin::HiddenProposals
The same way we do it with users and budget investments.
2018-11-30 18:04:55 +01:00
Milber Champutiz Burbano
9f455b9165 Added feature to add content block to headings in sidebar -- rebase 2018-11-27 09:37:35 -05:00
decabeza
5abeeb8588 Fixes date format on legislation helper 2018-11-14 12:41:22 +01:00
decabeza
13b3d9cebc Fixes admin menu link when create a new widget 2018-11-12 17:11:17 +01:00
decabeza
1d5335c782 Display last milestones image
Also adds a second order to ensure the order to display milestones with same publication date is always the same
2018-11-07 18:25:02 +01:00
decabeza
ba1a6b4cc8 Display first image available for milestones 2018-11-07 18:09:23 +01:00
María Checa
b6fdf732f2 Add total Investments in the execution list 2018-11-06 13:02:35 +01:00
Marko Lovic
8376efce3f Hide headings with no investments
The page should not show any headings which don't have any
winning investments. The "no content" message should only be
shown when there are no headings with investments to avoid an
otherwise blank page.

__Note:__ in the main @headings query, _both_ #includes and #joins
are needed to:
 1. eager load all necessary data (#includes)
and
 2. to perform an INNER JOIN on milestones to filter out investments
with no milestones (#joins).
2018-11-06 13:02:35 +01:00
Angel Perez
a3ef662509 Filtering investments are based on the latest milestone status 2018-11-06 13:02:35 +01:00
Angel Perez
749954267d Use Budget::Investment#winners scope to fetch only winner investments 2018-11-06 13:02:34 +01:00
Angel Perez
448ac7a158 Restore filtering investments by milestone status query
This commit makes 3 changes:

1. Extracts a query into a helper for clarity and DRYness

2. Adds a `.where` clause to filter investments based on their
(current) milestone status

3. Fixes a bug where investments would be rendered as many times as
milestones associated to an investment
2018-11-06 13:02:34 +01:00
Javi Martín
2a1b50beba Extract method to render form fields for a locale 2018-10-22 16:36:18 +02:00