Add to active_for class method and to active_resources controller method the new scope by_proposal.
- Published proposal: display all actions.
- Draft proposal: only display actions for draft proposals.
- Display recommended_proposals on new section as goals with toogle.
- Divide recommended actions into actions done and actions pending to clarify the information to the user as summary_recomended_actions.
- Divide recommended actions into actions done and actions pending.
- Display recomended actions as goals (diplay four by defalut) without toggle but with link to new recommended actions page.
- Display description over short_description
grouping_key_for method when params[:group] == "week" always returned "#{date.cweek}/#{date.year}" but that not always is true.
When a date belongs to the first_week/last_week of the year we have exceptions for example "31/12/2018". His cweek is equal to "1", old code returned "1/2018" value but correct result would be "1/2019".
The `update` action is usually expected to behave the same way it does
everywhere else, which is updating a record using the `params` hash.
The name `toggle_select` comes from the name we use in a similar
situation for budget investments.
Administration of dashboard actions currently shows proposed actions as
well as resources mixed. This patch tries to improve how they're shown
making things easier for administrators:
Resources will be shown after proposed actions, never mixed.
Proposed actions will be sorted according to the order attribute.
Resources will be sort according the two attributes that define its
availability:
The number of supports required.
The number of days after the proposal publication.
Just like it's done everywhere else in the application. Not doing so
means users who aren't logged in receive a "you aren't authorized"
message when they try to create a new legislation proposal instead of
being redirected to the login page.
We were expecting translation parameters in legislation processes
`update` action. However, those parameters aren't sent when we get to
that action through the "proposals" tab.