Bertocq
66691b644a
Refactor Budget::PHASES constant to Budget::Phase::PHASE_KINDS
2018-01-16 12:18:13 +01:00
Bertocq
f2228a908b
Refactor budget's phase max description lenght from Budget to Phase model
2018-01-16 12:18:13 +01:00
Bertocq
36e74d0ef2
Add Budget::Phase model, spec and factory
...
Create a new Budget::Phase model that:
* Stablishes a relation with its budget
* Stablishes relation with two other Budget::Phases (previous and next)
* Validates basic dates range, kind and description rules.
* Adds scopes to get the ones enabled as well as each individual phase
Create a factory that generates a basic and valid Budget::Phase
Create a model spec that checks kind, date range and budget validations.
2018-01-16 12:18:13 +01:00
BertoCQ
3d5bf04829
Merge pull request #2311 from consul/2299-budget_investments_related_content
...
Budget investments related content
2018-01-15 20:02:34 +01:00
María Checa
a1f840e8fd
Added improvements to related contents
2018-01-12 18:35:15 +01:00
Raimond Garcia
b0bd7792be
Merge pull request #1917 from wairbut-m2c/iagirre-admin-budget-heading-action
...
Actions for budgets' headings added. Edit headings, delete headings i…
2018-01-11 13:47:27 +01:00
iagirre
0e11e21b2a
Merged with master and solved conflicts
2018-01-10 13:23:39 +01:00
Bertocq
334091710c
Refactor price & explanation showing logic at Investment model
2018-01-10 11:26:16 +01:00
Bertocq
f3a7de55ea
Rename should_show_price_info? to should_show_price_explanation? at Budget::Investment & usage
2018-01-10 01:13:34 +01:00
Raúl Fuentes
29018e3062
changes made at the request of voodoorai2000
2018-01-09 13:08:03 +01:00
Bertocq
18236e8827
Fix random order seed value cleanup to allow negative values and always be numeric
2018-01-06 18:21:24 +01:00
Bertocq
900d8a00b1
Make milestone's description a required attribute
2017-12-15 16:38:21 +01:00
Raimond Garcia
9ba8ca7de3
Merge pull request #2187 from consul/notifications
...
Fix notifications' exceptions
2017-12-14 22:11:27 +01:00
Alberto García
1737f85398
Merge branch 'master' into aperez-dates-for-milestones
2017-12-14 20:50:55 +01:00
rgarcia
2b52d26d82
refactors notifications into concerns and shared examples
2017-12-14 16:15:30 +01:00
iagirre
01a8c55936
Make Budget::Investment::Milestone class Documentable.
...
Add fields to the milestone form so that the admin can attach 0, 1 or multiple documents.
Add column to milestone list with a link to documents (if there is any).
Make documents accessible from the milestone view for users.
2017-12-14 10:53:01 +01:00
Angel Perez
6d57d76071
Admins can add a 'publication date' to milestones
2017-12-13 20:17:54 -04:00
iagirre
35986ea6b5
Budget::Investment::Milestone is imageable
...
Admin form attaches an image
Milestone list has a column "Image", empty or with a link to the image
2017-12-13 08:59:36 +01:00
Bertocq
13f5fa55ab
Use Relationable concern on Debates, Proposals and Budget Investments
2017-11-29 19:01:12 +01:00
Bertocq
c5fa85e3f6
Prevent a division by zero from happening on sort by random investment scope
2017-11-29 11:40:10 +01:00
María Checa
3984d6a947
Merge pull request #2115 from wairbut-m2c/iagirre-heading-population-restriction-validation
...
Iagirre heading population restriction validation
2017-11-28 20:06:53 +01:00
iagirre
f3527b1311
Test added to check the repetition of elements between pages when random order used. Scope variable initialized to 1
2017-11-15 09:01:35 +01:00
iagirre
7f0e447e0f
One aproach to make the randomness work with kaminari
2017-11-15 08:56:31 +01:00
iagirre
bfcbb6c0ad
Validation in model and in form added. When users makes the on focus on population field an explanation appears. Some specs added to test the model validations
2017-10-31 13:04:30 +01:00
taitus
a0603985ef
Refactor.
2017-09-27 14:51:35 +02:00
Senén Rodero Rodríguez
130e4533ac
Allow to render map without marker on new forms.
2017-09-27 14:48:12 +02:00
Senén Rodero Rodríguez
5956207a00
Add map locations. Each map location can belongs to proposal or budget investment.
2017-09-27 14:48:12 +02:00
Senén Rodero Rodríguez
88a7a29d27
Remove new_nested action from documents controller. Use cocoon gem to manage new nested fields creation on documents.
2017-09-26 13:57:13 +02:00
Senén Rodero Rodríguez
6f71da07ee
Duplicate documentable code and rename for imageable
2017-09-26 13:55:03 +02:00
Bertocq
614ff79ba1
WIP
2017-09-26 13:53:43 +02:00
Bertocq
886431b43d
Revert changes in Budget::Investment model that added image attachment directly
2017-09-26 13:53:43 +02:00
Senén Rodero Rodríguez
f23fd927d6
Add constant to set minimum size for budget investment image.
2017-09-26 13:53:43 +02:00
Senén Rodero Rodríguez
c914c772c0
Add budget investment image dimmensions validator.
2017-09-26 13:53:42 +02:00
Alessandro Cuoghi
dd1e73c5fd
Add image into investment show and add some change of css.
2017-09-26 13:53:42 +02:00
Alessandro Cuoghi
aa471974bd
Use different image versions on responsive sizes
2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
515d6d7e70
Rename image_description column to image_title on budget investments.
2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
673fc66011
Add budget investements images specs
2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
c399692109
Add image description to budget investments
2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
00a8f42797
Added image content type validation to only allowing jpg images.
2017-09-26 13:53:42 +02:00
taitus
c5bb6dca65
Add image to budget investments.
2017-09-26 13:53:42 +02:00
Senén Rodero Rodríguez
4f5a552486
Added image content type validation to only allowing jpg images.
2017-09-26 13:53:42 +02:00
taitus
7b88e63136
Add image to budget investments.
2017-09-26 13:53:42 +02:00
iagirre
f7e96067b0
Actions for budgets' headings added. Edit headings, delete headings if not budget investments associated and add link in order to see budgets investments filtered by the heading.
...
Cambios para hacer commit:
modificado: app/controllers/admin/budget_headings_controller.rb
modificado: app/models/budget/heading.rb
nuevo archivo: app/views/admin/budget_headings/_errors.html.erb
nuevo archivo: app/views/admin/budget_headings/edit.js.erb
nuevo archivo: app/views/admin/budget_headings/update.js.erb
modificado: app/views/admin/budgets/_group.html.erb
nuevo archivo: app/views/admin/budgets/_heading.html.erb
nuevo archivo: app/views/admin/budgets/_heading_form.html.erb
modificado: config/locales/en/activerecord.yml
modificado: config/locales/es/activerecord.yml
modificado: spec/features/admin/budgets_spec.rb
modificado: spec/models/budget/heading_spec.rb
2017-09-25 15:40:17 +02:00
taitus
74958b461a
Add new model concern Communitable with relation, callback and associate community.
2017-09-05 12:54:32 +02:00
taitus
895c942a39
Add community to investments
2017-09-05 12:52:45 +02:00
Senén Rodero Rodríguez
4081dded5f
Add nested documents to new budgetinvestments.
2017-08-25 18:34:53 +02:00
Senén Rodero Rodríguez
38d4d59241
Add arguments to documentable concern to make it configurable for any recipient model.
2017-08-25 17:27:37 +02:00
Senén Rodero Rodríguez
6b61cbe35c
Set maximum number of documents on proposal and budget investments. Show alert on documents tab when maximum reached. Hide upload button when maximum reached.
2017-08-25 17:27:37 +02:00
Senén Rodero Rodríguez
a2130689ed
Create documentable concern and add it to budget investment model. Create documents controller, documents helper, routes, translations and specs
2017-08-25 17:27:37 +02:00
BertoCQ
204ea13c85
Merge branch 'master' into followable
2017-07-11 11:30:49 +02:00