Javi Martín
66fc49f9ed
Ignore dynamically used I18n keys
2018-10-04 16:30:59 +02:00
Javi Martín
659a45af0a
Seed some selected legislation proposals
2018-10-04 16:30:55 +02:00
Javi Martín
d6ff7e0f3f
Simplify code
2018-10-04 16:29:01 +02:00
Javi Martín
7d69f2aaab
Properly test order by ID
...
By default records are already ordered by ID, so we weren't checking the
ordering by ID functionality was working properly.
Making the records be ordered by title first makes the test a bit more
reliable.
2018-10-04 16:29:01 +02:00
Javi Martín
dc9cf5da55
Order by supports in descending order
...
Just as we do with confidence score, and as admins expect when they
order by received supports: the ones with more supports appear first.
2018-10-04 16:29:01 +02:00
Javi Martín
f1745f8040
Fix typo
2018-10-04 16:29:01 +02:00
Javi Martín
75d1ab1e52
Use AJAX requests to select legislation proposals
...
Now the interface is more similar to the one in budget investments.
2018-10-04 16:29:01 +02:00
Javi Martín
667c2c82b5
Use toggle_select action for legislation proposals
...
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.
2018-10-04 16:29:01 +02:00
Javi Martín
806b1fb3ca
Extract select proposal button into a partial
2018-10-04 16:29:01 +02:00
Javi Martín
9df201780d
Extract proposals table into a partial
2018-10-04 16:29:01 +02:00
Raúl Fuentes
a859de5d16
Test the selectable proposals
2018-10-04 16:29:01 +02: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
Javier Martín
429fbc5ed5
Merge pull request #2948 from consul/backport-legislation-proposal-categories
...
Add legislation proposal's categories
2018-10-04 16:22:21 +02:00
voodoorai2000
422f3a5f47
Add tag filtering for legislation proposals
2018-10-04 15:43:41 +02:00
Javier Martín
c7a21e546d
Merge pull request #2946 from consul/backport-customize_proposals_view
...
Simplify legislation proposals customization
2018-10-04 13:01:48 +02:00
Juan Salvador Pérez García
491e6e4b6e
Fixes action sorting
...
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.
2018-10-04 11:47:14 +02:00
Javi Martín
acbf20c938
Extract partial for proposals content
2018-10-03 22:07:55 +02:00
Javi Martín
f93281fd02
Extract link text to a helper
...
This way we can use the same code in custom views which won't use the
same text.
2018-10-03 22:06:20 +02:00
Javi Martín
ec18743251
Authorize resource after authenticating user
...
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.
2018-10-03 22:06:20 +02:00
Javi Martín
8064b53aad
Add variety to legislation process dev seeds
...
This way different processes will be in different phases and it will be
easier to test the application locally.
2018-10-03 22:06:19 +02:00
Javi Martín
5ab8587ad2
Use absolute translation paths
...
Using `t(.empty_proposals)` IMHO is a bit dangerous because we'd need to
change the locale files if we move the code to a partial or rename the
file.
2018-10-03 22:05:33 +02:00
Javier Martín
5c1d1882ab
Merge pull request #2945 from consul/backport-legislation_proposals
...
Add admin permissions in legislation proposals
2018-10-03 21:44:35 +02:00
María Checa
388c1a9bd9
Improved tests
2018-10-03 16:02:41 +02:00
María Checa
d73be15296
Added tests
2018-10-03 16:02:41 +02:00
María Checa
056086e81e
Allow admins to see legislation debates and proposals index
2018-10-03 16:02:12 +02:00
María Checa
6d5e1a075e
Allow admins to access Legislation::Proposal #show and Legislation::Process #proposals
2018-10-03 16:01:18 +02:00
Javier Martín
127eef3856
Merge pull request #2942 from consul/backport-feature/random_legislation_proposal
...
Random legislation proposal's order & pagination
2018-10-03 15:59:21 +02:00
Bertocq
df3df71a54
Force postgresql setseed value in correct range
...
This commit partially backports commit AyuntamientoMadrid@f038399 by
taking only the parts affecting code already in CONSUL's main
repository.
2018-10-03 13:46:32 +02:00
Bertocq
c04b0ceda4
Add pagination to legislation process proposals list
2018-10-03 13:46:32 +02:00
Bertocq
52df63c2aa
Add legislation proposal feature scenario to check random order is consistent with pagination
2018-10-03 13:46:32 +02:00
Bertocq
89b8e51a93
Add helper function to get legislation proposals list order on feature spec
2018-10-03 13:46:32 +02:00
Bertocq
d36e47c740
Add legislation proposal spec, with random list order scenario
2018-10-03 13:46:00 +02:00
Bertocq
845f0094b5
Add proposal phase values to legislation process factory
2018-10-03 13:40:59 +02:00
Bertocq
349abffb20
Add random order based on seed to legislation process proposals list
2018-10-03 13:40:59 +02:00
Bertocq
599ddf8f41
Create @proposal variable con process controller for proposals list that use random seed
2018-10-03 13:40:59 +02:00
Bertocq
4ab9b8b767
Move onto proposals method the random seed call
2018-10-03 13:40:59 +02:00
Bertocq
0cabede68c
Add random seed on Legislation Proposal controller for index
2018-10-03 13:40:59 +02:00
Javier Martín
132fea9c94
Merge pull request #2913 from papayalabs/2741-updates-translatable-custom-pages-reloaded
...
Updates translatable custom pages
2018-10-03 13:23:13 +02:00
Javier Martín
2775ae2b50
Merge pull request #2924 from consul/backport-1588-make-homepage-content-translatable
...
Make homepage content translatable
2018-10-03 13:20:49 +02:00
Alberto
1163999ec0
Merge pull request #2941 from consul/dashboard-unrelated
...
Removes unrelated changes with dashboard feature
2018-10-02 14:41:43 +02:00
Alberto
857f747ab8
Merge pull request #2922 from consul/legislation-proposals-imageable
...
Legislation proposals imageable
2018-10-02 11:22:19 +02:00
decabeza
6caf3a43b6
Removes unrelated changes with dashboard feature
2018-10-01 18:43:44 +02:00
Alberto
a92d0a9ba7
Merge pull request #2773 from medialab-prado/rebase_consul_master
...
Pull request to dashboard branch in official repository
2018-10-01 16:50:12 +02:00
decabeza
aa76251d1d
Adds image to legislation proposals views
2018-10-01 16:49:22 +02:00
decabeza
7c194f6042
Adds imageable to legislation proposals
2018-10-01 16:48:46 +02:00
Javier Martín
ea429cb4ac
Merge pull request #2925 from consul/backport-rubocop_whitespace
...
Update rubocop rules
2018-10-01 13:41:10 +02:00
Javier Martín
ad443fa03a
Merge pull request #2933 from consul/help-feature
...
Feature help page
2018-10-01 13:38:38 +02:00
Juan Salvador Pérez García
2dc39e1498
Enhacements in proposal progress graph
...
Proposed action execution is shown with a red dot. Mouse hover event
shows a pop up for the points of the graph. Red dots will contain the
proposed acction executed for the given date.
2018-10-01 11:22:32 +02:00
Juan Salvador Pérez García
92c0e34c7a
Fixed error in layout
...
An error was introduced while trying to fix merge conflicts. It is fixed
now.
2018-10-01 10:13:45 +02:00
decabeza
dd11a040a6
Adds setting to enable or disable help page
2018-09-28 18:59:28 +02:00